Beluc | 25 Mar 12:23 2014
Picon

monitoring iptables

Hello,

i have a server with some extra failover public interfaces where i'm sending some kind of traffic on a round robin way using iptables SNAT :

auto eth1:0
iface eth1:0 inet static
        address 1.1.1.1
        netmask 255.255.255.255
        broadcast 1.1.1.1

auto eth1:1
iface eth1:1 inet static
        address 2.2.2.2
        netmask 255.255.255.255
        broadcast 2.2.2.2

auto eth1:2
iface eth1:2 inet static
        address 3.3.3.3
        netmask 255.255.255.255
        broadcast 3.3.3.3

# iptables -L -n -t nat -v
[...]
Chain POSTROUTING (policy ACCEPT 10 packets, 685 bytes)
 pkts bytes target     prot opt in     out     source               destination         
  546 32760 SNAT       all  --  *      eth1    0.0.0.0/0            1.2.3.0/22     statistic mode nth every 3 to:3.3.3.3
  546 32760 SNAT       all  --  *      eth1    0.0.0.0/0            1.2.3.0/22     statistic mode nth every 2 to:2.2.2.2
  546 32760 SNAT       all  --  *      eth1    0.0.0.0/0            1.2.3.0/22     statistic mode nth every 1 to:1.1.1.1
 614K   41M MASQUERADE  all  --  *      eth1    0.0.0.0/0          0.0.0.0/0

all this is working fine !

i'm already monitoring physical interface (eth1) of that server using mrtg/smp and now, i would like to monitore pkts/bytes passing through extra interfaces.
i searched a bit if iptables is reachable via snmp but cannot find anything.

does somebody know a way to achieve this ?

Regards,
Marco
_______________________________________________
mrtg mailing list
mrtg <at> lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
Bob Reiber | 16 Mar 20:21 2014
Picon

can i change the 1 day graph to show three days

I like the 5 minute graph but want it to display 3 days worth of data. I have looked through the paramaters and don’t see anything that relates to the number of intervals that the 5 minute graph will display. Can someone point me in the right direction

 

Bob Reiber

BK Sales and Service

Tel: (650) 376-1122

 

_______________________________________________
mrtg mailing list
mrtg <at> lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
Steve Lindemann | 21 Feb 22:19 2014

MIB for Dell PowerConnect 3524?

Does anyone know where I can get the MIB for a Dell PowerConnect 3524 to 
use with MRTG?  I've been looking and haven't had any luck finding what 
I need.

In lieu of that, I'll take suggestions for monitoring thru put on the 
ports on that model switch.

Thanks all!
--

-- 
Steve Lindemann, MSIS                   __
Network Administrator                  //\\  ASCII Ribbon Campaign
Marmot Library Network                 \\//  against HTML/RTF email,
+1.970.242.3331 x116                   //\\  vCards & M$ attachments
http://www.marmot.org
Beluc | 20 Feb 14:43 2014
Picon

convert string to oid

Hi everybody,

i'm trying to apply smth that works using snmpwalk but doesn't in mrtg :

*snmpwalk*
mrtg:/etc/mrtg# snmpwalk -OnE -c snmppub -v 2c 10.0.99.161 1.3.6.1.4.1.9.9.254.1.2.5.1.3.1.\"CLUSTER1\"
.1.3.6.1.4.1.9.9.254.1.2.5.1.3.1.8.67.76.85.83.84.69.82.49 = Counter64: 428593
mrtg:/etc/mrtg# snmpwalk -OnE -c snmppub -v 2c 10.0.99.161 1.3.6.1.4.1.9.9.254.1.2.5.1.3.1.\"CLUSTER1_PREDICTOR\"
.1.3.6.1.4.1.9.9.254.1.2.5.1.3.1.18.67.76.85.83.84.69.82.49.95.80.82.69.68.73.67.84.79.82 = Counter64: 3857472

*mrtg*
Target[cluster1_test_failedconnections]: 1.3.6.1.4.1.9.9.254.1.2.5.1.3.1.\"CLUSTER1\"&1.3.6.1.4.1.9.9.254.1.2.5.1.3.1.\"CLUSTER1_PREDICTOR\":snmppub <at> 10.0.99.161:::::2
Options[cluster1_test_failedconnections]: growright,noinfo
YLegend[cluster1_test_failedconnections]: failed connections
ShortLegend[cluster1_test_failedconnections]: conn
MaxBytes[cluster1_test_failedconnections]: 1000000
Title[cluster1_test_failedconnections]: Failed Connections -- cluster1
PageTop[cluster1_test_failedconnections]: <h1>Failed Connections --cluster1 </h1>
LegendI[cluster1_test_failedconnections]: &nbsp;Predictor:
LegendO[cluster1_test_failedconnections]: &nbsp;Predicted:

