-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
network_ups_tools_battery_charge metric is missing when using NUT_EXPORTER_VARIABLES #54
Comments
This environment variable fixed my problem, but I still don't know why. |
Interesting. Because the default list of variables scraped includes battery.charge, I think disabling override of the ENV var is why you see it in the second case. However, I can't think of any reason why the first string you used ( I know you got it working, but if possible, sharing debug output with the first string will help demystify what may have happened. The logic to parse the list of variables is pretty simple (i.e... if one works, all should work) so I wonder if there may have been something else within the exporter that led to that missing variable. |
I used this Docker Compose file services:
nut_exporter:
container_name: nut_exporter
image: ghcr.io/druggeri/nut_exporter:latest
restart: always
ports:
- "10443:9199"
environment:
- NUT_EXPORTER_SERVER=192.168.1.90
- NUT_EXPORTER_USERNAME=monuser
- NUT_EXPORTER_PASSWORD=secret
- NUT_EXPORTER_VARIABLES="ups.load,ups.status,battery.runtime,output.voltage,ups.realpower,battery.charge"
command: ["--log.level=debug"]
networks:
- homelab-network
networks:
homelab-network:
external: true Output on the webpage as follows
Docker log output follows
I believe the key error message is here
|
I also have a similar problem to network_ups_tools_ups_status metric is missing when using NUT_EXPORTER_VARIABLES, but what I'm missing is battery.charge
I've tried switching the order, but that didn't fix the problem.
My UPS NUT output values are as follows.
If my Docker Compose is configured like this
Output as follows:
But if I don't set the
NUT_EXPORTER_VARIABLES
variableOutput as follows:
The text was updated successfully, but these errors were encountered: