[mrtg] Re: Threshold on NT?
Thomas Muggli - NSM
mugglit at cscoe.ac.com
Mon Sep 27 17:42:17 MEST 1999
Well, I wrote the Threshold portions for MRTG. It probably didn't
get as much testing as it should have, but it seems there are two
common problems people run into:
1) "ThreshDir" is a global parameter. Since MRTG runs from a scheduler,
and not a daemon, it needs a way to remember if thresholds were
OK or broken during the last MRTG run. It uses the ThreshDir
directory to keep track of broken thresholds. It should only
be specified once per config file. Like this:
ThreshDir: /path/to/threshold/directory
2) Each "ThreshProg" program must be specified as a single command, since
the code performs an "is this file executable?" check on it. Perl
expects a single filename for the check, so having two seperate
filenames (the perl interpreter and perl code file) makes the check
fail. (It doesn't matter at all if you put quotes, backticks, etc.
around it.) It was written and tested using a Perl program on a
Unix system -- where you can specify the interpreter to use on the
first line of code:
#!/usr/bin/perl
Well, that type of specification doesn't work in NT, so your only
choice is to call a batch file which then calls the Perl program.
I'd encourage someone with an NT system and a little NT/Perl know-
ledge to re-write the execuatability check. (I don't have an NT
system, otherwise I'd whip out a patch.)
So, for NT, you have to call a batch file.
Tom
> Yes, I tried double quotes, single quotes, backticks, no quotes at all,
> different directories, etc. still no luck. Do you know who wrote this
> portion of the mrtg file? I sent this to Tobias and he said he didn't write
> it.
>
> Kirk
>
>
>
> -----Original Message-----
> From: David C Prall [mailto:dcp at dcptech.com]
> Sent: Saturday, September 25, 1999 4:17 PM
> To: mrtg at list.ee.ethz.ch
> Subject: [mrtg] Re: Threshold on NT?
>
> Place the program inside double quotes and see what happens. I like
> calling a simple batch file. Then I can modify a single batch file
> should something change. Of course I now have about 60 batch files that
> in turn call another batch file that does the real work.
>
> David C Prall, MCNE MCSE DCP Technologies
> dcp at dcptech.com Alexandria, VA
> dcppage at dcptech.com http://www.dcptech.com
> ----- Original Message -----
> From: Kirk Rogers <Kirk.Rogers at trw.com>
> To: <dcp at dcptech.com>
> Cc: <mrtg at list.ee.ethz.ch>
> Sent: Saturday, September 25, 1999 10:51 AM
> Subject: [mrtg] Re: Threshold on NT?
>
>
> > David,
> > Have you tried launching a perl program from the ThreshProg
> parameters? I
> > can make a batch file work but cant with a perl program. Isn't this a
> > little strange? I'm beginning to think it's a limitation in the
> 'mrtg' file
> > that was not written to launch external programs other than batch
> files. Am
> > I wrong or am I just being a bone head and don't have something
> configured
> > correctly or leaving something out?
> >
> >
> > Kirk
> >
> >
> > -----Original Message-----
> > From: David C Prall [mailto:dcp at dcptech.com]
> > Sent: Friday, September 24, 1999 8:56 AM
> > To: Kirk Rogers
> > Subject: Re: [mrtg] Re: Threshold on NT?
> >
> > Here is what I use to kick everything off, and a highly modified cfg
> > file. Unfortunately this one only has Ethernet ports so nothing
> actually
> > happens as far as thresholds go, but it is configured with everything
> to
> > do them with a little modification.
> >
> > Hope this helps,
> > David
> >
> > David C Prall, MCNE MCSE DCP Technologies
> > dcp at dcptech.com http://www.dcptech.com
> > dcppage at dcptech.com
> > ----- Original Message -----
> > From: Kirk Rogers <Kirk.Rogers at trw.com>
> > To: <dcp at dcptech.com>
> > Cc: <mrtg at list.ee.ethz.ch>
> > Sent: Friday, September 24, 1999 11:35 AM
> > Subject: [mrtg] Re: Threshold on NT?
> >
> >
> > > David,
> > > If its not too much trouble, can you send me your 'mrtg.cfg' file,
> > maybe
> > > just the top few lines to see how your referencing the directory,
> and
> > just
> > > one of you configuration sections which include the 'thresh'
> > parameters.
> > >
> > > Thanks,
> > > Kirk
> > >
> > >
> > > -----Original Message-----
> > > From: David C Prall [mailto:dcp at dcptech.com]
> > > Sent: Friday, September 24, 1999 4:50 AM
> > > To: mrtg at list.ee.ethz.ch
> > > Subject: [mrtg] Re: Threshold on NT?
> > >
> > > > So I put threshdir on line 2 of mrtg.cfg. That seems OK. Then I
> > keep
> > > > threshmaxo and threshprogo within the specific graph section of
> the
> > > config
> > > > file:
> > > >
> > > > #-------------
> > > > ..
> > > > ..
> > > > ThreshMaxO[currauth.isdnhub2]: 0
> > > > ThreshProgO[currauth.isdnhub2]: `d:\bin\acrefresh.bat`
> > > > ..
> > > > ..
> > > > #-------------
> > > >
> > > >
> > > > And it dies. Is there a reason why the MRTG documentation doesn't
> > > give an
> > > > example? Is this feature not functional?
> > > >
> > > > Kirk
> > > >
> > > Change the backticks to double-quotes and it most likely will work.
> I
> > > just call the program itself without any path. The batch file that
> > runs
> > > MRTG has the lines
> > >
> > > c:
> > > cd c:\mrtg-2.8.6\run
> > >
> > > before I call any of the perl scripts. I've placed all of my
> threshold
> > > programs in the run directory in order to simplify things.
> > >
> > > Hope the helps,
> > >
> > > David C Prall, MCNE MCSE DCP Technologies
> > > dcp at dcptech.com http://www.dcptech.com
> > > dcppage at dcptech.com
> > >
> > >
> > > --
> > > * To unsubscribe from the mrtg mailing list, send a message with the
> > > subject: unsubscribe to mrtg-request at list.ee.ethz.ch
> > > * The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg
> > >
> > >
> > > --
> > > * To unsubscribe from the mrtg mailing list, send a message with the
> > > subject: unsubscribe to mrtg-request at list.ee.ethz.ch
> > > * The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg
> > >
> > >
> >
> > --
> > * To unsubscribe from the mrtg mailing list, send a message with the
> > subject: unsubscribe to mrtg-request at list.ee.ethz.ch
> > * The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg
> >
> >
>
> --
> * To unsubscribe from the mrtg mailing list, send a message with the
> subject: unsubscribe to mrtg-request at list.ee.ethz.ch
> * The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg
>
> --
> * To unsubscribe from the mrtg mailing list, send a message with the
> subject: unsubscribe to mrtg-request at list.ee.ethz.ch
> * The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg
>
--
* To unsubscribe from the mrtg mailing list, send a message with the
subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg
More information about the mrtg
mailing list