nagios postfix

Phil Dobbin phildobbin at gmail.com
Fri Mar 30 05:50:41 PDT 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 30/03/2012 11:27, Niels Dettenbach wrote:

> Am Freitag, 30. März 2012, 08:08:10 schrieben Sie:
>> As you say, cranking up large structures like postfix, procmail, etc
>> just to basically send a few emails is not desirable if one can help
>> it. msmtp is a splendid program (available on Mac Ports I found too)
>> which is more than adequate for my needs at present.
> 
> ...just in addition:
> 
> I've checked some msmtp docs 
> http://msmtp.sourceforge.net/
> and it will (!) fullfill your nagios regquirements (similiar to ssmtp i've worked often with too).
> 
> Nagios' Email stuff could be fitted typically in commands.cfg as i.e.:
> 
> 
> # 'notify-host-by-email' command definition (example)
> define command{
>         command_name    notify-host-by-email
>         command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "$
>         }
> 
> where "/bin/mail" should be substituted by the similiar msmtp command. 
> 
> Take a note about the "-s" switch - afair there is no such switch for defining a "Subject:" by option on msmtp - it might expect such things as part of your message "file" / pipe output generated by printf in this example)
> 
> 
> You may do something like (not tested):
> 
> printf "%b" "Subject: This is my testsubject\n \n and this the message body\n" | /usr/bin/msmtp your_email at your_domain
> 
> As you can see it is fully on your's what type of commands and things you want to do with nagios - email is just one of many options - nagios rocks! ~ß)

Thanks, Niels.

That's really helpful & very appreciated.

I'm steadily working through my home LAN (six machines) & three remote
VPS boxes & Nagios is going to be a great addition to the toolkit. It
really is very customizable & flexible & quite a lot of reading to start
with but that'll help me get the email side of things going.

Once again, thanks,

Cheers,

  Phil...

- -- 
But masters, remember that I am an ass.
Though it be not written down,
yet forget not that I am an ass.

	Wm. Shakespeare - Much Ado About Nothing


-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: §auto-key-locate cert pka ldap hkp://keys.gnupg.net
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPdawfAAoJEKpMeDHWT5AD4LoH/R9IGrZnYFJnDVg29LWqftzV
01k146G6FetR9dRUwxqZzEQuGTRwGpJbq7ezBe6aJDN02uv53w6eQn5tEWgwQ8A+
NXhFhUYKaPKcmMs/z1R+MndvV8ATJewVecPgLiJ/s5DbQtmYY+ChBwdC9MUlE7ZP
CCfxxPS09CsQBMCiXF1zBFaQir12356c8v2v4jRM6eXklscmKNFLpE6UjC3nH5zW
ymDykb7haF3SeJ+v2G1GFgGDjTY3RCB3OMY4OUabsBriRSMvTTMeyYyPzLVYBlif
P6dJHxO5HGeUU6NZ6Rhwf9wKTlvgXUZS0UmVuu7zrci0N1k+gStBuYYomukmtJE=
=jVLv
-----END PGP SIGNATURE-----


More information about the macports-users mailing list