Closed Hydrapozza closed 1 year ago
You want the /ipmi
endpoint. I think you've essentially gotten it right, except that it's asking for what I suspect to be the sudo password? Since you're using a container, I'd say you could just run the exporter as root and get rid of the sudo stuff? If not, you'll need to setup passwordless sudo in the container.
Thank you for your answer @bitfehler !
I'm already running the container as root. Something weird i've noticed is that I can use the targets URL like: http://localhost:9290/ipmi?target=10.104.86.45
after running the exporters. But it only returns :
Unknown module "default"
It's like the exporter isn't reading the ipmi_remote.yml
transmited in the docker-compose.yml
volume:
volumes:
- /home/osadmin/monitaur/ipmi_exporter/ipmi_remote.yml:/config.yml:ro
I suspect this because I have the same error when I execute ./ipmi_exporter
without specifying the --config.file=ipmi_remote.yml
Also it doesn't return this log when running the exporter:
time="2021-08-18T09:31:06Z" level=info msg="Loaded config file /config.yml" source="config.go:234"
Indeed. So it seems that the Dockerfile
and the docker-compose.yml
got out of sync. The container itself no longer specifies a config file, so this has to be done in the compose file. Can you add something like this:
command: /bin/ipmi_exporter --config.file /config.yml
See also the commit I just pushed to fix this.
I agree with you, it's must be a sync issue.
After modifying the docker-compose.yml
with the commit you just pushed, it returns:
monitaur-ipmi-exporter-1 | ipmi_exporter: error: unexpected /bin/ipmi_exporter, try --help
My bad, sorry. The command
arguments actually get appended to the containers entrypoint, so no need to put it in there (fix):
command: --config.file /config.yml
I think it works now, but I'm getting another error without link with the previous one :
monitaur-ipmi-exporter-1 | ts=2023-03-14T11:06:56.438Z caller=collector_chassis.go:53 level=error msg="Failed to collect chassis data" target=10.104.86.33 error="error running sudo: exec: \"sudo\": executable file not found in $PATH: "
I'm working on it, thank you @bitfehler !
Hello, I want to use the ipmi exporter as a container so here are my configs :
ipmi_remote.yml
prometheus.yml
docker-compose.yml
ARC0_targets.yml
Now the problem is about the prometheus.yml configuration. When i use /metrics, prometheus isn't returning any error but the exporter returns :
First problem i've noticed is "target=[local]" which means the exporter isn't using the target list I gave him (I guess). But also the error "could not find inband device" is weird because from the ipmi-exporter container, I'm completly able to use a typical command like "ipmi-chassis -D lanplus -h 10.104.86.45 -u root -p 'myPass' --get-chassis-status. (If i'm correct LAN_2_0 is equivalent to lanplus)
Then I tryed to change /metrics to /ipmi but i'm getting an error 400 from prometheus when scraping and the exporter isn't returning anything except the default launching logs:
When I'm executing the ipmi container, I'm also able to use FreeIPMI commands...
By using "./ipmi_exporter --config.file=ipmi_remote.yml --log.level=info" on the host And pointing to a specific target as "http://localhost:9290/ipmi?target=10.104.86.41", It ask on the CLI the password of the host then returns the good values:
If someone could explain what's wrong in my configuration and how should I correct it would be very nice :)