mirror of
https://github.com/XuehaiPan/nvitop.git
synced 2026-05-15 14:15:55 -06:00
[GH-ISSUE #121] [BUG] Prometheus connection refused #74
Labels
No labels
api
bug
bug
cli / tui
dependencies
documentation
documentation
documentation
duplicate
enhancement
exporter
invalid
pull-request
pynvml
question
question
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/nvitop#74
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @FernandezR on GitHub (Feb 21, 2024).
Original GitHub issue: https://github.com/XuehaiPan/nvitop/issues/121
Originally assigned to: @XuehaiPan on GitHub.
Required prerequisites
What version of nvitop are you using?
1.3.2
Operating system and version
Ubuntu 22.04
NVIDIA driver version
535.154.05
NVIDIA-SMI
Python environment
3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] linux
nvidia-ml-py==12.535.133
nvitop==1.3.2
nvitop-exporter==1.3.2
Problem description
I am trying to use nvitop-exporter with prometheus but prometheus keeps getting a connection refused when trying to connect to the exporter.
Steps to Reproduce
Prometheus config
Traceback
No response
Logs
No response
Expected behavior
I expected prometheus to be able to connect on port 8000 to nvitop-exporter.
Additional context
nvitop-exporter shows no errors an says it has connected on port 8000.
@XuehaiPan commented on GitHub (Feb 21, 2024):
Hi @FernandezR, have you ever tried to use another bind address?
@FernandezR commented on GitHub (Feb 21, 2024):
I tried it, but it still doesn't work. Does it work for you?
Is my scrape config for prometheus incorrect?
Here is the command and output:
nvitop-exporter --bind-address 0.0.0.0 --port 8008
INFO: Found 1 device(s).
INFO: GPU 0: NVIDIA GeForce RTX 2060
INFO: Start the exporter on [host_ip] at http://0.0.0.0:8008/metrics.
Scrape config:
static_configs:
This is the error prometheus shows.
Get "http://0.0.0.0:8008/metrics": dial tcp 0.0.0.0:8008: connect: connection refused
@FernandezR commented on GitHub (Feb 21, 2024):
Also, I have prometheus running on docker but have no issue collecting stats from other exporters.
I can curl the metrics when the exporter is run locally but it doesn't work when I wrap in a docker image:
https://github.com/FernandezR/nvitop-Exporter-Docker
@FernandezR commented on GitHub (Feb 21, 2024):
It looks like it was the bind address that was causing an issue. I think the requests from Prometheus are coming from the docker IP address, which is being refused. I need to test a few things later to confirm that I have resolved the issue.