mrtg:/etc/mrtg# if [ -x /usr/bin/mrtg ] && [ -r /etc/mrtg/mrtg.cfg-ServerFarmFailedConns55 ]; then env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg-ServerFarmFailedConns55 2>&1 | tee -a /var/log/mrtg/mrtg.log-ServerFarmFailedConns55 ; fi
2014-02-19 18:36:49: WARNING: Could not match host:'snmppub <at> 10.0.99.161:::::2' ref:'Descr' key:'"CLUSTER1_PREDICTOR\"'
2014-02-19 18:36:51: ERROR: Target[cluster1_test_failedconnections][_IN_] '1.3.6.1.4.1.9.9.254.1.2.5.1.3.1.\"CLUSTER1\"&1.3.6.1.4.1.9.9.254.1.2.5.1.3.1. $target->[12]{$mode} ' (kill): Can't find string terminator '"' anywhere before EOF at (eval 44) line 1.
2014-02-19 18:36:51: ERROR: Target[cluster1_test_failedconnections][_OUT_] '1.3.6.1.4.1.9.9.254.1.2.5.1.3.1.\"CLUSTER1\"&1.3.6.1.4.1.9.9.254.1.2.5.1.3.1. $target->[12]{$mode} ' (kill): Can't find string terminator '"' anywhere before EOF at (eval 45) line 1.

I hope someone will have an idea.

CLUSTER1 & CLUSTER1_PREDICTOR are serverfarms from cisco ACE30

Regards,

Beluc
_______________________________________________
mrtg mailing list
mrtg <at> lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
Alessandro Forghieri | 5 Feb 17:00 2014
Picon

mrtg-2.14.5-4 (Centos5): oid-mib-cache.txt not created (w/solution)

Greetings.
This may be an old bug - hard to say with the trac access sealed in the web site - but it's happened to me plenty and recently, and the 'net is quiet about it.
Hopefully this'll help some poor schmuck

I have seen that in the above (subject) mentioned conditions it may happen that a
clean configuration file starts acting up by spewing 
Unknown SNMP Variable errors. Others have met this as well.: see https://lists.oetiker.ch/pipermail/mrtg/2011-March/036481.html) As explained in the link, the apparent cause of the error is a missing /var/lib/mrtg/oid-mib-cache.txt file that should be automatically created and populated with name-to-oid translations loaded from the LoadMib specified files (but isn't). One unpleasant solution is creating the file by hand. The root cause I found for this is as follows. The mrtg distro apparently ships with two similarly named files: Net_SNMP_util.pm and SNMP_util.pm They are different but contain similarly named functions and it turns out that MRTG mixes up calls between the two. In this particular case, when parsing the cfg file MRTG_lib.pm calls (line 681): snmpQueue_MIB_File($mibFile) stepping through in the debugger, it is possible to see that this is
Net_SNMP_util::snmpQueue_MIB_File

the name-to-oid translation, however, is made through SNMP_utils::toOID function. This does not know about the MIB files (they have been queued in the wrong module, above) and so it breaks. Replacing; snmpQueue_MIB_File($mibFile) with SNMP_util::snmpQueue_MIB_File($mibFile) Makes all the error go away. The reason of the mixup or of the presence of two SNMP libraries, I cannot fathom. I'd bet that one OR the other should be present and that shipping both causes the snafu, but that's me. Maybe removing one or the other fixes everything as well - or it may make it worse - I did not try that. Cheers, alf
-- -- Alessandro Forghieri Nouvelle s.r.l. via Giardini 456/C 41124 Modena (ITALY) tel. +39 059 2929338 - Fax +39 059 347606
Attachment (alf.vcf): text/x-vcard, 257 bytes
_______________________________________________
mrtg mailing list
mrtg <at> lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
Henri Stofberg | 7 Jan 12:17 2014
Picon

WEBMIN

Hi guys.

I used to do a lot of LINUX setup and support, but it was about 5yrs 
since the last time.

So please don't shoot me, but I have forgotten o lot of it.

I now have a UBUNTU based laptop, but I want to run MRTG to monitor the 
traffic through the router.

Previously I think I did the setup via WEBMIN, but I am not to sure.

1. Can I set it up via WEBMIN?
2. Is there some friendlier interface that I can try and use?

