3. Error messages

This page further describes error messages if you have trouble understanding them. If an error is not listed here, see Reporting issues.

3.1. Permission error

Example:

$ zhmc_prometheus_exporter
Permission error. Make sure you have appropriate permissions to read from /etc/zhmc-prometheus-exporter/hmccreds.yaml.

You don’t have permission to read from a YAML file. Change the permissions with chmod, check man chmod if you are unfamiliar with it.

3.2. File not found

Example:

$ zhmc_prometheus_exporter
Error: File not found. It seems that /etc/zhmc-prometheus-exporter/hmccreds.yaml does not exist.

A required YAML file (hmccreds.yaml and metrics.yaml) does not exist. Make sure that you specify paths, relative or absolute, with -c or -m if the file is not in etc/zhmc-prometheus-exporter/. You have to copy the credentials file from the examples folder and fill in your own credentials, see Quickstart for more information.

3.3. Section not found

Example:

$ zhmc_prometheus_exporter
Section metric_groups not found in file /etc/zhmc-prometheus-exporter/metrics.yaml.

At least one of the sections metric_groups and metrics in your metrics.yaml or metrics in hmccreds.yaml is missing in its entirety. See chapter The metrics YAML file for more information.

3.4. Doesn’t follow the YAML syntax

Example:

$ zhmc_prometheus_exporter
/etc/zhmc-prometheus-exporter/metrics.yaml does not follow the YAML syntax

A YAML file you specified breaks the syntax rules of the YAML specification. If you derive your YAML files from the existing examples (see chapter Quickstart), this error should not occur, you can also check the YAML specification.

3.5. You did not specify

Example:

$ zhmc_prometheus_exporter
You did not specify the IP address of the HMC in /etc/zhmc-prometheus-exporter/hmccreds.yaml.

There is a lot of mandatory information in the two YAML files that might be missing if you improperly filled the credentials file (see Quickstart) or made bad changes to the metrics file (see The metrics YAML file).

All of these values could in some way be missing or incorrect:

In the credentials YAML file, in the section “metrics”

  • hmc, the IP address of the HMC (it must be a correct IP address as well!)
  • userid, a username for the HMC
  • password, the respective password

In the metrics YAML file, in the section “metric_groups”, for each metric group

  • prefix, the prefix for the metrics to be exported
  • fetch, specifying whether the group should be fetched (it must be one of True or False as well!)

In the metrics YAML file, in the section “metrics”, for each metric group

  • The group must also exist in the metric_groups section
  • percent, specifying whether the metric is a percent value (it must be one of True or False as well!)
  • exporter_name, the name for the exporter (minus the prefix)
  • exporter_desc, the mandatory description for the exporter

3.6. Time out

Example:

$ zhmc_prometheus_exporter
Time out. Ensure that you have access to the HMC and that you have stored the correct IP address in /etc/zhmc-prometheus-exporter/hmccreds.yaml.

There is a certain timeout threshold if the HMC cannot be found. Check that you have access to the HMC on the IP address that you specified in the credentials file.

3.7. Authentication error

Example:

$ zhmc_prometheus_exporter
Authentication error. Ensure that you have stored a correct user ID-password combination in /etc/zhmc-prometheus-exporter/hmccreds.yaml.

Wrong username or password in the credentials file. Check if you can regularly access the HMC with this username-password combniation.

3.8. Warning: Metric not found

Example:

$ zhmc_prometheus_exporter
...: UserWarning: Metric network-usage was not found. Consider adding it to your metrics.yaml.
  warnings.warn(warning_str % (metric, filename))

It might occur that within a known metric group, the HMC exposes a metric previously unknown. Some generic formatting will automatically be added, but it is recommended that you actually edit this metric in.