[mrtg] Re: Help regarding Email generation !!
Rainer Sokoll
R.Sokoll at intershop.de
Wed Feb 13 17:40:41 MET 2002
On Wed, Feb 13, 2002 at 09:19:42PM +0500, Shujaat Nazir Khan wrote:
>
> Hi Ruth
>
> I will be thnkful to you if you kindly help me as I havent used the Threshold
> stuff before.
>From my mrtg.cfg:
-----8<----
ThreshDir: /usr/local/share/it/mrtg/tmp/
[...]
ThreshMaxI[192.168.10.6-cpu]: 95
ThreshProgI[192.168.10.6-cpu]: /usr/local/share/it/mrtg/bin/mailalert.sh
ThreshProgOKI[192.168.10.6-cpu]: /usr/local/share/it/mrtg/bin/mailok.sh
-----8<----
itcentral:~ # cat /usr/local/share/it/mrtg/bin/mailalert.sh
#!/bin/sh
if [ $1 == "192.168.10.6-cpu" ] ; then
DEST="mail_addresses_here"
else
DEST="other_mail_addresses_here"
fi
( echo "load on $1 currently $3%, but should be not more than $2%."
echo "see http://itcentral.net.j.intershop.de/mrtg/$1.html ") |\
mail -s "load on $1" $DEST
itcentral:~ #
itcentral:~ # cat /usr/local/share/it/mrtg/bin/mailok.sh
#!/bin/sh
if [ $1 == "192.168.10.6-cpu" ] ; then
DEST="mail_addresses_here"
else
DEST="other_mail_addresses_here"
fi
( echo "load on $1 is good, currently $2%."
echo "see http://itcentral.net.j.intershop.de/mrtg/$1.html ") |\
mail -s "load on $1" $DEST
itcentral:~ #
On Solaris, replace mail with mailx.
If you only want to know if mrtg fails, simply add an alias for the user
running mrtg to your real email address.
HTH,
Rainer
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the mrtg
mailing list