icinga2
icinga2 copied to clipboard
performance data in "dictionary" format
Hello,
Would it be possible to provide the perf data in "dictionary"-like format in addition to the existing one? - easier for latter programmatic processing ...
I mean, currently the perf data are stored as "rta=0.052000ms;3000.000000;5000.000000;0.000000" (e.g. when checking the last_check_result data):
performance_data = [ "rta=0.052000ms;3000.000000;5000.000000;0.000000", "pl=0%;80;100;0" ]
It would be nice to have performance data also in format like:
performance_data_dict = [ { name = "rta", value = 0.052, unit = "ms", warning = 3000, critical = 5000, min = 0 }, { name = "pl", value = 0, unit = "%", warning = 80, critical = 100, min = 0 } ]
("array of dicts" for possible multiple perf date entries)
And being able to access them as $host.perfdatadict$
thanks ;)
Hello @BorisTrnka!
In which context do you need $host.perfdatadict$
?
Best, AK
Hi,
For easier processing/integration for other tools/solutions. Parsing the standard perfdata format is a bit tricky (considering all the variances of entered/not-entered data and theirs format) ...
Being concrete: with a reference to https://icinga.com/docs/icinga-2/latest/doc/09-object-types/#objecttype-perfdatawriter and https://icinga.com/docs/icinga-2/latest/doc/14-features/#writing-performance-data-files we created own perfdata writer storing the data in "JSON-like" format. These data are further processed - in here we need to parse the perfdata to be able to store the value, unit, warn, crit, min, max values separately into reporting DB ... It would be easier (also resource saving) to have it pre-processed already ...
Hi, I'm just curious if there are any plans/considerations for implementing ... ? Thanks.