Page 1 of 1
New graphs
Posted: Mon Jun 17, 2013 11:14 pm
by jurgen
Hi,
I'm evaluating XI, and want to be able to graph things that aren't yet being graphed. For example, I'm getting some temperature readings out of our ReadyNAS units, but I would like to see it graphed over time. I see that with the graph templates I can choose how the data is presented, but how can I tell Nagios to put the data into the RRD (or whatever) files in the first place? Is there a howto or example I can look at? Where should I be looking?
Many thanks!
Re: New graphs
Posted: Tue Jun 18, 2013 10:04 am
by abrist
You will need to write a plugin script, or modify an existing one from the exchange to include performance data at the end of the result string. Core has a very good document on creating plugins, here is a direct link to the performance data section:
http://nagiosplug.sourceforge.net/devel ... tml#AEN201
Re: New graphs
Posted: Tue Jun 18, 2013 7:12 pm
by jurgen
Thanks for the reply. So right now, the plugin is returning this:
And if I'm reading the docs right, all I need to do is modify it so that it returns something like this:
Code: Select all
System Temperature: 53.35°C - ok|'systemp'=53.35;55;65;0;100
Then XI will magically put that data into an RRD file someplace, and display it using a graph template that I need to create.
Is that right?
Re: New graphs
Posted: Tue Jun 18, 2013 9:05 pm
by jurgen
To answer my own question: yes. That's pretty much exactly how it works. I didn't even need to make a graph template (although it would give me more control over the output, should I want that).
Nice!
Thanks.
Re: New graphs
Posted: Wed Jun 19, 2013 11:48 am
by abrist
No problem. Your output looks fine. And yes, as you found out, when you create a new check that returns perfdata, a new rrd will be created if it does not already exist. A warning though, if you change the number of metrics on a check, you will have to remove the old rrd as they are binaries and do not allow the number of datasources to changed after creation. Happy scripting!