--

-- 
Thanks
Henri Stofberg
+27-82-495-9252
Petr Lázňovský | 3 Jan 18:30 2014
Picon

run "RRDtool graph" from windows cmdline on file.rrd created by MRTG

Creating .rrd files by MRTG. Trying to create graphs from this files on windows cmdline does not understand
(even after hours of googling). Can someone explain me this directive:

DEF:traffic=file.rrd:traffic:AVERAGE

I understand the file.rrd is data file created by MRTG. But does not understand what is twice traffic word,
and the AVERAGE word. At this moment always got error:

ERROR: Cannot parse DS in 'DEF:traffic=file.rrd:traffic:AVERAGE'

L. 
Shawn Hodgson | 5 Dec 15:08 2013

Problem monitoring HP 2510G


Hello,

I am new to mrtg and would like to monitor a HP 2510G switch. What I am doing is:

sudo cfgmaker --output=/etc/mrtg/mrtg.cfg community <at> myip 
sudo indexmaker --output=/var/www/mrtg/index.html /etc/mrtg/mrtg.cfg
sudo env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg

When I go to view the traffic information I see the charts, and I see information about the switch above the charts. So some data is being gathered. But nothing is registering in the input/output. It never changes from 0. Can any one propose an idea on how to get this working?

Regards,

Shawn


--
Shawn Hodgson
IT Support Specialist
IT 
Finance in Motion GmbH
Theodor-Stern-Kai 1, 60596 Frankfurt/Main, Germany
t: +49 (0) 69 9778 7650-948 | f: +49 (0) 69 977 876 50-10
s.hodgson <at> finance-in-motion.com | http://www.finance-in-motion.com
Registered Office (Sitz der Gesellschaft): Frankfurt/Main, Germany | Commercial Register (Handelsregister): HRB 85926, Local Court (Amtsgericht) Frankfurt/Main
Managing Directors (Geschäftsführer): Sylvia Wisniwski, Elvira Lefting, Florian Meister | Supervisory Board (Aufsichtsrat): Dr. Klaus Maurer (Chairman / Vorsitzender)
Please consider the environment before printing this e-mail
To see the terms and conditions of this e-mail, please click here
_______________________________________________
mrtg mailing list
mrtg <at> lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
Daniel | 14 Nov 22:02 2013

cfgmaker: adding noHC[] too liberally

Hello MRTG list,

I've searched the mailing list archives that I could find, but didn't
see anything relevant to my situation.

I'm having a bit of a problem with cfgmaker too aggressively marking
interfaces as being "noHC".  There are two corner cases here that I'm
tickling....

Case 1: Virtual interfaces: sometimes the speed returned is 0, so it's
   marked for noHC.
   The returned value is not 'undef', just zero.
   (I'm seeing this on 'unrouted VLAN xxx' interfaces on a
   Cisco 6509.  It has a lot of traffic on some of these
   interfaces.).

Case 2: (This is specific to my environment): I want all interfaces
   enumerated in the mrtg config file, even if they're down.
   One consequence of this for me is that when the interface is
   down, it sees no traffic, so a poll of the ifHCInOctets interface
   counter returns 0, so it's marked for noHC.
   The returned value is not 'undef', just zero.

The logic in mrtg-2.16.2 seemed more sane to me than it does in
the mrtg-2.17.3/4 code.  Would a patch like the following be
considered acceptable?  It's a diff from 2.17.4.

I've included it inline as an attachment.

Thanks,

	- Daniel

