[mrtg] Re: Programs that work with MRTG.

Larry Sheldon lsheldon at creighton.edu
Wed Sep 29 17:09:23 MEST 1999

> 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..
> Is that all MRTG needs to graph data? Just a number?

You are on the right track--but didn't read quite enough.

MRTG will graph either the results of SNMP "gets" (when it is passed
an OID-host combination), or data from some external program or script.

In the latter case, the external program must output four ASCII lines,
the first two of which consist only of the integers you wish to graph,
the latter two can be null, or can contain the strings you want reported as
the "uptime" and the name of the target.

>From the distribution .cfg file:

# Target[ezwf]: ifInErrors.1&ifOutErrors.1:public at myrouter

# * if you want to monitor something which does not provide
#   data via snmp you can use some external program to do
#   the data gathering.

#   The external command must return 4 lines of output:
#     Line 1 : current state of the 'incoming bytes counter'
#     Line 2 : current state of the 'outgoing bytes counter'
#     Line 3 : string, telling the uptime of the target.
#     Line 4 : string, telling the name of the target.

#   Depending on the type of data your script returns you
#   might want to use the 'gauge' or 'absolute' arguments
#   for the "Options" keyword.

# Target[ezwf]: `/usr/local/bin/df2mrtg /dev/dsk/c0t2d0s0`

.                                                                       .
- L. F. (Larry) Sheldon, Jr.                                            -
. Unix Systems and Network Administration                               .
- Creighton University Computer Center-Old Gym                          -
. 2500 California Plaza                                                 .
- Omaha, Nebraska, U.S.A.  68178       Two identifying characterstics   -
. lsheldon at creighton.edu                  of System Administrators:     .
- 402 280-2254 (work)                Infallibility, and the ability to  -
. 402 681-4726 (cellular)               learn from their mistakes.      .
- 402 332-4622 (residence)                                              -
. http://www.creighton.edu/~lsheldon    Adapted from Stephen Pinker     .

* 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