Cannot ping with APAN

Fredrik Wänglund fredrik.wanglund at datavis.se
Fri Oct 17 16:53:37 CEST 2003


Do you have the IP for the host you are trying to ping in /etc/host (or 
DNS) ??

<My opinion:>
Put IP-numbes in ONE place, /etc/hosts.
If you have IP's in Nagios, you will soon have a situation where a host 
moves and you will have different information in Nagios, /etc/hosts and DNS.
</My opinion:>

/FredrikW

Jesús Oliván wrote:
> Already ot host address put in hosts.cfg and i'm using $HOSTNAME$ in apan
> script, but it doesnt't work =(
> 
> But i can view the icon now, thx a lot!
> 
> i'm trying to execute apan.sh in cmd line and this is what it returns to me:
> 
> debian:/usr/local/nagios/etc# ../apan/apan.sh ping PDC "ping" 100 100.0,20%
> 500.0,60%
> (standard_in) 1: parse error
> PING CRITICAL - Host not found (PDC)
> 
> 
> 
> -----Mensaje original-----
> De: nagios-users-admin at lists.sourceforge.net
> [mailto:nagios-users-admin at lists.sourceforge.net]En nombre de Marcio
> Queiroz
> Enviado el: jueves, 16 de octubre de 2003 17:11
> Para: 'Jesús Oliván'; Nagios List
> Asunto: RES: [Nagios-users] Cannot ping with APAN
> 
> 
> Hi,
> 
> 1 - Apan does not use the HOSTADDRESS for ping, insted it uses the HOSTNAME
> for ping, so you have to put the address in the "hosts" file on the /etc
> directory. Use the same name you use in nagios, and this will work.
> 
> 2 - are this lines in the cgi.cfg? or are in a separte file, which the
> cgi.cfg calls ? like this :
> 
> in cgi.cfg :
> xedtemplate_config_file=/usr/local/nagios/etc/serviceextinfo.cfg
> 
> and in the serviceextinfo.cfg
> 
> 	        define serviceextinfo{
> 	        host_name               PDC
> 	        service_description     ping
> 	        notes_url
> 	/nagios/cgi-bin/apan.cgi?host=PDC&service=ping
> 	        icon_image              graph.png
> 	        icon_image_alt          View graphs
> 	}
> 
> 
> bye,
> 	Marcio Q.  Dall Agnol
> 	phone : 55-21-3873-5826
> 	Fax      : 55-21-3873-5845
> 	marcioqueiroz at vicom.com.br
> 	VICOM
> 	Net Serviços de Comunicação S/A
> 	Visite nossas páginas:
> 	Redes Corporativas: <http://www.vicom.com.br>
> 	Internet Banda Larga: <http://www.virtua.com.br>
> 	TV por Assinatura : <http://www.net.tv.br>
> 	Institucional: http://www.netservicos.com
> 
> 
> 
> 
>>----- Mensagem original -----
>>De:		Jesús Oliván [SMTP:jesusolivan at pickingpack.net]
>>Enviada em:		quinta-feira, 16 de outubro de 2003 11:12
>>Para:		Nagios List
>>Assunto:		[Nagios-users] Cannot ping with APAN
>>
>>Hi!
>>
>>i'm trying to create some ping rtt reports with apan and rrdtool. I've saw
>>at apan documentation for installing and configuring it, but i didnt
>>success. Now i've got two problems:
>>
>>1.- nagios tell me "Status Information: PING CRITICAL - Host not found
>>(PDC)" when performing ping check with apan in my host "PDC". I've tried
>>to
>>perform manual plugin check and it returned this:
>>
>>debian:/usr/local/nagios/etc# /usr/local/nagios/apan/apan.sh ping PDC ping
>>10 150.0,20% 600.0,80%
>>(standard_in) 1: parse error
>>PING CRITICAL - Host not found (PDC)
>>
>>Here is my checkcommands.cfg:
>>
>>define command {
>>        command_name                   apan
>>        command_line                   /usr/local/nagios/apan/apan.sh
>>$ARG1$
>>$HOSTNAME$ "$SERVICEDESC$" $TIMET$ $ARG2$ $ARG3$
>>}
>>
>>part of services.cfg:
>>
>># Generic service definition template
>>define service {
>>host_name                      PDC
>>service_description            ping
>>check_command                  apan!ping!100.0,20%!500.0,60%
>>name                           ping
>>use                            generic-service
>>normal_check_interval          1
>>check_period                    24x7
>>        max_check_attempts              3
>>        retry_check_interval            1
>>        contact_groups                  linux-admins
>>        notification_interval           120
>>        notification_period             24x7
>>        notification_options            w,u,c,r
>>
>>}
>>
>>and finally apan.cfg:
>>PDC;ping;/usr/local/nagios/rrd/PDC_Ping.rrd;ping;ping:LINE2;ping round
>>time;Seconds
>>
>>
>>
>>2.- Im trying to add an image linked to graphical report, but i didnt
>>success, attaching a bit of my cgi.cfg:
>>
>>        define serviceextinfo{
>>        host_name               PDC
>>        service_description     ping
>>        notes_url
>>/nagios/cgi-bin/apan.cgi?host=PDC&service=ping
>>        icon_image              graph.png
>>        icon_image_alt          View graphs
>>}
>>
>>I cannot see any icon with this configuration =(
>>
>>
>>That's all, thanks in advance for your help =)
>>
>>
>>
>>
>>
>>-------------------------------------------------------
>>This SF.net email is sponsored by: SF.net Giveback Program.
>>SourceForge.net hosts over 70,000 Open Source Projects.
>>See the people who have HELPED US provide better services:
>>Click here: http://sourceforge.net/supporters.php
>>_______________________________________________
>>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
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> SourceForge.net hosts over 70,000 Open Source Projects.
> See the people who have HELPED US provide better services:
> Click here: http://sourceforge.net/supporters.php
> _______________________________________________
> 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
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> SourceForge.net hosts over 70,000 Open Source Projects.
> See the people who have HELPED US provide better services:
> Click here: http://sourceforge.net/supporters.php
> _______________________________________________
> 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



-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise 
Linux in the Boardroom; in the Front Office; & in the Server Room 
http://www.enterpriselinuxforum.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