[mrtg] Re: help creating "mrtg.cfg" file ?

Jacek Zabicki jzabicki at equifax.ca
Fri Oct 15 20:09:02 MEST 1999


This .cfg file and shell script will graph number of telnet sessions

This is my .cfg for counting telnet sessions:
<<<<<<< CUT HERE >>>>>>>>
#Number of telnet sessions
Target[_mtlalpha01.telnet_sessions]: `/apps/bat/mrtg/telnet_sessions.sh
172.18.224.38 public`
AbsMax[_mtlalpha01.telnet_sessions]: 10000000000
MaxBytes[_mtlalpha01.telnet_sessions]: 2147483647
Colours[_mtlalpha01.telnet_sessions]: GREEN#00eb0c,WHITE#ffffff,DARK
GREEN#006600,WHITE#ffffff
WithPeak[_mtlalpha01.telnet_sessions]: ymw
Title[_mtlalpha01.telnet_sessions]: mtlalpha01 - Number of telnet sessions
PageTop[_mtlalpha01.telnet_sessions]: <H3>MTLALPHA01: number of telnet
sessions</H3>
Options[_mtlalpha01.telnet_sessions]: gauge, absolute, nopercent,
#Unscaled[_mtlalpha01.telnet_sessions]: dwmy
#Supress[_mtlalpha01.telnet_sessions]: dwmy
XSize[_mtlalpha01.telnet_sessions]: 380
YSize[_mtlalpha01.telnet_sessions]: 100
YLegend[_mtlalpha01.telnet_sessions]: Telnet sessions
ShortLegend[_mtlalpha01.telnet_sessions]: #
Legend1[_mtlalpha01.telnet_sessions]: Telnet sessions
#Legend2[_mtlalpha01.telnet_sessions]:
Legend3[_mtlalpha01.telnet_sessions]: Telnet sessions - peak
#Legend4[_mtlalpha01.telnet_sessions]:
LegendI[_mtlalpha01.telnet_sessions]: Telnet sessions:
LegendO[_mtlalpha01.telnet_sessions]:
<<<<<<< CUT HERE >>>>>>>>

This is the actual script telnet_sessions.sh. This scripy uses finger.
<<<<<<< CUT HERE >>>>>>>>
#!/bin/sh
# This script is used by MRTG, it is specified on Target line of .cfg file
# $1 must be IP address of target
# $2 must be a community name
# This script returns four lines
# line 1: number of telnet sessions
# line 2: value of 0
# line 3: system up time
# line 4: system name and IP
# For more info consult config.htm

# BEGIN ============
# Number of telnet sessions
# 2 is substracted because first two lines are headers
let a=`finger -m @$1 | grep -c ""`-2
echo $a

# Value of 0
echo 0

snmpget $1 $2 system.sysUpTime.0 | cut -c22-70
echo -n `snmpget $1 $2 system.sysName.0 | cut -c20-45`; echo -n " "; echo $1
# END ==============
<<<<<<< CUT HERE >>>>>>>>


-----Original Message-----
From: BETA ONE [mailto:beta1_version at yahoo.com]
Sent: 14 October, 1999 09:54
To: George D. Nincehelser; jzabicki at equifax.ca
Subject: Re: [mrtg] Re: help creating "mrtg.cfg" file ?



Hi George,

Do you have a live real example where I can cut
and paste.
Such as checking a router In and Out traffic of
each netmod card.  Or a example of 'finger', counting
all users log on every 5 minutes.
Or any that you have in mind.

Can you send me an explanation/file of the process of
doing the things above.

I do appreciate this very much.
Beta

-

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