[Apan-users] Re: A newbie question
Status: Beta
Brought to you by:
useless
|
From: Greg K. <wg...@sh...> - 2005-12-03 03:04:20
|
The "Apan could not find service" message means the service is not defined in the myaql database. For each service using APAN you define in Nagios, you must define an associated defination in mysql. APAN provides a tool to do so. Here is a sample of a Nagios/APAN ping service from my system:
define service{
use generic-service
host_name z3
service_description Apan ping
is_volatile 0
check_command apan-sql!ping!100.0,20%!500.0,60%
}
#
# command for APAN add on
#
define command {
command_name apan-sql
command_line /usr/local/nagios/apan-sql/apan-sql.sh $ARG1$ $HOSTNAME$ "$SERVICEDESC$" $TIMET$ $ARG2$ $ARG3$
}
[root@colossus apan-sql]# ./apanconf-sql
-------------- ApanConfig Main menu ---------------
1) Add a service
2) edit a service
3) delete a service
4) Rebuild serviceextinfo
q) quit
What do you want to do? 2
----------------- Edit a service -------------------
Hostname : z3
Services on host z3:
1) Apan ping (Track ping response)
Enter the number for the service you want to edit or 'q' to abort: 1
Configuration for service 'Apan ping' on host 'z3':
1) Hostname: z3
2) Service: Apan ping
3) Comment: Track ping response
4) Graph-Label: Time
5) Graph-Unit: Time
6) Extra args:
7) RRD-file: /usr/local/nagios/rrd/z3-Apan_ping.rrd
Wich parameter do you want to change (q to quit)?
The service in APAN must agree with the "service description" in Nagios - in this case both are "Apan ping".
I haven't used Nagios 2.x yet, but on 1.2 it was not necessary to recompile anything to get the graph icon to appear in the service detail view of Nagios. Just make sure that the extended host file created by apanconf-sql is in the right place, with the correct name and permissions.
Good luck!
Regards,
Greg King
---------------------------------------------------------------------------------
>Apan could not find service.
>I have copied and pasted the command in checkcommands.cfg file.
>define command { command_name apan-sql command_line /usr/local/nagios/apan-sql/apan-sql.sh $ARG1$ $HOSTNAME$ $SERVICEDESC$ $TIMET$ $ARG2$ $ARG3$ }
> I have made the file /usr/local/nagios/apan-sql/apan-sql.sh executable.. Is there anything
> that I
> have missed? I went through the documents many times
> and I'm sure I haven't missed out anything on installation or
> configuration part of it..
>Thanks in advance
|