zhmcclient / zhmc-prometheus-exporter

A Prometheus exporter for the IBM Z HMC
Apache License 2.0
14 stars 9 forks source link

Error: Invalid 'resource' item in resource metric group storagegroup-resource in metrics file: console.storagegroup #379

Closed vmorris closed 9 months ago

vmorris commented 11 months ago

Describe the bug zhmc exporter gets to the end of enabling auto-update for LPARs, and then Errors

Sep 19 17:04:22 s390-kvm-metrics zhmc_prometheus_exporter[1192568]: Enabling auto-update for LPAR P0095FA8.L59 Sep 19 17:04:24 s390-kvm-metrics zhmc_prometheus_exporter[1192568]: Retrieving resources from the HMC for resource metric group partition-resource Sep 19 17:04:24 s390-kvm-metrics zhmc_prometheus_exporter[1192568]: Retrieving resources from the HMC for resource metric group storagegroup-resource Sep 19 17:04:24 s390-kvm-metrics zhmc_prometheus_exporter[1192568]: Error: Invalid 'resource' item in resource metric group storagegroup-resource in metrics file: console.storagegroup

Expected behavior exporter does not exit

To Reproduce Unknown.. this is a z16 machine, and I'm using the latest version v1.4.2 of the exporter.

Environment information

Command output <-- Relevant parts of the command output. If possible, with '-vv'. -->

Log file <-- If possible, attach a log file generated with '--log-comp all=debug --log exporter.log'. -->

andy-maier commented 9 months ago

Hi Vance. Sorry for the delay.

It seems you are using a metrics.yaml file from 1.5.0 dev with an exporter 1.4.2. Please fall back to the metrics.yaml file from 1.4.2 (e.g. https://github.com/zhmcclient/zhmc-prometheus-exporter/blob/stable_1.4/examples/metrics.yaml).

Let me know if that helps.

It would also be good probably to reduce the severity of the error to a warning so that the exporter would continue, and maybe to add a hint about the file version.

andy-maier commented 9 months ago

I have PRs up that change the error into a warning that is displayed, and then the exporter continues.

vmorris commented 9 months ago

Thanks @andy-maier - I just switched the yaml to the correct version and it's working well now.