canonical / hardware-observer-operator

A charm to setup prometheus exporter for IPMI, RedFish and RAID devices from different vendors.
Apache License 2.0
7 stars 14 forks source link

Smartctl exporter config change for port not working #255

Closed dashmage closed 4 weeks ago

dashmage commented 1 month ago

Changing the port for the smartctl-exporter doesn't seem to be working.

Steps to reproduce

# verify that metrics are first available on the host with default port
# curl -v localhost:10201/metrics

# change to different port
juju config hardware-observer smartctl-exporter-port 10205

# try checking metrics endpoint again at the new port on the host
# curl -v localhost:10205/metrics
# no metrics on the new port and metrics are still present on the old port
dashmage commented 1 month ago

I noticed that the config_template parameter is being set for smartctl_exporter in config.py but it's not used in anywhere in service.py. For hardware-exporter, we run the exporter.render_config method which updates the config file with all the latest configuration but there's no such method defined for the SmartCtlExporter class in service.py