[mrtg] help with emails for thresholds

mrtglist at keithbergen.com mrtglist at keithbergen.com
Thu Mar 20 00:53:56 CET 2008


I tried to set up using that method a long time ago and I couldn't make it
work. I ended up using a sendmail plugin for Perl, and just called a "Yes"
and "No" script when the threshold is exceeded or returned to a normal
state.
 
In windows, there is an extra issue because I had to call a .BAT file with
the three parameters, and then call the .pl script from the .BAT file. 
 
Good luck!
 
Keith.

-----Original Message-----
From: mrtg-bounces at lists.oetiker.ch [mailto:mrtg-bounces at lists.oetiker.ch]
On Behalf Of Charley Morgan
Sent: Wednesday, March 19, 2008 9:18 AM
To: mrtg at lists.oetiker.ch
Subject: [mrtg] help with emails for thresholds


I am trying to get the threshold feature to work using the new funciton of
allowing mrtg to send an email.  Here is what I have configured:
 
 
WorkDir: /var/www/html/mrtg-2/mrtg
RunAsDaemon: Yes
Interval: 5
Options[_]: growright, bits, noinfo
Unscaled[_]: dwmy
LogDir: /usr/local/mrtg-2/logs
Refresh: 300
EnableIPv6: no
ThreshDir: /usr/local/mrtg-2/thresh
ThreshMailServer: mail.megagate.com
ThreshMailSender: mrtg at megagate.com
 

##
### Interface 1 >> Descr: 'Serial0/0' | Name: 'Se0/0' | Ip: '192.168.11.1' |
Eth: '' ###
##
 
Target[cisco2620]: 9:public at 204.80.201.65:
SetEnv[cisco2620]: MRTG_INT_IP="192.168.11.1" MRTG_INT_DESCR="Multilink1"
MaxBytes[cisco2620]: 768000
Title[cisco2620]: Traffic Analysis for Corporate Router -- 6Mb
PageTop[cisco2620]: <H1>Traffic Analysis for Corporate Router -- 6Mb</H1>
Directory[cisco2620]: cisco2620
ThreshDesc[cisco2620]: Corporate Router
ThreshMaxI[cisco2620]: 192000
ThreshMailAddress[cisco2620]:  <mailto:sunspec at megagate.com>
sunspec at megagate.com


Once the threshold gets reached a file gets created in the threshold
directory called corporate.cfg.cisco2620.threshmaxI which I am guessing
means the threshold has been met.  However, I never get an email and the
servers logs don't indicate a message was ever sent.
 
Has anyone got this working or do you have to call an external program?
 
Thanks,
 
 

 ______________________________________________________ 
Charley Morgan
Internet Engineer
Megagate Broadband
 <blocked::http://www.megagate.com/> 
' Tel: (601) 450-5000 
* Email: c.morgan at megagate.com <blocked::mailto:c.morgan at megagate.com> 
______________________________________________________
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20080319/376cee81/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 6345 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/mrtg/attachments/20080319/376cee81/attachment.obj 


More information about the mrtg mailing list