Is it a possibility to pass text string in performance output?

perfdata

(Rostyslav) #1

Hello,

Is it a possibility to pass text string in performance output?

'label'=value[UOM];[warn];[crit];[min];[max]

I would like to pass something like this:

memory_app_01=mysql;1024

Where:
memory_app_01 - a key
MySQL - a name of an app
1024 - memory usage

Thank in advance


(Sven Nierlein) #2

Performancedata is just text and you can pass whatever string you like. The guide is just a general advice and thats what most performance parser have implemented.
But you are free to create a new format if you have your own performance output parser and tools.
If you want to stick to the existing solutions, why not use something like:

memory_app_01_mysql=1024

(Rostyslav) #3

But if performance is text Icinga got 0,00 instead text. Could you help me understand where I was wrong?

Output from log:
perfdata = 'mem_total_app_1=616657920;amavis;;;

Icinga sees
mem_total_app_1|616,657,920.00|0.00|

I would like to visualize data about memory and CPU usage like Newrelic or ELK. It why I would like to have key_1-10 and name of app (txt) and memory usage. I have already written the bash script to collect data. Just remains visualize.


#4

Icinga2 has a parser following the developer guidelines you already showed ('label'=value[UOM];[warn];[crit];[min];[max]).

So if you want to have several metrics you have to output 'label...' for every metric like this
'php5-fpm (WWW-data)'=42000000b;;;; 'php5-fpm (root)'=13000000b 'nginx-nr-agent (nobody)'=10000000b 'nrsysmond (newrelic)'=6000000b 'getty (root)'=5000000b 'newrelic-daemon (root)'=5000000b 'nginx (www-data)'=3000000b


(Rostyslav) #5

Thank you,

However, php5-fpm. Mysql, nginx, etc… it is variables. In the case I should looking for how it visualize in Grafana.


#6

It was just to illustrate…