Closed dauphinpasdroit closed 11 months ago
Hello,
What is the way to login to prometheus ?
I've created a web.yml into the prometheus folder, with:
basic_auth_users: admin: _{password hash}_
And added this lines into the prometheus setup in the docker-compose.yml
prometheus: image: prom/prometheus:v2.43.0 container_name: prometheus volumes: - ./prometheus:/etc/prometheus - prometheus_data:/prometheus command: - '--config.file=/etc/prometheus/prometheus.yml' - '--storage.tsdb.path=/prometheus' - '--web.console.libraries=/etc/prometheus/console_libraries' - '--web.console.templates=/etc/prometheus/consoles' - '--storage.tsdb.retention.time=200h' - '--web.config.file=/etc/prometheus/web.yml' - '--web.enable-lifecycle' restart: unless-stopped expose: - 9090 networks: - monitor-net labels: org.label-schema.group: "monitoring"
I don't think that the prometheus web file is loaded into the prometheus docker, here are the logs 👍
ts=2023-05-03T09:46:07.755Z caller=main.go:564 level=info msg="Starting Prometheus Server" mode=server version="(version=2.43.0, branch=HEAD, revision=edfc3bcd025dd6fe296c167a14a216cab1e552ee)" ts=2023-05-03T09:46:07.755Z caller=main.go:569 level=info build_context="(go=go1.19.7, platform=linux/amd64, user=root@8a0ee342e522, date=20230321-12:56:07, tags=netgo,builtinassets)" ts=2023-05-03T09:46:07.755Z caller=main.go:570 level=info host_details="(Linux 5.15.0-1037-azure #44-Ubuntu SMP Thu Apr 20 13:19:31 UTC 2023 x86_64 81920b6fcdce (none))" ts=2023-05-03T09:46:07.755Z caller=main.go:571 level=info fd_limits="(soft=1048576, hard=1048576)" ts=2023-05-03T09:46:07.755Z caller=main.go:572 level=info vm_limits="(soft=unlimited, hard=unlimited)" ts=2023-05-03T09:46:07.757Z caller=web.go:561 level=info component=web msg="Start listening for connections" address=0.0.0.0:9090 ts=2023-05-03T09:46:07.758Z caller=main.go:1005 level=info msg="Starting TSDB ..." ts=2023-05-03T09:46:07.759Z caller=tls_config.go:232 level=info component=web msg="Listening on" address=[::]:9090 ts=2023-05-03T09:46:07.759Z caller=tls_config.go:271 level=info component=web msg="TLS is disabled." http2=false address=[::]:9090 ts=2023-05-03T09:46:07.764Z caller=head.go:587 level=info component=tsdb msg="Replaying on-disk memory mappable chunks if any" ts=2023-05-03T09:46:07.772Z caller=head.go:658 level=info component=tsdb msg="On-disk memory mappable chunks replay completed" duration=7.757589ms ts=2023-05-03T09:46:07.772Z caller=head.go:664 level=info component=tsdb msg="Replaying WAL, this may take a while" ts=2023-05-03T09:46:07.826Z caller=head.go:735 level=info component=tsdb msg="WAL segment loaded" segment=0 maxSegment=4 ts=2023-05-03T09:46:07.840Z caller=head.go:735 level=info component=tsdb msg="WAL segment loaded" segment=1 maxSegment=4 ts=2023-05-03T09:46:08.059Z caller=head.go:735 level=info component=tsdb msg="WAL segment loaded" segment=2 maxSegment=4 ts=2023-05-03T09:46:08.101Z caller=head.go:735 level=info component=tsdb msg="WAL segment loaded" segment=3 maxSegment=4 ts=2023-05-03T09:46:08.101Z caller=head.go:735 level=info component=tsdb msg="WAL segment loaded" segment=4 maxSegment=4 ts=2023-05-03T09:46:08.101Z caller=head.go:772 level=info component=tsdb msg="WAL replay completed" checkpoint_replay_duration=128.102µs wal_replay_duration=329.250767ms wbl_replay_duration=200ns total_replay_duration=337.185958ms ts=2023-05-03T09:46:08.108Z caller=main.go:1026 level=info fs_type=EXT4_SUPER_MAGIC ts=2023-05-03T09:46:08.108Z caller=main.go:1029 level=info msg="TSDB started" ts=2023-05-03T09:46:08.108Z caller=main.go:1209 level=info msg="Loading configuration file" filename=/etc/prometheus/prometheus.yml ts=2023-05-03T09:46:08.113Z caller=main.go:1246 level=info msg="Completed loading of configuration file" filename=/etc/prometheus/prometheus.yml totalDuration=4.531652ms db_storage=1.9µs remote_storage=2.8µs web_handler=500ns query_engine=1.5µs scrape=275.503µs scrape_sd=72.201µs notify=36µs notify_sd=11.9µs rules=3.735443ms tracing=10.6µs ts=2023-05-03T09:46:08.113Z caller=main.go:990 level=info msg="Server is ready to receive web requests." ts=2023-05-03T09:46:08.113Z caller=manager.go:974 level=info component="rule manager" msg="Starting rule manager..."
DO you have any idea how to setup the login or to login to the prometheus UI ?
Thank you :)
Have you tried to connect by entering the IP of your machine and the port here as follows in your web browser?
[IP-VM:9090]
Hello,
What is the way to login to prometheus ?
I've created a web.yml into the prometheus folder, with:
And added this lines into the prometheus setup in the docker-compose.yml
I don't think that the prometheus web file is loaded into the prometheus docker, here are the logs 👍
DO you have any idea how to setup the login or to login to the prometheus UI ?
Thank you :)