Page 1 of 1

Nagios Graphs

Posted: Tue Dec 08, 2015 10:19 am
by peter19x
Hello
I have a script on my Linux machine that outputs strings and a variable associated to that string.
I want to send that data to my NagiosXI server every 5 minutes, Is it possible for Nagios to take that data and create a graph with it?
Example : minute 0 >> peter=1 , jack=2. minute 5 >> peter=3,jack=10.

And what is the best way forward to do if possible?

Thanks

Re: Nagios Graphs

Posted: Tue Dec 08, 2015 5:24 pm
by rkennedy
For the performance side, here's a bit more information about it -
https://assets.nagios.com/downloads/nag ... fdata.html.
You'll need to have your script return the data in a way that works for perfdata.

To forward it you can use a passive check that reports to Nagios. Here's a link with with more information about passive checks -
https://assets.nagios.com/downloads/nag ... hecks.html

Re: Nagios Graphs

Posted: Tue Dec 08, 2015 5:25 pm
by tmcdonald
You will need to format that data in a way that Nagios can understand, and send it in as a passive check. The following two links should help a lot with this:

https://nagios-plugins.org/doc/guidelines.html#AEN200
https://assets.nagios.com/downloads/nrd ... erview.pdf

If you are using XI you already have NRDP and can skip the installation steps.

Re: Nagios Graphs

Posted: Wed Dec 09, 2015 5:48 am
by peter19x
thanks a lot! I am fairly new to nagios and those links really helped me :)

One question though, I can see the right way is to send the passive checks via nrdp, and the document says it is required to install php on my Linux machine to be able to send the information to the nrdp server, but the Linux machine doesn't have internet access and it doesn't allow any additional software to be installed on.

Is there an alternative for that?

thank

Re: Nagios Graphs

Posted: Wed Dec 09, 2015 10:35 am
by tmcdonald
Ahh, you posted this in the Nagios XI section so I assumed PHP/NRDP was already installed. NRDP is a PHP-based solution, so if you are running Core you will need to either install PHP or use NSCA to accept check results:

http://nagios.sourceforge.net/download/ ... _Setup.pdf

Can you pelase confirm whether you are using Core or XI?

Re: Nagios Graphs

Posted: Thu Dec 10, 2015 4:10 am
by peter19x
Thank you for the reply. Yes it is Nagiox xi indeed (and php is installed there) , I was referring to my remote Linux machine that will send the passive checks to nagios, as the document says I have to execute the php client script on the client in order to send the information to the nagiox/nrdp server.

Re: Nagios Graphs

Posted: Thu Dec 10, 2015 10:40 am
by rkennedy
If the script is written in PHP, then yes, you will need PHP installed on the client machine. Scripts can be written in many different languages though, so you are not just limited to PHP.

Re: Nagios Graphs

Posted: Mon Dec 14, 2015 7:31 am
by peter19x
Thank you for the reply, luckily I have found a shell script for this script.

Thank you

Re: Nagios Graphs

Posted: Mon Dec 14, 2015 10:18 am
by hsmith
Is there anything else you need assistance with in this thread?

Re: Nagios Graphs

Posted: Mon Dec 14, 2015 11:15 am
by peter19x
No thanks! Too many kind people in this forum :D