Xymon Mailing List Archive search

Howto get Hobbit to send email

5 messages in this thread

list Kim Langtved Johansen · Mon, 4 Jun 2007 14:52:40 +0200 ·
Hey,
 
I have being using Hobbit for a while.
 
But now I want it to be able to send email notifications, but I can't
get it to work.
 
I have installet postfix on my server (Ubuntu) and set it up to relay to
our main mailserver. I kan send mail from it with mutt.
 
I have tryed to set at alert up in hobbit-alerts.cfg. And I can see that
it is "sending a email.." in the /var/log/hobbit/notifications.log. But
I can also se in /var/log/syslog that it is not sending anything to my
main email server. As it do if I send with Mutt.
 
Please help me...
 
Best regards,
 
Kim Johansen
Beredskabsstyrelsen
list Rich Smrcina · Mon, 04 Jun 2007 08:03:46 -0500 ·
What is the message in syslog?  Does postfix maintain a separate log file as well?  If so, what is in it?
quoted from Kim Langtved Johansen

Kim Langtved Johansen wrote:
Hey,
 I have being using Hobbit for a while.
 But now I want it to be able to send email notifications, but I can't get it to work.
 I have installet postfix on my server (Ubuntu) and set it up to relay to our main mailserver. I kan send mail from it with mutt.
 I have tryed to set at alert up in hobbit-alerts.cfg. And I can see that it is "sending a email.." in the /var/log/hobbit/notifications.log. But I can also se in /var/log/syslog that it is not sending anything to my main email server. As it do if I send with Mutt.
 Please help me...
 Best regards,
 Kim Johansen
Beredskabsstyrelsen
-- 

Rich Smrcina
VM Assist, Inc.
Phone: XXX-XXX-XXXX
Ans Service:  XXX-XXX-XXXX
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2008 - Chattanooga - April 18-22, 2008
list Kim Langtved Johansen · Mon, 4 Jun 2007 17:39:43 +0200 ·
Hey,

My Postfix don't have it's own logfile, it's logging into my Syslog.
This text comes into my Syslog, when I send an e-mail with Mutt:

Jun  4 14:05:12 localhost postfix/pickup[4983]: F40F19B6DC: uid=0
from=<root>
Jun  4 14:05:12 localhost postfix/cleanup[6502]: F40F19B6DC:
message-id=<20070604120511.GA6475 at localhost>
Jun  4 14:05:12 localhost postfix/qmgr[4984]: F40F19B6DC:
from=<root at localhost>, size=397, nrcpt=1 (queue active)
Jun  4 14:05:12 localhost postfix/smtp[6504]: F40F19B6DC:
to=<user-e0692d31006f@xymon.invalid>, relay=MainEmailserver[MainEmailServerIP]:25,
delay=0.18, delays=0.09/0.02/0.02/0.06, $
Jun  4 14:05:12 localhost postfix/qmgr[4984]: F40F19B6DC: removed 


And then I have an alarm in Hobbit, this Appear in the notifications.log
for hobbit:

Mon Jun  4 15:02:53 2007 Server.disk (IP) user-e0692d31006f@xymon.invalid[121] 1180962173 100
Mon Jun  4 15:02:53 2007 Server.disk (IP) REPEAR=1m[121] 1180962173 100

But nothing appear in the Syslog from Postfix.

Kim.
quoted from Rich Smrcina

-----Oprindelig meddelelse-----
Fra: Rich Smrcina [mailto:user-cf452ff334e0@xymon.invalid] 
Sendt: 4. juni 2007 15:04
Til: user-ae9b8668bcde@xymon.invalid
Emne: Re: [hobbit] Howto get Hobbit to send email

What is the message in syslog?  Does postfix maintain a separate log
file as well?  If so, what is in it?

Kim Langtved Johansen wrote:
Hey,
 
I have being using Hobbit for a while.
 
But now I want it to be able to send email notifications, but I can't 
get it to work.
 
I have installet postfix on my server (Ubuntu) and set it up to relay 
to our main mailserver. I kan send mail from it with mutt.
 
I have tryed to set at alert up in hobbit-alerts.cfg. And I can see 
that it is "sending a email.." in the 
/var/log/hobbit/notifications.log. But I can also se in 
/var/log/syslog that it is not sending anything to my main email
server. As it do if I send with Mutt.
 
Please help me...
 
Best regards,
 
