Page 1 of 1

NagiosGrapher - Graph CPU Load check_nt

Posted: Mon Feb 04, 2013 5:45 pm
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

Re: NagiosGrapher - Graph CPU Load check_nt

Posted: Tue Feb 05, 2013 11:56 am
by sreinhardt
Have you looked into pnp4nagios and npcd with rrd graphing?

Re: NagiosGrapher - Graph CPU Load check_nt

Posted: Tue Feb 05, 2013 6:53 pm
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

Re: NagiosGrapher - Graph CPU Load check_nt

Posted: Wed Feb 06, 2013 10:38 am
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.