On Tuesday, 10 January 2023 at 10:50:13 UTC Danny de Waard wrote:
My question now is, how do i get it working on "normal" edge or chrome?

If your browser has been locked down by your employer to disable basic auth 
over http, then there's not much you can do.  Vanilla Chrome ought to be 
fine, although I don't use Windows.

Otherwise, you could run Prometheus with HTTPS, which involves setting it 
up with a DNS name and certificate (e.g. via LetsEncrypt).  Or maybe your 
browser would accept a self-signed certificate, again depending on what 
policies have been applied to it.
 
Now i face the issue that the prometheus data is not scraped by itself.
I get:
                "scrapePool": "prometheus",
                "scrapeUrl": "http://10.xx.x.2:9090/metrics";,
                "globalUrl": "http://10.x.x.2:9090/metrics";,
                "lastError": "server returned HTTP status 401 Unauthorized",
                "lastScrape": "2023-01-10T11:35:54.483356541+01:00",
                "lastScrapeDuration": 0.000457087,
                "health": "down",
                "scrapeInterval": "5s",
                "scrapeTimeout": "5s"
I did include basic_auth in the prometheus config.

scrape_configs:
  - job_name: 'prometheus'
    basic_auth:
      username: 'waardd'
      password: '$2a$12$A/andsometextwcqYNREaAIIill2'

The password is wrong.  What you have to put there is the actual plaintext 
password (which gets sent over the wire, the same as you would type into 
Firefox) - not the hash of the password.

The server side needs only the hash, because it takes the plaintext 
password received over the wire, hashes it, and compares it to the saved 
hash.

But if you *send* the hash over the wire, then it will take a hash of the 
hash, which is wrong.

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/94ca2d18-c436-48a8-8e27-4ae4e3abf563n%40googlegroups.com.

Reply via email to