passive checks via smtp? or similar

Marc Powell marc at ena.com
Tue Jan 11 23:29:19 CET 2005



> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of Matt Johnson
> Sent: Tuesday, January 11, 2005 2:45 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] passive checks via smtp? or similar
> 
> Hi all,
> 
> I'm trying to monitor a host the other side of a very
> restrictive firewall.
> 
> The host *can* send mail via smtp to the nagios server
> (my side). Is there a simple (and not very secure) way
> of having nagios expect regular emails from a host, or
> it registers that host as unknown or down?
> 
> I know this has flaws, but it *seems* to be all I
> have..?
> 
> Thanks for any advice to think round this one.

2 ways off the top --

Write a quick plugin that checks the maillog or mail file (or whatever
you like) for the message. Compare the receipt timestamp with whatever
logic you like and exit with the appropriate exit code (OK, ERROR,
WARNING). Execute this check as you would any other.

http://nagiosplug.sourceforge.net/developer-guidelines.html

the existing plugin check_log2.pl is likely to be usable for this task
if writing your own is not possible.

-or-

Use passive checks and freshness checks. Have the email address you send
to on your Nagios machine execute a script that simply submits the
service OK external command to Nagios via the command pipe as a passive
check. Use freshness checks to verify you've received a result in a
timely manner.

http://nagios.sourceforge.net/docs/1_0/extcommands.html
http://nagios.sourceforge.net/docs/1_0/passivechecks.html
http://nagios.sourceforge.net/docs/1_0/freshness.html

--
Marc 



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Nagios-users mailing list
Nagios-users at 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





More information about the Users mailing list