I need help configuring Nagios to send notifications using qpage

Potter, G M (Greg) GPotter at MarathonOil.com
Mon Dec 2 20:19:21 CET 2002


I think I may have stumbled across the answer.  I ran truss on the Nagios process and found that qpage was starting, and being killed about the time it starts dialing.  I ran the command manually and it took about 45 seconds to complete.  So I suspect Nagios is timing out on the notification and killing the job.  I have set the notification_timeout to 120 and told Nagios to re-read the cfg file with a kill -1.  Nagios still killed the qpage process in the same place so I am trying with Nagios shutdown and starting manually.

If this doesn't work, is there another place to set notification timeouts?

Greg

> -----Original Message-----
> From: Massey, Craig [mailto:craig.massey at chh.co.nz]
> Sent: Monday, December 02, 2002 1:06 PM
> To: 'chris.walker at band-x.net'; Potter, G M (Greg)
> Cc: nagios-users at lists.sourceforge.net
> Subject: RE: [Nagios-users] I need help configuring Nagios to send
> notifications using qpage
> 
> 
> It's been a while, I think with the -i flag you don't need to 
> run it as a
> daemon?
> 
> We found we had to pipe the message with the last line 
> containing only a "."
> from Nagios to qpage.
> 
> The command was 
> printf "$HOSTALIAS$ is $HOSTSTATE$\n.\n"|qpage -p $PAGERALIAS$
> 
> 
> -----Original Message-----
> From: Chris Walker [mailto:chris.walker at band-x.net]
> Sent: Tuesday, December 03, 2002 6:55 AM
> To: Potter, G M (Greg)
> Cc: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] I need help configuring Nagios to send
> notifications using qpage
> 
> 
> Hi,
> 
> Are you sure that you need the -i (interactive) flag ?
> 
> I call qpage in a similar way but with just :
> 
> command[notify-by-qpage]=echo <service message>  | 
> /usr/local/bin/qpage
> <recipient>
> 
> you need to make sure that qpage is running as a daemon 
> (qpage -q 10 to
> check spool every 10 secs)
> and that the spool directory /var/spool/qpage (or whatever you
> configured) has the correct permissions.
> 
> 
> HTH,
> 
> 
> -- 
> Chris Walker
> 
> 
> ____________________________
> 
>  UNIX Systems Administrator
>                  Band-X Ltd
> 
> ___________________________
> 
> 
> 
> 
> 
> > Here are my config scripts for e-mail and qpage:
> > 
> > define command{
> > command_name notify-by-qpage
> > command_line /bin/echo 
> "$HOSTALIAS$/$SERVICESTATE$/$SERVICEDESC$ $OUTPUT$"
> | /usr/local/bin/qpage -i -p greg
> > }
> > 
> > define command{
> > command_name notify-by-email
> > command_line /bin/echo 
> "$ARG1$\n$ARG2$\n$ARG3$\n$PERFDATA$\n$OUTPUT$" |
> /usr/bin/mailx -s '**$SERVICESTATE$ alert for 
> $HOSTALIAS$/$SERVICEDESC$ **'
> $CONTACTEMAIL$ 
> > }
> > 
> > 
> > I originally used $CONTACTPAGER$ but decided to try hard 
> coding the page
> name to see if it was getting called.
> > 
> > Here is the log entry where Nagios thinks it calls the script.
> > [1038418513] HOST NOTIFICATION:
> greg-pager;okcu30;DOWN;notify-by-qpage;CRITICAL - Plugin 
> timed out after 10
> seconds
> > 
> > Permissions on /usr/local/bin/qpage are 755.
> > 
> > If anyone can point me in the right direction here, or tell 
> me what I have
> missed I would appreciate it.  Is there a way to find the 
> output of the
> notify-by-qpage script?  That would also be helpful.
> > 
> > Thanks in Advance for your consideration of this problem.
> > 
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Get the new Palm Tungsten T 
> handheld. Power & Color in a compact size! 
> http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> 
> DISCLAIMER:  This electronic message together with any attachments is 
> confidential.  If you are not the intended recipient, do not 
> copy, disclose or 
> use the contents in any way.  Please also advise us by return 
> e-mail that you 
> have received the message and then please destroy.  Carter 
> Holt Harvey is not 
> responsible for any changes made to this message and / or any 
> attachments after 
> sending by Carter Holt Harvey.  We use virus scanning 
> software but exclude all 
> liability for viruses or anything similar in this email or 
> any attachment.
> 


-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en




More information about the Users mailing list