[mrtg] Re: Programs that work with MRTG.

Morten S. Nielsen msn at ipt.dtu.dk
Wed Sep 29 17:32:54 MEST 1999



On Wed, 29 Sep 1999, Mitch Vincent wrote:

> I've used MRTG for years but only to graph bandwidth. I've run into a need
> for a quick and easy way of graphing some information though, I immediately
> though of MRTG.
> 
> I went and looked at some of the programs in the /contrib directory and they
> seemed very straight-forward, however most of them gave errors when I tried
> to run them through MRTG and the others did nothing at all..
> 
> In most of the contributed programs instruction for use they said to do
> something like :
> 
> Target[whatever]: `/usr/bin/program argument whatever blah`
> MaxBytes[whatever]: 12500000
> Title[whatever]: Something
> PageTop[whatever]: <H1>Something
> 
> And they all gave the impression that the results of the program run
> ("program" in the above example) would be graphed somehow. Now some of the
> programs there, when I ran them at the command line just outputted numbers..

Yes numbers - or exactly a number for in, a number for out a string and a
string eg. The last two strings are the uptime and the name of the device

### testprogram ###############################
#!/bin/sh
echo 12
echo 42
echo "hi there it is"
echo "this i routertest and hopefully this works"
###############################################

You need four echos in order to provide four lines which is necessary

> Is that all MRTG needs to graph data? Just a number?
No, two numbers where one may be 0

> 
> Evidently not, I tried a very simple script that outputted numbers and ran
> it through MRTG, I got something like :
> 
> Problem with Externale get '`/usr/bin/program`':
>     Expected an INTEGER for 'out' but got ''

Your problem was apparently that only one number was output. Or more
specifically only one newline, after which there was no number...

> 
> That is much like the error I got with the other program in /contrib
> 
> I know nothing about perl, so I can't just look at the mrtg source and tell
> what's going on..
> 
> Thanks for any and all help/suggestions.
> 
> - Mitch
> "0100110100110000010101000100001101001000"
> 
> --
> * 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
> 

Servicepack SR12 for NT. Available at www.linux.org

--    Morten S. Nielsen    mailto:msn at ipt.dtu.dk
--
--  |   Linux - the choice of a GNU generation   |
--  |      Skaane Sjaelland Linux User Group     |
--  |         at http://www.sslug.dk             |



--
* 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