APAN not displaying check disk results

Rob Ford r.ford at pindar.com
Fri Sep 26 15:41:02 CEST 2003


Hi All

I'm having a few problems getting APAN to output disk data collected from nagios-stat.  I have used the examples on the APAN site and so far I have the ping example working ...it shows correctly in the service detail screen and shows a selection of graphs when I click on the graph icon.  I have again used the example in the APAN documentation and although it reports the disk usage as ok in the service screen, when I click on the graph icon it displays all the text but shows red crosses instead of the graphs.
I have enclosed all the relevent files:

apan.cfg
#host ; service ; rrd-file ; args ; ds-names ; Comment ; Y-unit ; extra comm
vanguard;Ping;/usr/local/nagios/rrds/vanguard-ping.rrd;ping;ping:LINE2;Ping round-trip time;Seconds
beagle;disk_usage;/usr/local/nagios/rrds/beagle_disk_usage.rrd;/|/export/home;root:lINE2 home:LINE2;Disk usage;%;

apan.defs
#Base-directory for nagios:
NAGIOSDIR=/usr/local/nagios

#The directory where apan is installed
APANDIR=$NAGIOSDIR/apan

#The directory where Nagios plugins resides
PLUGINSDIR=$NAGIOSDIR/libexec

#The directory where Nagios .cfg-files resides
ETCDIR=$NAGIOSDIR/etc

# The directory where apans plugins resides
PLUGSDIR=$APANDIR/plugs

# The main config-file for apan
CFGFILE=$APANDIR/apan.cfg

# Path to rrdtool
RRDTOOL=/usr/local/rrdtool/bin/rrdtool

# Set DEBUG to 1 and define a DEBUGFILE to get debug-info from apan
DEBUG=1
DEBUGFILE=/tmp/apan.debug

# Set CGIDEBUG to 1 and define a CGIDEBUGFILE to get debug-info from the cgi's
CGIDEBUG=1
CGIDEBUGFILE=/tmp/apancgi.debug

# A list of colors that are used to draw the lines in the graphs.
# Beware of the syntax!!
COLS=("#ff0000" "#00ff00" "#0000ff" "#ffff00" "#ff00ff" "#00ffff" "#ff8080" "#808080" "#8080ff" )

# The type of image that is created. Valid values are PNG, GIF or GD
IMGTYPE=PNG
#

#End Configuration


checkcommands.cfg
# 'apan'  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 for APAN ping
define service {
use                                  generic-service
host_name                      beagle
service_description         disk_usage
name                               disk_usage
check_command            apan!disk!85!95
normal_check_interval    1
is_volatile                         0
check_period                   24x7
max_check_attempts       3
retry_check_interval         1
contact_groups                unix-admins
notification_interval           120
notification_period             24x7
notification_options            c,r
}


serviceextinfo.cfg

define serviceextinfo{
host_name               vanguard
service_description     Ping
notes_url               /nagios/cgi-bin/apan.cgi?host=vanguard&service=Ping
icon_image              graph.png
icon_image_alt          View graphs
}

define serviceextinfo{
host_name               beagle
service_description     disk_usage
notes_url               /nagios/cgi-bin/apan.cgi?host=beagle&service=disk_usage
icon_image              graph.png
icon_image_alt          View graphs
}

/tmp/apan.debug
Fri Sep 26 14:30:28 BST 2003 Args: ping vanguard Ping 1064583028 100.0,20% 500.0,60% Inserting 'ping' , '1064583028:' into /usr/local/nagios/rrds/vanguard-ping.rrd
Fri Sep 26 14:30:30 BST 2003 Args: disk beagle disk_usage 1064583030 85 95 Inserting 'root:home' , '1064583030:30:8' into /usr/local/nagios/rrds/beagle_disk_usage.rrd

/tmp/apancgi.debug
/usr/local/rrdtool/bin/rrdtool graph - -s -600 -a PNG -v % DEF:var0=/usr/local/nagios/rrds/beagle_disk_usage.rrd:root:AVERAGE lINE2:var0#ff0000:root: DEF:var1=/usr/local/nagios/rrds/beagle_disk_usage.rrd:home:AVERAGE LINE2:var1#00ff00:home:
CONF: beagle;disk_usage;/usr/local/nagios/rrds/beagle_disk_usage.rrd;/|/export/home;root:lINE2 home:LINE2;Disk usage;%;

I have checked through the mailing lists and changed the apan/generate.cgi's to use the #!/bin/bash shell.  I can't see anything else wrong, so any help anybody can give me would great.

Thanks

Rob




**********************************************************************
This email and its attachments are intended for the above 
named only and may be confidential.  If they have come to 
you in error, you must take no action based on them, nor 
must you copy or show them to anyone; please reply to this 
email and highlight the error.
Security Warning: Please note that this email has been 
created in the knowledge that the internet email is not a 
100% secure communications medium.  We advise that you 
understand and observe this lack of security when emailing us.
Viruses:  Although we have taken steps to ensure that this 
email and attachments are free from any virus, we advise 
that in keeping with good computing practice the recipient 
should ensure they are actually virus free.
If you have received this email in error please notify:
postmaster at pindar.com
**********************************************************************



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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