I need help configuring Nagios to send notific ations using qpage

Massey, Craig craig.massey at chh.co.nz
Mon Dec 2 20:06:18 CET 2002


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