<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:"\@MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span class=postbody1><font size=1 face=Verdana><span
style='font-size:9.0pt;font-family:Verdana'>Let me start off saying that I am
sorry this is so long but I wanted to include all of the necessary information:<o:p></o:p></span></font></span></p>

<p class=MsoNormal><span class=postbody1><font size=1 face=Verdana><span
style='font-size:9.0pt;font-family:Verdana'><o:p> </o:p></span></font></span></p>

<p class=MsoNormal><span class=postbody1><font size=1 face=Verdana><span
style='font-size:9.0pt;font-family:Verdana'><o:p> </o:p></span></font></span></p>

<p class=MsoNormal><span class=postbody1><font size=1 face=Verdana><span
style='font-size:9.0pt;font-family:Verdana'>OK. I am going absolutley crazy at
this point. I am getting <b><span style='font-weight:bold'>"no
output"</span></b> as a result of the following configuration for Nagios “failover”
as defined in the manual. </span></font></span><font size=1 face=Verdana><span
style='font-size:9.0pt;font-family:Verdana'><br>
<br>
<span class=postbody1>The following is a file I have created called
failover.cfg </span><br>
<br>
<span class=postbody1>#################### Host Group Listing ################ </span><br>
<span class=postbody1>define hostgroup{ </span><br>
<span class=postbody1>hostgroup_name Nagios_Master </span><br>
<span class=postbody1>alias Nagios-Master </span><br>
<span class=postbody1>contact_groups Emails_to_<st1:PersonName w:st="on">GNPC</st1:PersonName>_Staff
</span><br>
<span class=postbody1>members Nagios-Master </span><br>
<span class=postbody1>} </span><br>
<br>
<span class=postbody1>################### Host Denfinition Listing
################# </span><br>
<br>
<span class=postbody1># Generic host definition template </span><br>
<span class=postbody1>define host{ </span><br>
<span class=postbody1>name generic-host10 ; The name of this host template -
referenced in other host definitions, used for template recursion/resolution </span><br>
<span class=postbody1>check_command check-nagios </span><br>
<span class=postbody1>max_check_attempts 10 </span><br>
<span class=postbody1>notification_interval 10 </span><br>
<span class=postbody1>notification_period 24x7 </span><br>
<span class=postbody1>notification_options d,r </span><br>
<span class=postbody1>notifications_enabled 1 ; Host notifications are enabled </span><br>
<span class=postbody1>event_handler_enabled 1 ; Host event handler is enabled </span><br>
<span class=postbody1>flap_detection_enabled 1 ; Flap detection is enabled </span><br>
<span class=postbody1>process_perf_data 1 ; Process performance data </span><br>
<span class=postbody1>retain_status_information 1 ; Retain status information
across program restarts </span><br>
<span class=postbody1>retain_nonstatus_information 1 ; Retain non-status
information across program restarts </span><br>
<span class=postbody1>register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A
REAL HOST, JUST A TEMPLATE! </span><br>
<span class=postbody1>} </span><br>
<br>
<span class=postbody1>define host{ </span><br>
<span class=postbody1>use generic-host10 ; Name of host template to use </span><br>
<span class=postbody1>host_name Nagios-Master </span><br>
<span class=postbody1>alias Nagios Master </span><br>
<span class=postbody1>address 10.130.4.80 </span><br>
<span class=postbody1>} </span><br>
<br>
<br>
<span class=postbody1>################### Service Denfinition Listing
################# </span><br>
<br>
<span class=postbody1># Generic service definition template </span><br>
<span class=postbody1>define service{ </span><br>
<span class=postbody1>name generic-service10 ; The 'name' of this service
template, referenced in other service definitions </span><br>
<span class=postbody1>service_description NAGIOS </span><br>
<span class=postbody1>is_volatile 0 </span><br>
<span class=postbody1>check_period 24x7 </span><br>
<span class=postbody1>max_check_attempts 3 </span><br>
<span class=postbody1>normal_check_interval 5 </span><br>
<span class=postbody1>retry_check_interval 1 </span><br>
<span class=postbody1>contact_groups Emails_to_<st1:PersonName w:st="on">GNPC</st1:PersonName>_Staff
</span><br>
<span class=postbody1>notification_interval 15 </span><br>
<span class=postbody1>notification_period 24x7 </span><br>
<span class=postbody1>notification_options c,r </span><br>
<span class=postbody1>check_command check_nagios </span><br>
<span class=postbody1>active_checks_enabled 1 ; Active service checks are
enabled </span><br>
<span class=postbody1>passive_checks_enabled 1 ; Passive service checks are
enabled/accepted </span><br>
<span class=postbody1>parallelize_check 1 ; Active service checks should be
parallelized (disabling this can lead to major performance problems) </span><br>
<span class=postbody1>obsess_over_service 1 ; We should obsess over this
service (if necessary) </span><br>
<span class=postbody1>check_freshness 0 ; Default is to NOT check service
'freshness' </span><br>
<span class=postbody1>notifications_enabled 1 ; Service notifications are
enabled </span><br>
<span class=postbody1>event_handler_enabled 1 ; Service event handler is
enabled </span><br>
<span class=postbody1>flap_detection_enabled 1 ; Flap detection is enabled </span><br>
<span class=postbody1>process_perf_data 1 ; Process performance data </span><br>
<span class=postbody1>retain_status_information 1 ; Retain status information
across program restarts </span><br>
<span class=postbody1>retain_nonstatus_information 1 ; Retain non-status
information across program restarts </span><br>
<span class=postbody1>register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A
REAL SERVICE, JUST A TEMPLATE! </span><br>
<span class=postbody1>} </span><br>
<br>
<span class=postbody1>define service{ </span><br>
<span class=postbody1>use generic-service10 </span><br>
<span class=postbody1>host_name Nagios-Master </span><br>
<span class=postbody1>service_description HOST </span><br>
<span class=postbody1>check_command handle-master-host-event </span><br>
<span class=postbody1>normal_check_interval 5 </span><br>
<span class=postbody1>notification_interval 5 </span><br>
<span class=postbody1>} </span><br>
<br>
<span class=postbody1>define service{ </span><br>
<span class=postbody1>use generic-service10 </span><br>
<span class=postbody1>host_name Nagios-Master </span><br>
<span class=postbody1>service_description PROCESS </span><br>
<span class=postbody1>check_command handle-master-proc-event </span><br>
<span class=postbody1>normal_check_interval 5 </span><br>
<span class=postbody1>notification_interval 5 </span><br>
<span class=postbody1>} </span><br>
<br>
<br>
<span class=postbody1>HERE is the command definitions defined in
checkcommands.cfg </span><br>
<br>
<span class=postbody1>define command{ </span><br>
<span class=postbody1>command_name handle-master-host-event </span><br>
<span class=postbody1>command_line
/usr/lib/nagios/plugins/eventhandlers/redundancy-scenario1/handle-master-host-event
$HOSTSTATE$ $STATETYPE$ </span><br>
<span class=postbody1>} </span><br>
<br>
<span class=postbody1>define command{ </span><br>
<span class=postbody1>command_name handle-master-proc-event </span><br>
<span class=postbody1>command_line
/usr/lib/nagios/plugins/eventhandlers/redundancy-scenario1/handle-master-proc-event
$SERVICESTATE$ $STATETYP </span><br>
<span class=postbody1>E$ </span><br>
<span class=postbody1>} </span><br>
<br>
<br>
<span class=postbody1>In the nagios.log I have the following: </span><br>
<br>
<span class=postbody1>[1159979791] HOST NOTIFICATION:
emailuser;Nagios-Master;DOWN;host-notify-by-email;check_nagios: Unknown
argument - (null) </span><br>
<br>
<br>
<span class=postbody1>Here is what I get from the GUI for the service
identified above: </span><br>
<br>
<br>
<span class=postbody1>Nagios-Master </span><br>
<br>
<span class=postbody1>HOST </span><br>
<br>
<span class=postbody1>OK 10-04-2006 12:39:54 1d 22h 5m 17s 1/3 (No output!) </span><br>
<span class=postbody1>PROCESS </span><br>
<br>
<br>
<span class=postbody1>CRITICAL 10-04-2006 12:41:26 1d 22h 8m 41s 1/3 (No
output!) </span><br>
<br>
<br>
<o:p></o:p></span></font></p>

