NagiosGrapher - Graph CPU Load check_nt

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
darkhorse
Posts: 9
Joined: Thu Jan 17, 2013 4:51 pm

NagiosGrapher - Graph CPU Load check_nt

Post by darkhorse »

Hi guys,

Im having trouble graphing CPU Load on a server in NagiosGrapher. Im running Nagios 3.4.3 on Ubuntu 12.10.

Does anyone recommend an easier 3rd party service grapher to work with?

These are my settings for CPU Load:

/usr/local/nagios/etc/objects/services.cfg

define service{
use generic-service
host_name HOSTNAME
service_description CPU Load
check_command check_nt!CPULOAD!-l 5,80,90
}

/usr/local/nagios/etc/ngraph.d/templates/standard/check_procs.cfg

define ngraph{
service_name PROCS
graph_perf_regex 5 min avg Load=([0-9]+)%
graph_value procs
graph_units procs
graph_legend Running proccesses
rrd_plottype AREA
rrd_color ff0000
}

define ngraph{
service_name PROCS
type CDEF
graph_value cdef_procs
graph_units
graph_legend
graph_calc procs
rrd_plottype LINE1
rrd_color 000000
}

define ngraph{
service_name PROCS
type GPRINT
print_source procs
print_description Current:
print_function LAST
print_format %2.2lf%s
print_eol none:2
}

define ngraph{
service_name PROCS
type GPRINT
print_source procs
print_description Average:
print_function AVERAGE
print_format %2.2lf%s
print_eol none:2
print_repeat 0
}

define ngraph{
service_name PROCS
type GPRINT
print_source procs
print_description Maximum:
print_function MAX
print_format %2.2lf%s
print_eol left:2
}

define ngraph{
service_name PROCS
type VDEF
graph_value vdef_procs_average
graph_units
graph_legend Average values
graph_calc cdef_procs,AVERAGE
rrd_plottype LINE1
rrd_color 0000ff
hide no
}

Service information:

Status Information: CPU Load 1% (5 min average)
Performance Data: '5 min avg Load'=1%;80;90;0;100

Any help would be much appreciated.

darkhorse
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: NagiosGrapher - Graph CPU Load check_nt

Post by sreinhardt »

Have you looked into pnp4nagios and npcd with rrd graphing?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
darkhorse
Posts: 9
Joined: Thu Jan 17, 2013 4:51 pm

Re: NagiosGrapher - Graph CPU Load check_nt

Post by darkhorse »

sreinhardt wrote:Have you looked into pnp4nagios and npcd with rrd graphing?
Hi sreinhardt, thank you for your reply.
No not yet. Do you recommend this method for graphing?

NagiosGrapher was the first results I got in google so I went with that but now having trouble graphing a few services.
Do you know how to fix my problem? I would like to stick to NagiosGrapher as I have already set it up but if this other method is easy to setup then im open to it.

Cheers
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: NagiosGrapher - Graph CPU Load check_nt

Post by slansing »

Those ngraph definitions are set for proc's not CPU, you need to change the data they are parsing to CPU load data. Or add in cpu ngraph definitions. PNP4NAGIOS is a great solution for graphing, it is a separate installation which you then tie Nagios perfdata into. They can both run side by side though.
Locked