redundancy and services
Mark Dalton
mwd at cray.com
Tue Jan 20 15:19:41 CET 2004
Caution: I am new to Nagios, I just got it running (with help from the
list reading
others questions). Linux boxes and Irix boxes (next is Sun and AIX and
Crays hopefully).
I have NSCA/Nagios on the Irix boxes (I have to do more work to get
NRPE running on old
Irix), and NRPE running on Linux and Nagios 2.0 on the server (to
support the Passive
checks).
Nagios 1.1 does not support passive checks, so you need to upgrade to
Nagios 2.0.
The status would probably be incorrect because if you have
'retain_status_information'
set to '1'. And if it does not get a update, it is assumed to be down.
If this is
truely a passive service. You may want to set this to be a active
service from
the server versus passive (nsca). I have a template for 'local-server'
versus
'remote-servers'.
So for the servers nagios.cfg for the remote servers I have:
active_checks_enabled 0
retain_status_information 0
# Generic service definition template
define service{
name local-server ; The 'name' of
this service template, referenced in other service definitions
active_checks_enabled 1 ; Active service checks
are enabled
passive_checks_enabled 1 ; Passive service checks
are enabled/accepted
parallelize_check 1 ; Active service checks
should be parallelized (disabling this can lead to major performance
problems)
obsess_over_service 0 ; We should obsess over
this service (if necessary)
check_freshness 0 ; Default is to NOT
check service 'freshness'
notifications_enabled 1 ; Service notifications
are enabled
event_handler_enabled 1 ; Service event handler
is enabled
flap_detection_enabled 1 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status
information across program restarts
retain_nonstatus_information 1 ; Retain non-status
information across program restarts
register 0 ;
}
# Generic service definition template
define service{
name remote-servers ; The 'name' of
this service template, referenced in other service definitions
active_checks_enabled 0 ; Active service checks
are enabled
passive_checks_enabled 1 ; Passive service checks
are enabled/accepted
parallelize_check 0 ; Active service checks
should be parallelized (disabling this can lead to major performance
problems)
obsess_over_service 0 ; We should obsess over
this service (if necessary)
check_freshness 0 ; Default is to NOT
check service 'freshness'
notifications_enabled 1 ; Service notifications
are enabled
event_handler_enabled 1 ; Service event handler
is enabled
flap_detection_enabled 1 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 0 ; Retain status
information across program restarts
retain_nonstatus_information 1 ; Retain non-status
information across program restarts
register 0 ;
}
For the slave I have pretty much the same as Basile sent to you.
Mark
Basile Mathieu wrote:
> hi
> thanks for your answer
> here is my config for the redundancy
>
> i have obsess_over_services= 1
> oscp_command=submit_check_result_via_nsca
>
> in nagos.cfg
>
> i have the check_external_comand = 1
>
> in the nagios.cfg of the slave .
>
> here is the script submit_check_result_via_nsca
>
>
>
> #!/bin/sh
>
> # SUBMIT_CHECK_RESULT_VIA_NSCA
> # Written by Ethan Galstad (nagios at nagios.org)
> # Last Modified: 07-19-2001
> #
> # This script will send passive check results to the
> # nsca daemon that runs on the central Nagios server.
> # If you simply want to submit passive checks from the
> # same machine that Nagios is running on, look at the
> # submit_check_result script.
> #
> # Arguments:
> # $1 = host_name (Short name of host that the service is
> # associated with)
> # $2 = svc_description (Description of the service)
> # $3 = return_code (An integer that determines the state
> # of the service check, 0=OK, 1=WARNING, 2=CRITICAL,
> # 3=UNKNOWN).
> # $4 = plugin_output (A text string that should be used
> # as the plugin output for the service check)s
> #
> #
> # Note:
> # Modify the NagiosHost parameter to match the name or
> # IP address of the central server that has the nsca
> # daemon running.
>
> # Under Linux, the -e option to /bin/echo enables the
> # interpretation of tab and newline characters.
> echocmd="/bin/echo -e"
>
> NscaBin="/usr/sbin/send_nsca"
> NscaCfg="/etc/nagios/send_nsca.cfg"
> NagiosHost="ip_of_slave"
>
> # create the command line to add to the command file
> cmdline="$1;$2;$3;$4"
>
> $echocmd "$1\t$2\t$3\t$4\n" | $NscaBin $NagiosHost -c $NscaCfg
>
> # EOF
>
>
>
>
>
> A 12:27 20/01/2004 +0200, vous avez écrit :
>
>> Hi Basile
>>
>> What is the command you using to return the values.
>>
>> the problem might be with the exit codes returned to nagios.
>>
>>
>>
>> On Tue, 2004-01-20 at 10:54, Basile Mathieu wrote:
>> > i have nagios 1.1 and plugins 1.3 on two servers which are redundant.
>> >
>> > i use nsca to synchronize the servers and status of hosts is the same
>> > but i have defined ping as a services and the services appears OK even
>> > if the machine is down
>> > and what is strange is that status information is good :" CRITICAL
>> plugin
>> > timed out after 10 second "
>> >
>> > if someone can tell me why the status of services is ok when
>> machine is down.
>> > thanks
>> > basile
>> >
>> >
>> >
>> > -------------------------------------------------------
>> > The SF.Net email is sponsored by EclipseCon 2004
>> > Premiere Conference on Open Tools Development and Integration
>> > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
>> > http://www.eclipsecon.org/osdn
>> > _______________________________________________
>> > 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
>
>
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> 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
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
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