3. Trouble shooting
This section describes some issues and how to resolve them. If you encounter an issue that is not covered 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
HMC 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 Metric definition 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 Metric definition 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 HMCpassword
, 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 exportedfetch
, specifying whether the group should be fetched (it must be one ofTrue
orFalse
as well!)
In the metrics YAML file, in the section “metrics”, for each metric group
The group must also exist in the
metric_groups
sectionpercent
, specifying whether the metric is a percent value (it must be one ofTrue
orFalse
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 HMC 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 HMC credentials file. Check if you can regularly access the HMC with this username-password combination.
3.8. Warning: Skipping metric or metric group
Example:
$ zhmc_prometheus_exporter
...: UserWarning: Skipping metric group 'new-metric-group' returned by the HMC that is
not defined in the 'metric_groups' section of metric definition file metrics.yaml
warnings.warn(warning_str % (metric, filename))
$ zhmc_prometheus_exporter
...: UserWarning: Skipping metric 'new-metric' of metric group 'new-metric-group'
returned by the HMC that is not defined in the 'metrics' section of metric
definition file metrics.yaml
warnings.warn(warning_str % (metric, filename))
If the HMC implements new metrics, or if the metric definition file misses a metric or metric group, the exporter issues ths warning to make you aware of that.