1

Hi I have pulled the docker image of pushgateway from dockerhub, and ran it with

docker run -p 9091:9091 prom/pushgateway

its all good running fine, but when I make

http://localhost:9091/metrics

it does not ask username and password. How to set username and password for pushgateway docker image.

Note: I am running it on docker for windows, with linux containers

Thanks in advance

Michael Doubez
  • 5,937
  • 25
  • 39
Shankar S
  • 387
  • 5
  • 13
  • After understanding bit more about pushgateway, is that be default pushgateway does not include authentication of anytype, but generally people put it behind the ngix server, and nginx provides authentication, like certificate validation or something similar. – Shankar S Mar 03 '20 at 06:06

1 Answers1

0

you cant set username and password for pushgateway :

Any user with access to the Pushgateway HTTP endpoint can create, modify and delete the metrics contained within. As the Pushgateway is usually scraped with honor_labels enabled, this means anyone with access to the Pushgateway can create any time series in Prometheus.

The --web.enable-admin-api flag controls access to the administrative HTTP API, which includes functionality such as wiping all the existing metric groups. This is disabled by default. If enabled, administrative functionality will be accessible under the /api/*/admin/ paths.

see this

LinPy
  • 16,987
  • 4
  • 43
  • 57