[NTLUG:Discuss] mrtg.cfg problem
Sean Cook
seer14 at endor.hsutx.edu
Wed Nov 28 17:24:11 CST 2001
Raymond,
Try this... not sure if it will work or not.
Place the following in a file named MRTGmailer.sh.
#!/bin/sh
/bin/echo "Network is down" | /bin/mail -s "MRTG Warning" ray at mydomain.com
Then place this file into the following directory
/root/bin
Chmod the file to set the correct permissions, likely 755 or 775
chmod 755 /root/bin/MRTGmailer.sh
And then...
ThreshMinI[...]: 90%
ThreshProgI[...]: /root/bin/MRTGmailer.sh
Cheers,
Sean
* ray at lctn.k12.mn.us [2001.11.28 16:49]:
: That leads me to my first post. I am new to Linux, and would like to know
: how to execute a script via the mrtg config. I see people using NT just call
: a batch file, but I am not sure of the Linux equivalent.
:
: Raymond
:
: ----- Original Message -----
: From: "Gregory L. Camp" <Greg.Camp at osc.com>
: To: <discuss at ntlug.org>
: Sent: Wednesday, November 28, 2001 4:28 PM
: Subject: RE: [NTLUG:Discuss] mrtg.cfg problem
:
:
: > Try putting the entire "echo ...." line into a script file and then use
: that
: > script as the program to execute. MRTG probably is looking for an "echo"
: > program, and there isn't one.
: >
: > > -----Original Message-----
: > > From: Raymond Norton [mailto:ray at lctn.k12.mn.us]
: > > Sent: Wednesday, November 28, 2001 4:03 PM
: > > To: discuss at ntlug.org
: > > Subject: [NTLUG:Discuss] mrtg.cfg problem
: > >
: > >
: > > I have added the script info below to my MRTG config, but get
: > > this error
: > > when trying to start the config up:
: > >
: > > [root at rt bin]# perl ./mrtg wol.cfg
: > > ERROR: CFG Error in "threshprogi[x.x.x.x]", line 57:
: > > Threshold program echo
: > > "Network is down" | mail -s "MRTG Warning" ray at mydomain.com cannot be
: > > executed
: > >
: > > I wasn't sure if the was a Sendmail smrsh problem, so I added
: > > a ln to allow
: > > MRTG.
: > >
: > > Thanks in advance for any ideas
: > >
: > > Raymond
: > >
: > >
: > > > >
: > > > >
: > > > > > Hi Raymond.
: > > > > >
: > > > > > I would think something like this should work:
: > > > > >
: > > > > >
: > > > > > echo "Network has died!" | mail -s "MRTG WARNING"
: > > user at domain.com
: > > > > >
: > > > > > Michael
: > > > > >
: > > > > >
: > > > > > On Wed, Nov 28, 2001 at 12:18:41PM -0600, Raymond Norton wrote:
: > > > > > > I am setting up our MRTG configs to use the Threshold
: > > feature, and
: > > send
: > > > >out
: > > > > > > an automated email when traffic reaches 0%. I
: > > understand how to make
: > > the
: > > > > > > additions to my configs, but I am at a loss how to
: > > write a script
: > > that
: > > > >can
: > > > > > > be called by MRTG which will send the email when the
: > > threshold is
: > > > >reached.
: > > > > > >
: > > > > > > I am using RedHat 7.1 and Sendmail 8.11.6
: > > > > > >
: > > > > > > Can anyone help me with this?
: > > > > > >
: > > > > > >
: > > > > > > Raymond
: > > > > > >
: > > > > > >
: > > > > > >
: > > > > > > _______________________________________________
: > > > > > > http://www.ntlug.org/mailman/listinfo/discuss
: > > > > >
: > > > > > _______________________________________________
: > > > > > http://www.ntlug.org/mailman/listinfo/discuss
: > > > > >
: > > > >
: > > > >
: > > > >_______________________________________________
: > > > >http://www.ntlug.org/mailman/listinfo/discuss
: > > >
: > > > --
: > > > MadHat at unspecific.com
: > > >
: > > >
: > > > _______________________________________________
: > > > http://www.ntlug.org/mailman/listinfo/discuss
: > > >
: > >
: > >
: > > _______________________________________________
: > > http://www.ntlug.org/mailman/listinfo/discuss
: > >
: >
: > _______________________________________________
: > http://www.ntlug.org/mailman/listinfo/discuss
:
:
: _______________________________________________
: http://www.ntlug.org/mailman/listinfo/discuss
--
I'm not tense, just terribly, terribly alert.
More information about the Discuss
mailing list