New graphs

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jurgen
Posts: 7
Joined: Mon Jun 17, 2013 11:06 pm

New graphs

Post 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!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: New graphs

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
jurgen
Posts: 7
Joined: Mon Jun 17, 2013 11:06 pm

Re: New graphs

Post by jurgen »

Thanks for the reply. So right now, the plugin is returning this:

Code: Select all

System Temperature: 53.35°C - ok
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?
jurgen
Posts: 7
Joined: Mon Jun 17, 2013 11:06 pm

Re: New graphs

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: New graphs

Post 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!
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked