icinga2 icon indicating copy to clipboard operation
icinga2 copied to clipboard

performance data in "dictionary" format

Open btrnka63 opened this issue 3 years ago • 3 comments

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 ;)

btrnka63 avatar Apr 30 '21 07:04 btrnka63

Hello @BorisTrnka!

In which context do you need $host.perfdatadict$?

Best, AK

Al2Klimov avatar May 20 '21 16:05 Al2Klimov

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 ...

btrnka63 avatar May 20 '21 17:05 btrnka63

Hi, I'm just curious if there are any plans/considerations for implementing ... ? Thanks.

btrnka63 avatar Aug 10 '22 07:08 btrnka63