Thursday, October 02, 2008

Nagiosgraph extra mappings for NSClient++ and NetBackup

In order to get more out of our Nagios, I installed nagiosgraph to create graphs of our service states. The only problem was it didn't generate graphics for the NSC++ client data. So I had to create some mapping for that data, so here's the mapping


# Service type: CPU LOAD
# output: CPU Load 2% (5 min average) 3% (15 min average) 2% (59 min average)
/output:.*CPU Load ([.0-9]+)% \([^\)]+\) ([.0-9]+)% \([^\)]+\) ([.0-9]+)%/
and push @s, [ load,
[ avg1min, GAUGE, $1 ],
[ avg5min, GAUGE, $2 ],
[ avg15min, GAUGE, $3 ] ];

# Service type: single disk CHECK_NT command
# output:e:\ - total: 557.75 Gb - used: 405.85 Gb (73%) - free 151.89 Gb (27%) | 'e:\ Used Space'=405.85Gb;278.87;501.97;0.00;557.75
# perfdata:'l:\ Used Space'=1.38Gb;8.00;9.00;0.00;10.00
# Perfdata order => Used space; warning free; Critical free; unknown; total space
/perfdata:'([^ ]+) Used Space'=(\d+\.\d+).*(\d+\.\d+);(\d+\.\d+);(\d+\.\d+);(\d+\.\d+)/
and push @s, [ diskuse,
[ bytesused, GAUGE,$2 ],
[ bytesmax, GAUGE, $6 ],
[ pctfree, GAUGE, $5 ] ];


# Service type: Scartch tapes
# output Scratch count WARNING : available scratch tapes 2 less then 3
/output:Scratch count \w+ : available scratch tapes (\d+).*/
and push @s, [ scratch,
[ count, GAUGE, $1] ];

5 comments:

Anonymous said...

Hi I'm Thomas and i'm a developer of a new open source project named BrainPDM. As you can see from our web site this open source application can store performances data from Nagios and graph the values making Hourly, Daily, Weekly, Monthly and Yearly charts. If you want you can try it and give our some feedback....

Jurgen H said...

Hi Thomas, I'd like to have look at your project but I'm unable to find the website of your project, neither could I find it on sourceforge or freshmeat. Could you be so kind to point me to the website ? Thanks

Anonymous said...

I'm sorry! the web site is: http://www.brainypdm.org (on sourceforge: http://sourceforge.net/projects/brainypdm)

Carles said...

Hi

I've just installed NagiosGraph and it's fuctions with the PING fuction, but it can't work with the DISKUSEDSPACE and CPULOAD from a nsClient ...

Anonymous said...

Bonjour,
je suis nouveau ici j'aime vous lire ;)
je voulais vous remercier pour votre super site internet !
Bonne continuation
----
Nicolaseo, Rien de mieux que le referencement naturel.