Page 1 of 2
PNP from Nagios XI GUI
Posted: Fri Sep 04, 2015 5:17 pm
by r34220
I am using the check_multi plugin to monitor some SaaS services. The way that the performance data is captured is incompatible with the performance charts in Nagios XI but work find in PNP4Nagios.
check_multi_pnp.png
Is it possible to add a link or icon with a link to the pnp graphs or even a new tab within the "Service Status Detail" page?
nagiosxi_service_detail.png
Re: PNP from Nagios XI GUI
Posted: Tue Sep 08, 2015 11:12 am
by tmcdonald
This is something the devs would need to do, but I doubt they will since we have the capability to use either PNP or Highcharts for graphing. Under Admin, go to System Settings and then uncheck the "
Use Highcharts for Perfdata Graphs" box, and save the settings. This will revert to using PNP for graphs, albeit on a global scale.
Re: PNP from Nagios XI GUI
Posted: Tue Sep 08, 2015 11:23 am
by r34220
Thanks tmcdonald for the information. Updating the settings to use PNP does not display the graphs from check_multi only the perf data for check_mulit commnad itself and not the embedded checks.
Re: PNP from Nagios XI GUI
Posted: Tue Sep 08, 2015 4:30 pm
by lmiltchev
Can you show us the actual check run from the command line, along with the output of it? Also, show a screenshot of the "Advanced" tab page. Thanks!
Re: PNP from Nagios XI GUI
Posted: Wed Sep 09, 2015 3:52 pm
by r34220
lmiltchev wrote:Can you show us the actual check run from the command line, along with the output of it? Also, show a screenshot of the "Advanced" tab page. Thanks!
Code: Select all
./check_multi -f /opt/tools/nagios/libexec/multi_check/website_heartbeat.cmd --s WARN=4000 --s CRITICAL=14000 --s SITE=freescale.sciforma.net
OK - 6 plugins checked, 6 ok
[ 1] az84_Phoenix HTTPS OK: 351ms - https://freescale.sciforma.net/
[ 2] tx30_Oak_Hill HTTPS OK: 212ms - https://freescale.sciforma.net/
[ 3] zch01_China HTTPS OK: 597ms - https://freescale.sciforma.net/
[ 4] zfr11_Toulouse HTTPS OK: 489ms - https://freescale.sciforma.net/
[ 5] zin45_India HTTPS OK: 918ms - https://freescale.sciforma.net/
[ 6] zmy02_Kuala_Lumpur HTTPS OK: 1145ms - https://freescale.sciforma.net/ |check_multi::check_multi::plugins=6 time=9.002568 az84_Phoenix::check_nrpe::time=351ms;4000;14000;0; tx30_Oak_Hill::check_nrpe::time=212ms;4000;14000;0; zch01_China::check_nrpe::time=597ms;4000;14000;0; zfr11_Toulouse::check_nrpe::time=489ms;4000;14000;0; zin45_India::check_nrpe::time=918ms;4000;14000;0; zmy02_Kuala_Lumpur::check_nrpe::time=1145ms;4000;14000;0;
advancedtab.png
Thanks.
Re: PNP from Nagios XI GUI
Posted: Thu Sep 10, 2015 2:27 pm
by tmcdonald
I asked the devs about this, and we use
:: in some places as a delimiter. As your perfdata output contains that sequence in a few places, it is likely causing issues with our templating. It might be possible to write a wrapper script around check_multi that will escape the
:: sequence to
\:\: but I have not tested this. Are you decent with bash scripting? I don't have the time right at this moment, but if you can write it yourself that's great otherwise I could ask another tech if they would be willing.
Edit: To address your original point, the Actions Component can add links to the page:
https://assets.nagios.com/downloads/nag ... ponent.pdf
Edit 2: Or the check_multi plugin has some options that can affect perfdata:
http://my-plugin.de/wiki/projects/check ... on/options
See option 32
Re: PNP from Nagios XI GUI
Posted: Thu Sep 10, 2015 4:00 pm
by r34220
If someone else could help that would be great.
Re: PNP from Nagios XI GUI
Posted: Thu Sep 10, 2015 4:54 pm
by lmiltchev
Try modifying your command by adding "-r 32" to it.
Code: Select all
./check_multi -f /opt/tools/nagios/libexec/multi_check/website_heartbeat.cmd --s WARN=4000 --s CRITICAL=14000 --s SITE=freescale.sciforma.net -r 32
Remove the rrd & xml files from "/usr/local/nagios/share/perfdata/<hostname>/". Wait for 20-30 min. The perfdata should start showing up.
I tried the following command:
Code: Select all
check_multi!-f /usr/local/nagios/libexec/check_multi.cmd -r 32
My graph looks goofy as I have tons of checks...

but hichart graphs do work.
example01.PNG
Re: PNP from Nagios XI GUI
Posted: Thu Sep 10, 2015 6:01 pm
by r34220
I saw the -r 32 options but I loose where the check was done. In my case I am using multi_check to check SaaS web services throught servers around the globe so I need to show which region the perf data is from.
Re: PNP from Nagios XI GUI
Posted: Fri Sep 11, 2015 11:14 am
by lmiltchev
I see. In this case, you can try the following workaround. Make a backup of the original "check_multi" plugin.
Code: Select all
cp -p check_multi check_multi_backup
Open the plugin in a text editor, and modify the following lines (around 3890 - 3900) from this:
Code: Select all
printf "$delim%s::%s::plugins$delim=%d time=%f ",
to this:
Code: Select all
printf "$delim%s-%s-plugins$delim=%d time=%f ",
and this:
Code: Select all
printf "$delim%s_extended::check_multi_extended::count_ok$delim=%d count_warning=%d count_critical=%d count_unknown=%d overall_state=%d ",
to this:
Code: Select all
printf "$delim%s_extended-check_multi_extended-count_ok$delim=%d count_warning=%d count_critical=%d count_unknown=%d overall_state=%d ",
Note: Basically, you are substituting "::" with "-".
Remove the old rrd & xml files and wait for them to get recreated. Check your graph in about 30 min.
Did this help?