RE: [Nagios-users] Monitoring a mail server

2006-02-01 Thread Robert Fitzpatrick
On Tue, 2006-01-31 at 21:38 -0600, C. Bensend wrote:
 His mailserver is on the Nagios host.  It uses amavisd.
 
 He can monitor it via check_tcp, but if amavisd is not functional,
 _he's not going to get the email alert._  Because his email isn't
 going to work.
 
 So I think what he's asking, is how to get the alert to him, if his
 email system is not fully functional.
 
 If this is correct, he could look at using a modem to page, or
 an email alert sent directly to a remote SMTP gateway, or any
 number of things.
 
 Robert, is this the problem you're trying to get across?
 

Yes, you got it, but how do I send an email alert sent directly to a
remote SMTP gateway?

-- 
Robert
-- 
Robert



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


Re: [Nagios-users] Monitoring a mail server

2006-02-01 Thread Toto Capuccino
I use nullmailer but it cant run on the same box as the one that runs amvisd2006/2/1, Robert Fitzpatrick [EMAIL PROTECTED]:
On Tue, 2006-01-31 at 21:38 -0600, C. Bensend wrote: His mailserver is on the Nagios host.It uses amavisd. He can monitor it via check_tcp, but if amavisd is not functional, _he's not going to get the email alert._Because his email isn't
 going to work. So I think what he's asking, is how to get the alert to him, if his email system is not fully functional. If this is correct, he could look at using a modem to page, or
 an email alert sent directly to a remote SMTP gateway, or any number of things. Robert, is this the problem you're trying to get across?Yes, you got it, but how do I send an email alert sent directly to a
remote SMTP gateway?--Robert--Robert---This SF.net email is sponsored by: Splunk Inc. Do you grep through log filesfor problems?Stop!Download the new AJAX search engine that makes
searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___Nagios-users mailing listNagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.::: Messages without supporting info will risk being sent to /dev/null



RE: [Nagios-users] Monitoring a mail server

2006-02-01 Thread C. Bensend

 Yes, you got it, but how do I send an email alert sent directly to a
 remote SMTP gateway?

That all depends on your mailserver setup.  Is there any way you
can bypass the spam/anti-virus to send mail directly?

Or, it could certainly be done easily enough with a shell script
that connects to a remote mailserver and delivers the alert
manually...

Benny


-- 
'And you've got 10 gig of files to put through our mail system?' I
ask, squeezing my mouse in a non-approved manner. -- BOFH, 2006-01



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


RE: [Nagios-users] Monitoring a mail server

2006-02-01 Thread Steve Shipway
  He can monitor it via check_tcp, but if amavisd is not functional, 
  _he's not going to get the email alert._  Because his email isn't 
  going to work.
...
 Yes, you got it, but how do I send an email alert sent 
 directly to a remote SMTP gateway?

If you are using amavisd, then I take it you have this sort of setup:

port 25 SMTPd  port 10024 amavisd  --- port 10025 SMTPd  deliver

although you might have missed out the first step and just had amavisd on
port 25.  If this is the case, why not configure your Nagios notification
command to inject its mail directly into the system on port 10025 rather
than the default 25?  That way you'd bypass amavisd and directly deliver.
Of course you'd still be dependent on the local smtp daemon, but amavisd
would be out of the loop.

Of course, you've probably got port 10025 locked down to localhost only (if
you're sensible :) but that shouldn't prevent Nagios from accessing it.

Steve




---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


RE: [Nagios-users] Monitoring a mail server

2006-02-01 Thread Jim Pye
Guys

Jumping in here. I use a PERL script called sendEmail available from:

http://caspian.dotconf.net/menu/Software/SendEmail/

It works from the command line and if you are interested I can give you
the nagios command .cfg entries to add.

It works on Linux, Windows and being PERL I modified the script to work
on NetWare (it uses a couple of functions that NetWare does not support)

HTH
Jim