Kim Johansen
Beredskabsstyrelsen
--
Rich Smrcina
VM Assist, Inc.
Phone: XXX-XXX-XXXX
Ans Service:  XXX-XXX-XXXX
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2008 - Chattanooga - April 18-22, 2008
list Frank M. Ramaekers · Mon, 4 Jun 2007 10:46:31 -0500 ·
I use this script:

#!/bin/sh
#
# Author:       Gary Baluha
# Created On:   3-16-2006
# Description:  Adds a searchable subject string to SMS-formatted messages
#               to allow client-side filtering of possible duplicate alerts.
# NOTES:        BBHOSTSVC = The host affected, and the name of the alert
#               BBALPHAMSG = The full alert message (same as
#                               BBHOSTSVC [ACKCODE] if FORMAT=SMS)
#               ACKCODE = The ack code for the alert
#               BBCOLORLEVEL = The color of the alert (red, yellow, etc)
#
# REVISION HISTORY:
# =================
# Ver.  Date            Author  Notes
# ----  ----            ------  -----
# v1.0  3-16-2006       GMB     Initial creation
# v2.0  2-13-2007       GMB     Page alert now shows what is red/yellow, in
#                               addition to the name of the alert

# VARIABLES:
msg=`echo "${BBALPHAMSG}" | egrep "&yellow|&red"`
msg="\n${msg}"

# CODE:
#=======
subject="!HB ${ACKCODE}"
alert="${BBHOSTSVC} ${BBCOLORLEVEL}"
message="\n${alert}${msg}"

echo -e "${message}" | mail -s "${subject}" $RCPT


Frank M. Ramaekers Jr.
American Income Life Insurance Co.
Phone: (XXX)XXX-XXXX
XXXX Wooded Acres Dr.
Fax: (XXX)XXX-XXXX
Waco, Texas  76701
quoted from Kim Langtved Johansen


-----Original Message-----
From: Kim Langtved Johansen [mailto:user-47b2b2e5731e@xymon.invalid] 
Sent: Monday, June 04, 2007 7:53 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Howto get Hobbit to send email

Hey,
 
I have being using Hobbit for a while.
 
But now I want it to be able to send email notifications, but I can't get it to work.
 
I have installet postfix on my server (Ubuntu) and set it up to relay to our main mailserver. I kan send mail from it with mutt.
 
I have tryed to set at alert up in hobbit-alerts.cfg. And I can see that it is "sending a email.." in the /var/log/hobbit/notifications.log. But I can also se in /var/log/syslog that it is not sending anything to my main email server. As it do if I send with Mutt.
 
Please help me...
 
Best regards,
 
Kim Johansen
Beredskabsstyrelsen

This message contains information which is privileged and confidential and is solely for the use of the intended recipient.  If you are not the intended recipient, be aware that any review, disclosure, copying, distribution, or use of the contents of this message is strictly prohibited.
If you have received this in error, please destroy it immediately and notify us at user-2f780dbd82da@xymon.invalid.

This message contains information which is privileged and confidential and is solely for the use of the intended recipient.  If you are not the intended recipient, be aware that any review, disclosure, copying, distribution, or use of the contents of this message is strictly prohibited.
If you have received this in error, please destroy it immediately and notify us at user-2f780dbd82da@xymon.invalid.
list Henrik Størner · Mon, 4 Jun 2007 22:33:54 +0200 ·
quoted from Kim Langtved Johansen
On Mon, Jun 04, 2007 at 05:39:43PM +0200, Kim Langtved Johansen wrote:
And then I have an alarm in Hobbit, this Appear in the notifications.log
for hobbit:

Mon Jun  4 15:02:53 2007 Server.disk (IP) user-e0692d31006f@xymon.invalid[121] 1180962173 100
Mon Jun  4 15:02:53 2007 Server.disk (IP) REPEAR=1m[121] 1180962173 100
It tries to send an e-mail to "user-e0692d31006f@xymon.invalid". And you have a typo on line
121 of your hobbit-alerts.cfg - it should probably be "REPEAT=1m"
instead of "REPEAR=1m" (T instead of R).

Do us a favour and run
   bbcmd hobbitd_alert --test Server disk
and look for the line that says
   Mail alert with command 'mail -s "Hobbit [12345] Server:disk CRITICAL (RED)" user-e0692d31006f@xymon.invalid'

That's the exact command Hobbit uses to send the alert. Check that it
works; some systems need to have MAILCMD set to "mailx" instead of
"mail" (the default) in hobbitserver.cfg.


Regards,
Henrik