I have a check plugin with its own metrics and an “external” metric name:
The metric name “requests_per_second” is now defined in ~/lib/python3/cmk/plugins/collection/graphing/apache.py.
After converting my metrics definitions the graph tells me that the units are not compatible:
Cannot calculate graph recipes
Cannot create graph with metrics of different units 'DecimalNotation_/s_AutoPrecision_2, 1/s'
When I try to define requests_per_sec myself the web.log contains cmk_addons.plugins.ox_imageconverter.graphing.ox_imageconverter:metric_requests_noncached_images: plug-in 'requests_per_second' already defined at cmk.plugins.collection.graphing.apache:metric_requests_per_second.
Why do you make it so hard to migrate to Check API v2?
The other is in $OMD_ROOT/lib/python3/cmk/plugins/collection/graphing/apache.py in new style:
metric_requests_per_second = metrics.Metric(
name="requests_per_second",
title=Title("Requests per second"),
unit=metrics.Unit(metrics.DecimalNotation("req/s")),
color=metrics.Color.GRAY,
)
And they use different units. And it looks like the older style takes precedence. I am not able to define a unit in my new style metrics that matches the converted unit from the old style.