[mrtg] Re: using custom input w/ mrtg (no snmp)

Brander, Eric Eric.Brander at ACS-INC.com
Wed Nov 13 13:51:14 MET 2002


I think you need a closing ` on your target line.

 -----Original Message-----
From: 	trash [mailto:dan.white at gmx.net] 
Sent:	Wednesday, November 13, 2002 4:04 AM
To:	mrtg at list.ee.ethz.ch
Subject:	[mrtg] using custom input w/ mrtg (no snmp)


hello folks!

I read in the manual
(http://people.ee.ethz.ch/~oetiker/webtools/mrtg/reference.html) about
"External Monitoring Scripts"..and wrote a Target line which lets me draw a
chart of my
network input/output without using SNMP.

the line is:
---------------
ifconfig ppp0 |awk '/RX bytes/{print $2}' |cut -b 7- && ifconfig ppp0 \
|awk '/RX bytes/{print $6}' |cut -b 7- && uptime |cut -b 14- && echo
checkpoint
---------------

it's working perfectly..
now I wanted to create another chart showing active connections via
ip_conntrack..and that's
the Target I wrote:
---------------
cat /proc/net/ip_conntrack  |wc -l |cut -b 5- && echo '500' && uptime
|cut -b 14- && echo checkpoint
---------------

Unfortunately this doesn't work at all ;-((
I don't get any output although mrtg is not reporting any errors. Input
_should_ be ok.
console output is:
---------------
403
500
6 days, 14:05,  1 user,  load average: 0.01, 0.08, 0.08
checkpoint
---------------

My config file looks like this:
---------------
######################################################################
# Multi Router Traffic Grapher -- Sample Configuration File
######################################################################
# This file is for use with mrtg-2.5.4c

# Global configuration
Htmldir: /var/www/mrtg/cons
Imagedir: /var/www/mrtg/cons/images
Logdir: /var/log/mrtg
Refresh: 600

WriteExpires: Yes
Title[^]: checkpoint's i-link statistics

Target[con]: `cat /proc/net/ip_conntrack  |wc -l |cut -b 5- &&  cat
/proc/net/ip_conntrack  |wc -l |cut -b 5- && uptime |cut -b 14- && echo c$
MaxBytes1[con]: 2000
MaxBytes2[con]: 2000
#Unscaled[con]: d, w
#XSize[con]: 600
#YSize[con]: 200
PageTop[con]: <h3>checkpoint Debian GNU/Linux Woody</h3>
Options[con]: growright,nopercent,nobanner,nolegend
Background[con]: #557788
Suppress[con]: y, m
---------------

anyone any hint for me please?

best regards, Daniel W.

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list