[mrtg] Re: Thresholds
Michael Markstaller
mm at elabnet.de
Tue Apr 8 19:05:06 MEST 2003
yes, although I'm no real perl-guru, just replace
$emailuser = "root";
with
$emailuser = "user\@domain.com";
Note the backslash in front of the special @-char..
Michael
-----Original Message-----
From: Baker, Brendon [mailto:BBaker at fnb.co.za]
Sent: Tuesday, April 08, 2003 2:51 PM
To: Michael Markstaller; 'mrtg at list.ee.ethz.ch'
Subject: RE: [mrtg] Re: Thresholds
Hi Michael
Thanks for all your help
One last question. Is there a way to specify an external mail address in the
script? Should I change the $emailuser to a full email address.
Thanks for all your patience
Regards
Brendon
-----Original Message-----
From: Michael Markstaller [mailto:mm at elabnet.de]
Sent: 08 April, 2003 13:03
To: mrtg at list.ee.ethz.ch; Baker, Brendon
Subject: [mrtg] Re: Thresholds
Hi,
yes, these are global options which saves each of them to be added per host.
You only have to add each threshold per target where you want thresholds to
be active then,
an examle for monitoring CPU and mem on a Cisco router looks somethink like
this:
########################### Router-specific
Target[HOSTNAME.cpu]:
1.3.6.1.4.1.9.2.1.57.0&1.3.6.1.4.1.9.2.1.58.0:COMMUNITY at HOSTNAME
Directory[HOSTNAME.cpu]: HOSTNAME
MaxBytes[HOSTNAME.cpu]: 100
Title[HOSTNAME.cpu]: CPU Usage -- HOSTNAME
PageTop[HOSTNAME.cpu]: <H1>CPU Usage -- HOSTNAME</H1>
Options[HOSTNAME.cpu]: gauge, absolute
Unscaled[HOSTNAME.cpu]: dwmy
#Supress[HOSTNAME.cpu]:dwmy
XSize[HOSTNAME.cpu]: 380
YSize[HOSTNAME.cpu]: 100
YLegend[HOSTNAME.cpu]: CPU Usage (%)
ShortLegend[HOSTNAME.cpu]: %
Legend1[HOSTNAME.cpu]: CPU Usage 1 min
Legend2[HOSTNAME.cpu]: CPU Usage 5 min
LegendI[HOSTNAME.cpu]: CPU Usage 1 min
LegendO[HOSTNAME.cpu]: CPU Usage 5 min
ThreshMaxO[HOSTNAME.cpu]: 90
#---------------------------------------------------------------
Target[HOSTNAME_freemem]:
1.3.6.1.4.1.9.9.48.1.1.1.6.1&1.3.6.1.4.1.9.9.48.1.1.1.6.2:COMMUNITY at HOSTNAME
Directory[HOSTNAME_freemem]: HOSTNAME
MaxBytes[HOSTNAME_freemem]: 64000000
AbsMax[HOSTNAME_freemem]: 64000000
Title[HOSTNAME_freemem]: Free Memory -- HOSTNAME
PageTop[HOSTNAME_freemem]: <H1>Free Memory -- HOSTNAME</H1>
Options[HOSTNAME_freemem]: gauge, nopercent
#Unscaled[HOSTNAME_freemem]: dwmy
YLegend[HOSTNAME_freemem]: Free Memory
ShortLegend[HOSTNAME_freemem]: B
LegendI[HOSTNAME_freemem]: Proc mem:
LegendO[HOSTNAME_freemem]: I/O mem:
Legend1[HOSTNAME_freemem]: Processor memory:
Legend2[HOSTNAME_freemem]: I/O memory:
ThreshMinI[HOSTNAME_freemem]: 1000000
ThreshMinO[HOSTNAME_freemem]: 1000000
#---------------------------------------------------------------
All options are described here
http://people.ee.ethz.ch/~oetiker/webtools/mrtg/reference.html#threshold_che
cking
By the way, I think it would be better to send answers to the list..
Michael
-----Original Message-----
From: Baker, Brendon [mailto:BBaker at fnb.co.za]
Sent: Monday, April 07, 2003 3:16 PM
To: Michael Markstaller
Subject: RE: [mrtg] Thresholds
Hi Michael
Excuse my ignorance
Are all these options below global options? Or must you add the:
ThreshProgI[_]: /usr/local/mrtg/bin/mrtg_thresh_alert.pl
ThreshProgO[_]: /usr/local/mrtg/bin/mrtg_thresh_alert.pl
ThreshProgOKI[_]: /usr/local/mrtg/bin/mrtg_thresh_alert.pl
ThreshProgOKO[_]:
/usr/local/mrtg/bin/mrtg_thresh_alert.pl......................per host?
Also........is it possible to add a few external addresses (in another
domain) for it to send to? How you would achieve this?
Thanks for all your help
Regards
Brendon
-----Original Message-----
From: Michael Markstaller [mailto:mm at elabnet.de]
Sent: 07 April, 2003 12:58
To: Baker, Brendon; mrtg at list.ee.ethz.ch
Subject: RE: [mrtg] Thresholds
Hi,
I picked up the attached perl-script somewhere, it worked for me on RH7.1 ..
configured globally in mrtg.cfg looks like this:
ThreshDir: /var/spool/mrtg
ThreshProgI[_]: /usr/local/mrtg/bin/mrtg_thresh_alert.pl
ThreshProgO[_]: /usr/local/mrtg/bin/mrtg_thresh_alert.pl
ThreshProgOKI[_]: /usr/local/mrtg/bin/mrtg_thresh_alert.pl
ThreshProgOKO[_]: /usr/local/mrtg/bin/mrtg_thresh_alert.pl
Michael
-----Original Message-----
From: Baker, Brendon [mailto:BBaker at fnb.co.za]
Sent: Monday, April 07, 2003 11:04 AM
To: 'mrtg at list.ee.ethz.ch'
Subject: [mrtg] Thresholds
Hi everyone
Please could someone help me out with a script for linux that will email a
few users when a threshold in mrtg is reached.
I am not much of a programmer at all
Thanks
Regards
Brendon
____________________________________________________________________________
_______________________
The views expressed in this email are, unless otherwise stated, those of the
author and not those
of the FirstRand Banking Group or its management. The information in this
e-mail is confidential
and is intended solely for the addressee. Access to this e-mail by anyone
else is unauthorised.
If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or
omitted in reliance on this, is prohibited and may be unlawful.
Whilst all reasonable steps are taken to ensure the accuracy and integrity
of information and data
transmitted electronically and to preserve the confidentiality thereof, no
liability or
responsibility whatsoever is accepted if information or data is, for
whatever reason, corrupted
or does not reach its intended destination.
________________________________
--
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
____________________________________________________________________________
_______________________
The views expressed in this email are, unless otherwise stated, those of the
author and not those
of the FirstRand Banking Group or its management. The information in this
e-mail is confidential
and is intended solely for the addressee. Access to this e-mail by anyone
else is unauthorised.
If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or
omitted in reliance on this, is prohibited and may be unlawful.
Whilst all reasonable steps are taken to ensure the accuracy and integrity
of information and data
transmitted electronically and to preserve the confidentiality thereof, no
liability or
responsibility whatsoever is accepted if information or data is, for
whatever reason, corrupted
or does not reach its intended destination.
________________________________
--
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
___________________________________________________________________________________________________
The views expressed in this email are, unless otherwise stated, those of the author and not those
of the FirstRand Banking Group or its management. The information in this e-mail is confidential
and is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, any disclosure, copying, distribution or any action taken or
omitted in reliance on this, is prohibited and may be unlawful.
Whilst all reasonable steps are taken to ensure the accuracy and integrity of information and data
transmitted electronically and to preserve the confidentiality thereof, no liability or
responsibility whatsoever is accepted if information or data is, for whatever reason, corrupted
or does not reach its intended destination.
________________________________
--
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