> The latest is Prometheus 2.26. 2.24 does not support authorization:. Oh, is there any way to pass the token for authorization in v2.24, how to authenticate in v2.24 then ??
On Friday, 16 April, 2021 at 2:49:31 pm UTC+5:30 Julien Pivotto wrote: > On 16 Apr 01:57, Anoop Maurya wrote: > > Hi Julien, > > > > Thanks for your response, I'm using the *prometheus, version 2.24.1*, > This > > seems almost latest version and documentation is also available. > > However I'll try with "bearer_token" field and let you know. Please let > me > > know where to use this bearer_token ?? > > > > authorization: > > type: 'bearer_token' > > credentials: 'xxxxxxxxxxxxxx' > > > > OR > > > > authorization: > > bearer_token : 'xxxxxxxxxxxxxx' > > > > OR > > > > bearer_token : 'xxxxxxxxxxxxxx' > > This one. > > The latest is Prometheus 2.26. 2.24 does not support authorization:. > > > > > > > > > > > On Friday, 16 April, 2021 at 12:54:28 pm UTC+5:30 Julien Pivotto wrote: > > > > > You are probably using an older version of prometheus. Please upgrade > or > > > use the older bearer_token field. > > > > > > Now that the documentation in the website is versionned so your can > look > > > at the specific documentation of your release. > > > > > > Le ven. 16 avr. 2021 ą 09:22, Anoop Maurya <[email protected]> a > > > écrit : > > > > > >> Hi All, > > >> > > >> added the authorization section in the below config and it's getting > > >> failed on configuration reload: > > >> > > >> *Configuration Section:* > > >> - job_name: 'kube-metrics' > > >> scrape_interval: 10s > > >> metrics_path: /metrics > > >> scheme: https > > >> tls_config: > > >> insecure_skip_verify: true > > >> authorization: > > >> type: 'Bearer' > > >> credentials: 'xxxxxxxxxxxxxx' > > >> static_configs: > > >> - targets: ['ip:port','ip:port'] > > >> > > >> *Error:* > > >> > > >> > *______________________________________________________________________________________* > > >> Apr 16 06:42:57 vm-prd-monms-001 prometheus[28617]: level=error > > >> ts=2021-04-16T06:42:57.882Z caller=main.go:668 msg="Error reloading > config" > > >> err="couldn't load configuration > > >> (--config.file=\"/etc/prometheus/prometheus.yml\"): parsing YAML file > > >> /etc/prometheus/prometheus.yml: yaml: unmarshal errors:\n line 51: > field > > >> authorization not found in type config.ScrapeConfig" > > >> Apr 16 06:50:46 vm-prd-monms-001 prometheus[28617]: level=info > > >> ts=2021-04-16T06:50:46.247Z caller=main.go:887 msg="Loading > configuration > > >> file" filename=/etc/prometheus/prometheus.yml > > >> Apr 16 06:50:46 vm-prd-monms-001 prometheus[28617]: level=error > > >> ts=2021-04-16T06:50:46.248Z caller=main.go:668 msg="Error reloading > config" > > >> err="couldn't load configuration > > >> (--config.file=\"/etc/prometheus/prometheus.yml\"): parsing YAML file > > >> /etc/prometheus/prometheus.yml: yaml: unmarshal errors:\n line 52: > field > > >> authorization not found in type config.ScrapeConfig" > > >> Apr 16 07:00:21 vm-prd-monms-001 prometheus[28617]: level=info > > >> ts=2021-04-16T07:00:21.869Z caller=compact.go:507 component=tsdb > msg="write > > >> block" mint=1618545600000 maxt=1618552800000 > > >> ulid=01F3CQNCKYYYJSDYBW0BXZC2TM duration=21.615032011s > > >> Apr 16 07:00:22 vm-prd-monms-001 prometheus[28617]: level=info > > >> ts=2021-04-16T07:00:22.709Z caller=main.go:887 msg="Loading > configuration > > >> file" filename=/etc/prometheus/prometheus.yml > > >> Apr 16 07:00:22 vm-prd-monms-001 prometheus[28617]: level=error > > >> ts=2021-04-16T07:00:22.711Z caller=main.go:668 msg="Error reloading > config" > > >> err="couldn't load configuration > > >> (--config.file=\"/etc/prometheus/prometheus.yml\"): parsing YAML file > > >> /etc/prometheus/prometheus.yml: yaml: unmarshal errors:\n line 52: > field > > >> authorization not found in type config.ScrapeConfig" > > >> Apr 16 07:00:22 vm-prd-monms-001 prometheus[28617]: level=info > > >> ts=2021-04-16T07:00:22.902Z caller=head.go:824 component=tsdb > msg="Head GC > > >> completed" duration=1.027801667s > > >> Apr 16 07:00:24 vm-prd-monms-001 prometheus[28617]: level=info > > >> ts=2021-04-16T07:00:24.309Z caller=checkpoint.go:95 component=tsdb > > >> msg="Creating checkpoint" from_segment=7429 to_segment=7445 > > >> mint=1618552800000 > > >> Apr 16 07:00:50 vm-prd-monms-001 prometheus[28617]: level=info > > >> ts=2021-04-16T07:00:50.452Z caller=head.go:921 component=tsdb > msg="WAL > > >> checkpoint complete" first=7429 last=7445 duration=26.143957718s > > >> > > >> > > >> not getting what's wrong in this can some one please help in this ? > > >> > > >> Thanks and regards > > >> Anoop > > >> > > >> -- > > >> 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/c7b857d4-1f73-4716-990b-8de3bf855540n%40googlegroups.com > > > >> < > https://groups.google.com/d/msgid/prometheus-users/c7b857d4-1f73-4716-990b-8de3bf855540n%40googlegroups.com?utm_medium=email&utm_source=footer > > > > >> . > > >> > > > > > > > -- > > 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/fe9174b2-9f92-43f7-b108-014dd926c20bn%40googlegroups.com > . > > > -- > Julien Pivotto > @roidelapluie > -- 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/ec5f8b9b-06f0-4573-bc83-bc3919f5021bn%40googlegroups.com.