On Wed, 2006-02-01 at 14:32 -0600, C. Bensend wrote:
 
  Yes, you got it, but how do I send an email alert sent directly to a
  remote SMTP gateway?
 
 That all depends on your mailserver setup.  Is there any way you
 can bypass the spam/anti-virus to send mail directly?
 
 Or, it could certainly be done easily enough with a shell script
 that connects to a remote mailserver and delivers the alert
 manually...
 
 Benny
 
 
-- 
Jim Pye
PyeNet Universal

email: [EMAIL PROTECTED] | Phone: +64 4 527 8284 | Fax: +64 4 528 9693
 web site: http://www.pyenet.co.nz



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


RE: [Nagios-users] Monitoring a mail server

2006-02-01 Thread Robert Fitzpatrick
On Wed, 2006-02-01 at 14:32 -0600, C. Bensend wrote:
  Yes, you got it, but how do I send an email alert sent directly to a
  remote SMTP gateway?
 
 That all depends on your mailserver setup.  Is there any way you
 can bypass the spam/anti-virus to send mail directly?
 
 Or, it could certainly be done easily enough with a shell script
 that connects to a remote mailserver and delivers the alert
 manually...
 

Thanks, how do I get Nagios to run my shell script in place of the
normal notification?

-- 
Robert



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


RE: [Nagios-users] Monitoring a mail server

2006-02-01 Thread C. Bensend

 Thanks, how do I get Nagios to run my shell script in place of the
 normal notification?

RTM.  :)

Hint:  misccommands.cfg


-- 
'And you've got 10 gig of files to put through our mail system?' I
ask, squeezing my mouse in a non-approved manner. -- BOFH, 2006-01



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


RE: [Nagios-users] Monitoring a mail server

2006-02-01 Thread Robert Fitzpatrick
On Thu, 2006-02-02 at 09:51 +1300, Jim Pye wrote:
 Guys
 
 Jumping in here. I use a PERL script called sendEmail available from:
 
 http://caspian.dotconf.net/menu/Software/SendEmail/
 
 It works from the command line and if you are interested I can give you
 the nagios command .cfg entries to add.
 

Great thanks, yes, I'd like to see the .cfg entries if you'd be so kind.


-- 
Robert



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


RE: [Nagios-users] Monitoring a mail server

2006-02-01 Thread Jim Pye
No probs

In the misccommands.cfg I added the following

# 'host-notify-by-sendEmail' send host email via PERL script
define command{
command_namehost-notify-by-sendEmail
command_line/usr/local/bin/sendEmail -f [EMAIL PROTECTED]
-t $CONTACTEMAIL$ -u Host $HOSTSTATE$ alert for $H
OSTNAME$! -s mail.pyenet.co.nz -m * Nagios  *\n\nNotification
Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState:
$HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time:
$LONGDATETIME$\n
}


This is based on the original send email on host notification default
command. I also created one for the service notification as well.

Email has munged this a bit so synopsis is:

