Skip to content
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

hardware-exporter crashes after connecting to redfish on Dell PowerEdge R740 #109

Closed
peppepetra opened this issue Nov 16, 2023 · 1 comment · Fixed by canonical/prometheus-hardware-exporter#49
Labels
bug Something isn't working
Milestone

Comments

@peppepetra
Copy link

After setting redfish credentials on hw-observer hardware-exporter stops collecting metrics and raise the following exception:

Nov 16 16:22:40 node-9 python3[3299197]: Traceback (most recent call last):
Nov 16 16:22:40 node-9 python3[3299197]:   File "/usr/lib/python3.10/wsgiref/handlers.py", line 137, in run
Nov 16 16:22:40 node-9 python3[3299197]:     self.result = application(self.environ, self.start_response)
Nov 16 16:22:40 node-9 python3[3299197]:   File "/var/lib/juju/agents/unit-hardware-observer-4/charm/venv/prometheus_client/exposition.py", line 128, in prometheus_app
Nov 16 16:22:40 node-9 python3[3299197]:     status, headers, output = _bake_output(registry, accept_header, accept_encoding_header, params, disable_compression)
Nov 16 16:22:40 node-9 python3[3299197]:   File "/var/lib/juju/agents/unit-hardware-observer-4/charm/venv/prometheus_client/exposition.py", line 104, in _bake_output
Nov 16 16:22:40 node-9 python3[3299197]:     output = encoder(registry)
Nov 16 16:22:40 node-9 python3[3299197]:   File "/var/lib/juju/agents/unit-hardware-observer-4/charm/venv/prometheus_client/openmetrics/exposition.py", line 21, in generate_latest
Nov 16 16:22:40 node-9 python3[3299197]:     for metric in registry.collect():
Nov 16 16:22:40 node-9 python3[3299197]:   File "/var/lib/juju/agents/unit-hardware-observer-4/charm/venv/prometheus_client/registry.py", line 97, in collect
Nov 16 16:22:40 node-9 python3[3299197]:     yield from collector.collect()
Nov 16 16:22:40 node-9 python3[3299197]:   File "/var/lib/juju/agents/unit-hardware-observer-4/charm/venv/prometheus_hardware_exporter/core.py", line 114, in collect
Nov 16 16:22:40 node-9 python3[3299197]:     payloads = self.fetch()
Nov 16 16:22:40 node-9 python3[3299197]:   File "/var/lib/juju/agents/unit-hardware-observer-4/charm/venv/prometheus_hardware_exporter/collector.py", line 972, in fetch
Nov 16 16:22:40 node-9 python3[3299197]:     ) = redfish_helper.get_storage_controller_data()
Nov 16 16:22:40 node-9 python3[3299197]:   File "/var/lib/juju/agents/unit-hardware-observer-4/charm/venv/prometheus_hardware_exporter/collectors/redfish.py", line 265, in get_storage_controller_data
Nov 16 16:22:40 node-9 python3[3299197]:     storage_controllers_list: List[Dict] = self.redfish_obj.get(curr_storage_uri).dict[
Nov 16 16:22:40 node-9 python3[3299197]: KeyError: 'StorageControllers'
@dashmage
Copy link
Contributor

Fixed in this commit on prometheus-hardware-exporter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants