I am using the checkmk built_in metrics_info to render time values in seconds and it correctly displays a time series graph in my custom plugin.
However, values smaller than 500 ns are rendered to 0 sec. The smallest value it displays in the graph is 1 microsecond.
I noticed in the built in NTP plugin checkmk renders nanosecond values. Does checkmk uses there a different method to render the values?
As the value is stored as a float with the base unit seconds it could be that the precision of the RRD storing it is not high enough. But that’s just a guess.
def _serialize_value(x: Optional[float]) -> str:
return "" if x is None else ("%.6f" % x).rstrip("0").rstrip(".")
Older 1.5.0: cmk_base/checking.py
def _convert_perf_value(x):
if x is None:
return ""
elif isinstance(x, six.string_types):
return x
elif isinstance(x, float):
return ("%.6f" % x).rstrip("0").rstrip(".")
return str(x)
All CheckMK versions I’ve checked so far contains this conversion before submitting data to core. Most likely it might have been a design decision in the past. Does it still make sense to keep it?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.