<p class=MsoNormal><span class=postbody1><font size=1 face=Verdana><span
style='font-size:9.0pt;font-family:Verdana'>hope that this helps someone point
me in the right direction. </span></font></span><font size=1 face=Verdana><span
style='font-size:9.0pt;font-family:Verdana'><br>
<br>
<span class=postbody1>This the dir and file contents for
handle-master-host-event </span><br>
<br>
<span class=postbody1>/usr/lib/nagios/plugins/eventhandlers/redundancy-scenario1/handle-master-host-event
</span><br>
<br>
<br>
<span class=postbody1>#!/bin/sh </span><br>
<br>
<span class=postbody1># REDUNDANCY EVENT HANDLER SCRIPT </span><br>
<span class=postbody1># Written By: Ethan Galstad (nagios@nagios.org) </span><br>
<span class=postbody1># Last Modified: 02-18-2002 </span><br>
<span class=postbody1># </span><br>
<span class=postbody1># This is an example script for implementing redundancy. </span><br>
<span class=postbody1># Read the HTML documentation on redundant monitoring for
more </span><br>
<span class=postbody1># information on what this does. </span><br>
<br>
<span class=postbody1># Location of the echo and mail commands </span><br>
<span class=postbody1>echocmd="/bin/echo" </span><br>
<span class=postbody1>mailcmd="/bin/mail" </span><br>
<br>
<span class=postbody1># Location of the event handlers </span><br>
<span class=postbody1>eventhandlerdir="/usr/lib/nagios/plugins/eventhandlers"
</span><br>
<br>
<br>
<span class=postbody1># Only take action on hard host states... </span><br>
<span class=postbody1>case "$2" in </span><br>
<span class=postbody1>HARD) </span><br>
<br>
<span class=postbody1>case "$1" in </span><br>
<span class=postbody1>DOWN) </span><br>
<span class=postbody1># The master host has gone down! </span><br>
<span class=postbody1># We should now become the master host and take </span><br>
<span class=postbody1># over the responsibilities of monitoring the </span><br>
<span class=postbody1># network, so enable notifications... </span><br>
<br>
<span class=postbody1>`$eventhandlerdir/enable_notifications` </span><br>
<br>
<br>
<span class=postbody1># Notify someone of what has happened with the original </span><br>
<span class=postbody1># master server and our taking over the monitoring </span><br>
<span class=postbody1># responsibilities. No one was notified of the master </span><br>
<span class=postbody1># host going down, since the notification would have </span><br>
<span class=postbody1># occurred while we were in standby mode, so this is a good
idea... </span><br>
<br>
<span class=postbody1>#`$echocmd "Master Nagios host is down!" |
/bin/mail -s "Master Nagios Host Is Down" <a
href="mailto:admin@somedomain.com">admin@somedomain.com</a>` </span><br>
<span class=postbody1>#`$echocmd "Slave Nagios host has entered ACTIVE
mode and taken over network monitoring responsibilities!" | $mailcmd -s
"Slave Nagios Host Has Entered ACTIVE Mode" <a
href="mailto:admin@somedomain.com">admin@somedomain.com</a>` </span><br>
<br>
<span class=postbody1>;; </span><br>
<br>
<span class=postbody1>UP) </span><br>
<span class=postbody1># The master host has recovered! </span><br>
<span class=postbody1># We should go back to being the slave host and </span><br>
<span class=postbody1># let the master host do the monitoring, so </span><br>
<span class=postbody1># disable notifications... </span><br>
<br>
<span class=postbody1>`$eventhandlerdir/disable_notifications` </span><br>
<br>
<br>
<span class=postbody1># Notify someone of what has happened. Users were </span><br>
<span class=postbody1># already notified of the master host recovery because we
</span><br>
<span class=postbody1># were in active mode at the time the recovery happened. </span><br>
<span class=postbody1># However, we should let someone know that we're
switching </span><br>
<span class=postbody1># back to standby mode... </span><br>
<br>
<span class=postbody1>#`$echocmd "The master Nagios host has recovered, so
the slave Nagios host has returned to standby mode..." | $mailcmd -s
"Slave Nagios Host Has Returned To STANDBY Mode" <a
href="mailto:admin@somedomain.com">admin@somedomain.com</a>` </span><br>
<br>
<span class=postbody1>;; </span><br>
<br>
<span class=postbody1>esac </span><br>
<span class=postbody1>;; </span><br>
<br>
<span class=postbody1>esac </span><br>
<span class=postbody1>exit 0</span><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Verdana><span style='font-size:9.0pt;
font-family:Verdana'><br>
<br>
<span class=postbody1>I am fairly new so "any" advice is appreciated.</span></span></font><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></p>

</div>

</body>

</html>