Graph is not appearing in Nagios monitoring ...

Matthew Wilson matthewwilson at dsl.pipex.com
Tue Nov 11 19:03:18 CET 2003


Hi Rudy,
I think your problem is that the webuser can't execute rrdtool.  su to
whatever user runs cgis on your system and try
rrdtool graph blah blah blah 
from the shell
If this doesn't work then you need to check permissions on rrdtool.

Matthew Wilson.
On Tue, 2003-11-11 at 02:20, Rudy Montemayor wrote:
> Folks,
> 
> First my apologies for the long email but I wanted to make sure that I
> included all necessary info to make the problem easier to solve.
> 
> I have been reviewing some of the threads in this mailing list
> concerning graphs and have yet made it to work. Here is what I have:
> 
>  checkcommands.cfg
> # apan.sh command definition
> define command{
> command_name    apan
> command_line    /usr/local/nagios/apan/apan.sh $ARG1$ $HOSTNAME$
> "$SERVICEDESC$"
>  $TIMET$ $ARG2$ $ARG3$
> }
> 
> services.cfg
> # Service definition of Graph-Ping
> define service{
> use                     generic-service ; Name of service template to
> use
> host_name               HCISD1
> service_description     Graph-Ping
> is_volatile             0
> check_period            24x7
> max_check_attempts      10
> normal_check_interval   1
> retry_check_interval    1
> contact_groups          unix-admins
> notification_interval   120
> notification_period     24x7
> notification_options    c,r
> name                    Graph-Ping
> check_command           apan!ping!100.0,20%!500.0,60%
> }
> 
> apan.cfg
> HCISD1;Graph-Ping;/usr/local/nagios/rrd/HCISD1_Graph-Ping.rrd;ping;ping:LINE2;Graph-Ping round-trip time;Seconds
> 
> Created a RRD-file
> rrdtool create /usr/local/nagios/rrd/HCISD1_Graph-Ping.rrd -s 60
> DS:ping:GAUGE:300:0:U RRA:AVERAGE:0.5:1:50400 RRA:AVERAGE:0.5:60:43800
> 
> # ll /usr/local/nagios/rrd/HCISD1_Graph-Ping.rrd
> -rwxrwxrwx   1 nagios     nagios      754348 Nov 10 19:55
> /usr/local/nagios/rrd/HCISD1_Graph-Ping.rrd
> 
> and the rrd file appears to be updating, from looking at the
> apan.debug file:
> 
> Mon Nov 10 19:52:22 CST 2003 Args: ping HCISD1 Graph-Ping 1068515542
> 100.0,20% 500.0,60%
> Inserting 'ping' , '1068515542:0' into
> /usr/local/nagios/rrd/HCISD1_Graph-Ping.rrd
> Mon Nov 10 19:53:22 CST 2003 Args: ping HCISD1 Graph-Ping 1068515602
> 100.0,20% 500.0,60%
> Inserting 'ping' , '1068515602:0' into
> /usr/local/nagios/rrd/HCISD1_Graph-Ping.rrd
> Mon Nov 10 19:54:22 CST 2003 Args: ping HCISD1 Graph-Ping 1068515662
> 100.0,20% 500.0,60%
> Inserting 'ping' , '1068515662:0' into
> /usr/local/nagios/rrd/HCISD1_Graph-Ping.rrd
> Mon Nov 10 19:55:22 CST 2003 Args: ping HCISD1 Graph-Ping 1068515722
> 100.0,20% 500.0,60%
> Inserting 'ping' , '1068515722:0' into
> /usr/local/nagios/rrd/HCISD1_Graph-Ping.rrd
> Mon Nov 10 19:56:22 CST 2003 Args: ping HCISD1 Graph-Ping 1068515782
> 100.0,20% 500.0,60%
> Inserting 'ping' , '1068515782:0' into
> /usr/local/nagios/rrd/HCISD1_Graph-Ping.rrd
> 
> and the apancgi.debug file
> 
> CONF:
> HCISD1;Graph-Ping;/usr/local/nagios/rrd/HCISD1_Graph-Ping.rrd;ping;ping:LINE2;Graph-Ping round-trip time;Secon
> ds
> CONF:
> HCISD1;Graph-Ping;/usr/local/nagios/rrd/HCISD1_Graph-Ping.rrd;ping;ping:LINE2;Graph-Ping round-trip time;Secon
> ds
> /opt/rrd/bin/rrdtool graph - -s -600 -a PNG -v Seconds
> DEF:var0=/usr/local/nagios/rrd/HCISD1_Graph-Ping.rrd:ping:AVE
> RAGE LINE2:var0#ff0000 #00ff00 #0000ff #ffff00 #ff00ff #00ffff #ff8080
> #808080 #8080ff:ping:
> /opt/rrd/bin/rrdtool graph - -s -3600 -a PNG -v Seconds
> DEF:var0=/usr/local/nagios/rrd/HCISD1_Graph-Ping.rrd:ping:AV
> ERAGE LINE2:var0#ff0000 #00ff00 #0000ff #ffff00 #ff00ff #00ffff
> #ff8080 #808080 #8080ff:ping:
> CONF:
> HCISD1;Graph-Ping;/usr/local/nagios/rrd/HCISD1_Graph-Ping.rrd;ping;ping:LINE2;Graph-Ping round-trip time;Secon
> ds
> 
> serviceextinfo.cfg
> define serviceextinfo{
> host_name               HCISD1
> service_description     Graph-Ping
> notes_url              
> /nagios/cgi-bin/apan.cgi?host=HCISD1&service=Graph-Ping
> icon_image              graph.png
> icon_image_alt          View graphs
> }
> 
> In the cgi.cfg file I have added the line
> xedtemplate_config_file=/usr/local/nagios/etc/serviceextinfo.cfg
> 
> I have stopped and restarted nagios. Everything appears to work
> execept when I click on the service graph icon I get the following web
> page:
> 
> ole0.bmp
> 
> Rudy Montemayor
> rmontemayor at huntoil.com
> 



-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list