[mrtg] Re: graphing small counter values?

Koelstra, J. (Jan) JKoelstra at MINSZW.NL
Mon Dec 16 09:59:51 MET 2002


Hubert,

I see two possible reasons for the zeroed graphs:
1. Your MaxBytes valueis too low. Put it up to something you never expect to reach (say 100000)
2. I' m not sure if your scripts deliver a counter. Try to add the "gauge" option (and leave out the perminute if you do so).

Hth,

Jan.

-----Original Message-----
From: Hubert depesz Lubaczewski [mailto:depesz at depesz.pl] 
Sent: Saturday, December 14, 2002 7:34 PM
To: mrtg at list.ee.ethz.ch
Subject: [mrtg] graphing small counter values?



hi
sorry for possibly siumple question, but i have spent more than 2 days trying to figure this out.

i want to graph a number of rejected (by iptables) packets (input and output). to do so, i created two scripts:

--------------------------- iptables-INPUT.pl: --------------------------- #!/usr/bin/perl my ($sNewInput) = grep {
	s/^Chain\s+INPUT\s+\(\s*policy\s+DROP\s+(\d+)\s+packets.*$/$1/s
} `/usr/sbin/iptables -v -L`;
printf("%u\n", $sNewInput);
--------------------------- :iptables-INPUT.pl ---------------------------
--------------------------- iptables-OUTPUT.pl: --------------------------- #!/usr/bin/perl my ($sNewOutput) = grep {
	s/^Chain\s+OUTPUT\s+\(\s*policy\s+DROP\s+(\d+)\s+packets.*$/$1/s
} `/usr/sbin/iptables -v -L`;

printf("%u\n", $sNewOutput);
--------------------------- :iptables-OUTPUT.pl ---------------------------

this scripts are linked into my snmpd, and (wow) they work.
now i created in mrtg.cfg section to graph it:
Target[depeszws_fire]: .1.3.6.1.4.1.2021.8.1.101.1&.1.3.6.1.4.1.2021.8.1.101.2:public at 127.0.0.1
Title[depeszws_fire]: firewalled packets
MaxBytes[depeszws_fire]: 20
Factor[depeszws_fire]: 300
YScale[depeszws_fire]: 2
XScale[depeszws_fire]: 2
YTics[depeszws_fire]: 12
Options[depeszws_fire]: growright,perminute
PageTop[depeszws_fire]: <H1>firewalled packets</H1>

and - it doesn't work.
by doesn't i mean that usally it just draws line at "0".
i tried to work with plain Options: growright. then i tried absolute, perhour, perminute, and even Factor - just like it is right now. none of this setups do work for me. what am i doing wrong? i have about 1-2 rejected packets per 5 minutes. i'd like to get this values (1-2) "asis" on graph. not divided, not nothing - just graphed as 1, or 2 or whatever it will be. but mrtg seems to be smarter then i am.

of course i checked if snmp is providing information:
$ snmpwalk 127.0.0.1 public .1.3.6.1.4.1.2021.8.1.101.1 enterprises.ucdavis.extTable.extEntry.extOutput.1 = 135

$ snmpwalk 127.0.0.1 public .1.3.6.1.4.1.2021.8.1.101.2 enterprises.ucdavis.extTable.extEntry.extOutput.2 = 197

i read what i could out of refernce.txt. i search the net with google. still it yielded no results. can anyone of you be kind enough to help me with it?

thanks in advance

depesz

-- 
hubert depesz lubaczewski                          http://www.depesz.pl/
------------------------------------------------------------------------
Mój Bo¿e, spraw abym milcza³, dopóki siê nie upewniê,  ¿e  naprawdê  mam
co¶ do powiedzenia.                                      (c) 1998 depesz

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


-- Attached file removed by Ecartis and put at URL below --
-- Type: text/plain
-- Size: 1k (1035 bytes)
-- URL : http://www.ee.ethz.ch/~slist/pantomime/50-InterScan_Disclaimer


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