^^^^^^^^^^^^^
This version contains all fixes up to version 1.3.2.
Released: 2023-03-27
**Incompatible changes:**
* The label value definitions in the metric definition file are now interpreted
as Jinja2 expressions and no longer with the special syntax used before.
This is an incompatible change and requires updating the metric definition
file accordingly. The example metric definition file provided with the package
has been updated accordingly. If you have used the example file unchanged,
you only need to use the new version of the file. If you have used your own
version of the metric definition file, you need to update it. For
understanding the changes and what to update, compare the old and new version
of the example metric definition file.
* The extra label value definitions in the HMC credentials file are now
interpreted as Jinja2 expressions and no longer as literals.
This is an incompatible change and requires updating your HMC credentials file
in case you used the 'extra_labels' property in there.
The change to make is to put the literal label values into nested double and
single quotes.
Example old definition in the file::
extra_labels:
- name: hmc
value: MYHMC1
Corresponding new definition in the file::
extra_labels:
- name: hmc
value: "'MYHMC1'"
* Changed the names of exported metrics with unit Watt from '\*_watts' to
'\*_watt':
- zhmc_cpc_power_watts -> zhmc_cpc_power_watt
- zhmc_cpc_power_cord{C}_phase_{P}_watts -> zhmc_cpc_power_cord{C}_phase_{P}_watt
**Bug fixes:**
* Fixed that not using the `--log` option resulted in an error message
about invalid use of the `--log-comp` option. (issue 234)
* Fixed an erroneous timezone offset in log timestamps. (issue 241)
* Fixed the log entry for version 1.3.0 that showed an incorrect new timestamp
format.
* Fixed a flake8 AttributeError when using importlib-metadata 5.0.0 on
Python >=3.7, by pinning importlib-metadata to <5.0.0 on these Python
versions.
* Test: Fixed install error of Python 2.7, 3,5, 3,6 on Ubuntu in GitHub Actions.
* Fixed new issues of Pylint 2.16. Fixed versions of Pylint dependents and their
Python versions.
* Added missing packages (pip_check_reqs, pipdeptree) to be checked for their
dependencies in minimum-constraints.txt.
* Fixed CBP related metrics in classic mode CPCs in HMC 2.16. These metrics
were removed in z16 but the metric definition file tried to export them,
leading to a failure with z16 CPCs in classic mode. This was fixed by
exporting these metrics only if the CPC has the SE version that supports them.
* Fixed the '\*_central_memory_mib' and '\*_expanded_memory_mib' metrics of
LPARs of classic mode CPCs that caused the exporter to fail.
* Updated the minimum version of zhmcclient to 1.7.0 to pick up a fix for
cases where a CPC resource is not found (may happen on older HMCs such as
2.14). Changed error handling to tolerate that case.
**Enhancements:**
* Added support for labels on single metric definitions, for defining how the
Prometheus metric value should be interpreted. A `value` lebel can define
a string-typed property value that should be used instead. This has been
used to show the original staus values, e.g. as `value="operating"`.
A `valuetype` label can define that the floating point value of the
Prometheus metric should be interpreted as a boolean or integer value. This
has been used for any boolean metrics. (issue 224)
* Simplified release process by adding a new GitHub Actions workflow publish.yml
to build and publish to PyPI
* Added exporter and zhmcclient version and verbosity level to log.
* When enabling auto-update for a resource fails, the exporter will now record
an error log message that the resource is ignored, but will otherwise
continue with its operation. Previously, it terminated in such a case.
* Docs: Added sections on HMC setup and setup of firewalls and proxies that
may be between you and the HMC. (issues 260 and 261)
* Added missing environments to weekly full tests (Python 3.5,3.6 on Windows
and MacOS).
* Added some critical environments to normal PR tests (Python 3.10/min on
Windows).
* Changed to using the 'build' package for building the distribution archives
instead of 'setup.py' commands, following the recommendation of the Python
packaging community
(see https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html).
* The label value definitions in the metric definition file are now interpreted
as Jinja2 expressions and no longer with the special keyword syntax used
before. This is an incompatible change for the metric definition file, see the
corresponding item in the incompatible changes section of this change log.
The example metric definition file provided with the package has been updated
accordingly.
* The extra label value definitions in the HMC credentials file are now
interpreted as Jinja2 expressions and no longer as just literals. This is an
incompatible change for the HMC credentials file, see the corresponding
item in the incompatible changes section of this change log.
The example HMC credentials file provided with the package has been updated
accordingly.
* Added support for conditional exporting of single metrics based on the
HMC and SE/CPC version, by adding an 'if' property to the metric definition in
the metric definition file that can specify a Python expression using
the 'hmc_version' and 'se_version' variables. Used that capability on CBP
related metrics that were added in z14 and removed in z16 to specify the
supported SE version range.
* Made handling of runtime errors more tolerant for properties that are
not present in certain cases.
* Docs: Added a link to the description of Jinja2 expressions.
* Added labels to all 'zhmc_cpc_power_cord\*' metrics:
- 'cord' - line cord name (as reported in metric 'linecord-eight-name')
- 'cordid' - line cord ID (1, 2, ..., 8)
- 'phase' - line cord phase (A, B, C)
* Added support for Python 3.11.
* Improved and shortened the error message for validation errors in the
metric definition file and HMC credentials file. As part of that, increased
the minimum version of the jsonschema package to 3.2.0 and of the pyrsistent
package to 0.17.3 on Python<=3.6 and 0.18.1 on Python>=3.7.
* Added a check for consistency of items in metrics and metric_groups in
the metric definition file.
**Cleanup:**
* Addressed issues in test workflow reported by Github Actions. (issue 264)
* Increased minimum versions of pip, setuptools, wheel to more recent versions.
* Changed the names of exported metrics with unit Watt from '\*_watts' to
'\*_watt', for consistency:
- zhmc_cpc_power_watts -> zhmc_cpc_power_watt
- zhmc_cpc_power_cord{C}_phase_{P}_watts -> zhmc_cpc_power_cord{C}_phase_{P}_watt