define command{
   command_name   host-notify-by-sendEmail

These 2 are the command defining lines

The command_line below I have broken to make more readable but to work
this all has to be on one line ???

command_line  /usr/local/bin/sendEmail

This bit above will be dependant on where you copy/install the script.

-f is the email from field. This will need to changed to an email
account that the server will allow email to be sent from.

-t is the to email to field. This here uses the $CONTACTEMAILS$ macro.

-u is the subject line. Host $HOSTSTATE$ alert for $HOSTNAME$! is
directly from the original send email command.

-s is the server that the email is going to be sent to. Note that this
server must be configured to accept emails from both the -f email
account and the host that this script is running on to avoid relay
denied messages.

-m is the message content. Again taken from the original send email
command. Note that the \n's make the display a bit prettier. *
Nagios  *\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME
$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n
nDate/Time: $LONGDATETIME$\n

For other options like attachments etc. just run the sendEmail script
without any options. As the script requires a couple of mandatory
options it prints the help file.

I use this script for all sorts of purposes like emailing log files,
etc. Very handy.

And in the contacts.cfg change the
service_notification_commands   notify-by-email
host_notification_commands  host-notify-by-email

to

service_notification_commands   notify-by-sendEmail
host_notification_commands  host-notify-by-sendEmail

for each user you wish to use the sendEmail script instead of the built
in email client.


HTH
Jim


On Wed, 2006-02-01 at 16:31 -0500, Robert Fitzpatrick wrote:
 On Thu, 2006-02-02 at 09:51 +1300, Jim Pye wrote:
  Guys
  
  Jumping in here. I use a PERL script called sendEmail available from:
  
  http://caspian.dotconf.net/menu/Software/SendEmail/
  
  It works from the command line and if you are interested I can give you
  the nagios command .cfg entries to add.
  
 
 Great thanks, yes, I'd like to see the .cfg entries if you'd be so kind.
 
 
-- 
Jim Pye
PyeNet Universal

email: [EMAIL PROTECTED] | Phone: +64 4 527 8284 | Fax: +64 4 528 9693
 web site: http://www.pyenet.co.nz



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


Re: [Nagios-users] Monitoring a mail server

2006-01-31 Thread Todd Barbera
Maybe you should try check_proc instead. When you say localhost, I'm 
assuming you are referring to your Nagios server.


Todd

- Original Message - 
From: Robert Fitzpatrick [EMAIL PROTECTED]

To: Nagios nagios-users@lists.sourceforge.net
Sent: Tuesday, January 31, 2006 8:00 PM
Subject: [Nagios-users] Monitoring a mail server



I want to monitor Amavisd on localhost port 10024 with check_tcp, but if
Amavisd is down, the notification will not make it. How can I monitor a
localhost port?

--
Robert



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log 
files

for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when 
reporting any issue.

::: Messages without supporting info will risk being sent to /dev/null






---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


RE: [Nagios-users] Monitoring a mail server

2006-01-31 Thread David Johnson
Depending upon what you want to check, there are many solutions. I'm not
familiar with Amavisd, so I can't say for certain.  However it seems that
you may to look at: check_smtp, check_mailq, check_proc, and check_tcp
(among others).  You can even write your own quickly. I'm not sure I
understand, but check_tcp will notify you if it is down.  

 
 I want to monitor Amavisd on localhost port 10024 with check_tcp, but if
  Amavisd is down, the notification will not make it. How can I monitor a
  localhost port?
 
  --
  Robert




---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


RE: [Nagios-users] Monitoring a mail server

2006-01-31 Thread C. Bensend

 Depending upon what you want to check, there are many solutions. I'm not
 familiar with Amavisd, so I can't say for certain.  However it seems that
 you may to look at: check_smtp, check_mailq, check_proc, and check_tcp
 (among others).  You can even write your own quickly. I'm not sure I
 understand, but check_tcp will notify you if it is down.


 I want to monitor Amavisd on localhost port 10024 with check_tcp, but
 if
  Amavisd is down, the notification will not make it. How can I monitor
 a
  localhost port?
 
  --
  Robert

C'mon, people, pay attention to his question.  :)  Here is the way
I understand his problem (Robert, please correct me if I'm smokin'
the crack here):

His mailserver is on the Nagios host.  It uses amavisd.

He can monitor it via check_tcp, but if amavisd is not functional,
_he's not going to get the email alert._  Because his email isn't
going to work.

So I think what he's asking, is how to get the alert to him, if his
email system is not fully functional.

If this is correct, he could look at using a modem to page, or
an email alert sent directly to a remote SMTP gateway, or any
number of things.

Robert, is this the problem you're trying to get across?

Benny


-- 
'And you've got 10 gig of files to put through our mail system?' I
ask, squeezing my mouse in a non-approved manner. -- BOFH, 2006-01



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null