diff -ru mrtg-2.17.4.orig/bin/cfgmaker mrtg-2.17.4/bin/cfgmaker
--- mrtg-2.17.4.orig/bin/cfgmaker	2012-01-12 03:29:00.000000000 -0700
+++ mrtg-2.17.4/bin/cfgmaker	2013-11-14 13:42:24.000000000 -0700
 <at>  <at>  -902,11 +902,13  <at>  <at> 
     my $snmphost = v4onlyifnecessary($router, $ipv4only);

     if ($router =~ /:[\d.]*:[\d.]*:[\d.]*:[23]/) {
-        my $speed = (snmpget($snmphost, $v3opt, 'ifHighSpeed.'.$if))[0] || 'unknown';
+        my $speed = (snmpget($snmphost, $v3opt, 'ifHighSpeed.'.$if))[0];
+	$speed = 'unknown' unless defined $speed;
         debug('base',"snmpget $snmphost for ifHighSpeed.$if -> $speed Mb/s");
         $SNMP_Session::errmsg = undef;
 	$Net_SNMP_util::ErrorMessage = undef;
-        my $counter = (snmpget($snmphost,$v3opt, 'ifHCInOctets.'.$if))[0] || 'unknown';
+        my $counter = (snmpget($snmphost,$v3opt, 'ifHCInOctets.'.$if))[0];
+	$counter = 'unknown' unless defined $counter;
         debug('base',"snmpget $snmphost for ifHCInOctets.$if -> $counter");
         if( $speed eq 'unknown' or $counter !~ /^\d+$/ or $SNMP_Session::errmsg or $Net_SNMP_util::ErrorMessage){
             $SNMP_Session::errmsg = undef;

diff -ru mrtg-2.17.4.orig/bin/cfgmaker mrtg-2.17.4/bin/cfgmaker
--- mrtg-2.17.4.orig/bin/cfgmaker	2012-01-12 03:29:00.000000000 -0700
+++ mrtg-2.17.4/bin/cfgmaker	2013-11-14 13:42:24.000000000 -0700
 <at>  <at>  -902,11 +902,13  <at>  <at> 
     my $snmphost = v4onlyifnecessary($router, $ipv4only);

     if ($router =~ /:[\d.]*:[\d.]*:[\d.]*:[23]/) {
-        my $speed = (snmpget($snmphost, $v3opt, 'ifHighSpeed.'.$if))[0] || 'unknown';
+        my $speed = (snmpget($snmphost, $v3opt, 'ifHighSpeed.'.$if))[0];
+	$speed = 'unknown' unless defined $speed;
         debug('base',"snmpget $snmphost for ifHighSpeed.$if -> $speed Mb/s");
         $SNMP_Session::errmsg = undef;
 	$Net_SNMP_util::ErrorMessage = undef;
-        my $counter = (snmpget($snmphost,$v3opt, 'ifHCInOctets.'.$if))[0] || 'unknown';
+        my $counter = (snmpget($snmphost,$v3opt, 'ifHCInOctets.'.$if))[0];
+	$counter = 'unknown' unless defined $counter;
         debug('base',"snmpget $snmphost for ifHCInOctets.$if -> $counter");
         if( $speed eq 'unknown' or $counter !~ /^\d+$/ or $SNMP_Session::errmsg or $Net_SNMP_util::ErrorMessage){
             $SNMP_Session::errmsg = undef;
_______________________________________________
mrtg mailing list
mrtg <at> lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
Alex Moen | 5 Nov 15:43 2013

speedy

Hi all,

It's time to rebuild my MRTG server... hardware is going to fail, and I 
want to virtualize it anyway.  BTW, uptime is over 2300 days, and it's 
running CentOS 4.3, MRTG 2.10.15 and RRDTool 1.2.13.  We use it every 
day, and I want to thank Mr. Oetiker for all of his work on this.

Installation was going well, until I get to the issue of speedy.cgi, 
which *all* of my .  I have come to realize that the world has left 
speedy.cgi behind, even though it was highly recommended "back in the 
day" on the MRTG site.

So what is the replacement for speedy?  Is it even needed anymore, with 
the processor advancements?

TIA!

Alex
Kevin M. Harrington | 4 Nov 17:25 2013

kMG question / problem

Hello,

I hope I'm not sending a repeat question, but I've searched the archives 
and can't find an answer to my question.

I'm using MRTG to log traffic through my router, and would prefer that 
everything be reported in MB/s. I've used the kMG option to adjust the 
format of the text that is displayed below the graphs and this works. 
However, after doing this, the Week, Month, and Year graphs display in 
base units (bits). The data is correct, however it is hard to read 
because along the left-side of the graph the units are huge. Here's a 
text example of how the left hand side of the weekly, monthly, and 
yearly graphs look:

44000000.0
33000000.0
22000000.0
11000000.0
0.0

I would prefer that it look like the Daily graph:

44.0 M
33.0 M
22.0 M
11.0 M
0.0 M

Here is the relevant section of my configuration file:

Target[eth0vlan8]: 6:xxxxxxxx <at> x.x.x.x:
SetEnv[eth0vlan8]: MRTG_INT_IP="x.x.x.x" MRTG_INT_DESCR="eth0.8"
MaxBytes[eth0vlan8]: 5625000
kMG[eth0vlan8]: -,-,M,G,T,P
Title[eth0vlan8]: Traffic Analysis for eth0 / vlan8
PageTop[eth0vlan8]: <h3>Traffic Analysis for eth0 / vlan8</h3>

Any help / suggestions would be greatly appreciated!

Gmane