nagios / apan config prob
Tedman Eng
teng at dataway.com
Wed Aug 20 05:39:29 CEST 2003
The default APAN scripts are set up to use HOSTNAME, which requires a DNS
lookup every time the plugin is called. I discovered this when our internal
DNS server went down, and our apan plugins stopped working. The normal
nagios plugins use the host address, so what I did was modify APAN to use
the host address as well.
Here's what to do:
Modify apan.sh to include "HOSTADDRESS":
----------------------------------------------------------------
#Read arguments from the command-line
CHECK=$1
HOST=$2
HOSTADDRESS=$3
SVCNAME=$4
TIME=$5
WARN=$6
CRIT=$7
Modify your check_command.cfg definition to include "HOSTADDRESS":
----------------------------------------------------------------
# 'apan' command definition
define command {
command_name apan
command_line /usr/local/nagios/apan/apan.sh $ARG1$ $HOSTNAME$
$HOSTADDRESS$ $SERVICEDESC$ $TIMET$ $ARG2$ $ARG3$
}
Modify each plugin in $NAGIOS/apan/plugs to use HOSTADDRESS instead of HOST
----------------------------------------------------------------
(just search for HOST and replace with HOSTADDRESS in each plugin script)
"Matthew Wilson" <matthewwilson at dsl.pipex.com> wrote in message
news:1061314372.4156.1.camel at localhost.localdomain...
> Hmmm, thanks. I guess that would work but it is just one extra step when
> adding hosts, which I have a lot of (and more are added on a frequent
> basis)
> Matthew
>
> On Tue, 2003-08-19 at 18:25, David Clack wrote:
> > Have you put the host in your /etc/hosts file?
> > I had the same problem and this cured it.
> > Good luck.
> > Dave.
> >
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by Dice.com.
> Did you know that Dice has over 25,000 tech jobs available today? From
> careers in IT to Engineering to Tech Sales, Dice has tech jobs from the
> best hiring companies. http://www.dice.com/index.epl?rel_code=104
> _______________________________________________
> 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 Dice.com.
Did you know that Dice has over 25,000 tech jobs available today? From
careers in IT to Engineering to Tech Sales, Dice has tech jobs from the
best hiring companies. http://www.dice.com/index.epl?rel_code=104
_______________________________________________
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