Can someone tell me the format of adding qpage messages into the hobbit-alerts.cfg please? I have qpage working, and sending pages from CLI, but the following line in hobbit-alerts.cfg is not working for me:
SCRIPT /usr/local/bin/qpage userid FORMAT=TEXT
TIA
Al Jeffcoat
This e-mail message and any attached files are confidential and are intended solely for the use of the addressee(s) named above. If you are not the intended recipient, any review, use, or distribution of this e-mail message and any attached files is strictly prohibited. This communication may contain material protected by Federal privacy regulations, attorney-client work product, or other privileges. If you have received this confidential communication in error, please notify the sender immediately by reply e-mail message and permanently delete the original message. To reply to our email administrator directly, send an email to: postmaster at orlandoregional.org . If this e-mail message concerns a contract matter, be advised that no employee or agent is authorized to conclude any binding agreement on behalf of Orlando Regional Healthcare by e-mail without express written confirmation by an officer of the corporation. Any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of Orlando Regional Healthcare.
Hi Al,
"Jeffcoat, Al" wrote on 14/06/2005 14:22:44:
Can someone tell me the format of adding qpage messages into the hobbit-alerts.cfg please? I have qpage working, and sending pages from CLI, but the following line in hobbit-alerts.cfg is not working for me:
SCRIPT /usr/local/bin/qpage userid FORMAT=TEXT
TIA
Al Jeffcoat
I also use qpage, but have a wrapper script like this:
#!/opt/csw/bin/bash # # Script: /home/hobbit/bin/qpage.sh # # Script get the following environment variables pre-defined so # that they can send a meaningful alert: # # BBALPHAMSG - The full text of the status log triggering the alert # ACKCODE - The "cookie" that can be used to acknowledge the alert # RCPT - The recipient, from the SCRIPT entry # BBHOSTNAME - The name of the host that the alert is about # MACHIP - The IP-address of the host that has a problem # BBSVCNAME - The name of the service that the alert is about # BBSVCNUM - The numeric code for the service. From SVCCODES definition. # BBHOSTSVC - HOSTNAME.SERVICE that the alert is about. # BBHOSTSVCCOMMAS - As BBHOSTSVC, but dots in the hostname replaced with commas # BBNUMERIC - A 22-digit number made by BBSVCNUM, MACHIP and ACKCODE. # RECOVERED - Is "1" if the service has recovered. # DOWNSECS - Number of seconds the service has been down. # DOWNSECSMSG - When recovered, holds the text "Event duration : N" where # N is the DOWNSECS value.
# # Minumum hobbit-alerts.cfg entry - # SCRIPT /home/hobbit/bin/qpage.sh support-pg FORMAT=SMS #
if [ ${RECOVERED} = 1 ]
then
STATUS="OK"
else
COLOR=echo ${BBALPHAMSG} | /usr/bin/awk ' { print $2 } '
STATUS="${COLOR} ${ACKCODE}"
fi
/usr/local/bin/qpage ${RCPT} ${BBHOSTSVC} ${STATUS}
Note that I have massaged the status code - it seems some of our on-call folk don't like "-1" as an indicator that things have recovered. It doesn't register quickly enough with the brain in the wee small hours of the morning ;-)
The corresponding line in hobbit-alert.cfg then becomes:
SCRIPT /home/hobbit/bin/qpage.sh support-pg REPEAT=60m RECOVERED FORMAT=SMS COLOR=red
"support-pg" is configured as a "pager" in the qpage.cf file.
HTH, Andy.
#####################################################################################
This email is intended for the person to whom it is addressed only. If you are not the intended recipient, do not read, copy or use the contents in any way. The opinions expressed may not necessarily reflect those of ZESPRI Group of Companies ('ZESPRI').
While every effort has been made to verify the information contained herein, ZESPRI does not make any representations as to the accuracy of the information or to the performance of any data, information or the products mentioned herein. ZESPRI will not accept liability for any losses, damage or consequence, however, resulting directly or indirectly from the use of this e-mail/attachments. #####################################################################################
Ive tried to activate the hobbitgraph.cgi debug option changing the
/etc/hobbitcgi.cfg file
hobbitgraph.cgi options
CGI_HOBBITGRAPH_OPTS="--env=/usr/local/hobbit/server/etc/hobbitserver.cfg -- debug"
Unfortunately, I couldn't see anything being logged on the log files.
Any advices?
Tx
Make sure your webserver has write access to the /var/log/hobbit/ directory.
A "chgrp www-data /var/log/hobbit; chmod g+w /var/log/hobbit/" is what I had to do. "www-data" is for Debian; it's often "nobody" on Solaris, or "apache" ....
Henrik
On Tue, Jun 14, 2005 at 11:33:07AM +0100, Fabio Flores wrote:
Ive tried to activate the hobbitgraph.cgi debug option changing the
/etc/hobbitcgi.cfg file
hobbitgraph.cgi options
CGI_HOBBITGRAPH_OPTS="--env=/usr/local/hobbit/server/etc/hobbitserver.cfg -- debug"
Unfortunately, I couldn't see anything being logged on the log files.
Any advices?
Tx
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
-- Henrik Storner
participants (4)
-
Al.Jeffcoat@orhs.org
-
Andy@zespri.com
-
fabio.flores@flytxt.com
-
henrik@hswn.dk