SNMP monitoring a 54g, no ifIP MIB entry in netsnmp-server

Discuss Networking

SNMP monitoring a 54g, no ifIP MIB entry in netsnmp-server

Postby hev » Mon Apr 11, 2005 6:21 pm

'lo

I've been Cacti-graphing my 54g for some time, installed your netsnmp-server package (nice one for this btw ;o) 'cos I wanted to be able to graph CPU usage too. This works, however the ifIP variable seems to be missing now. I have a traffic graph titled
lab - Traffic - eth2/4 - |query_ifIP|

when it used to say
lab - Traffic - 10.30.0.3 (eth2)

or similar. I know I can set this manually, but i'm trying to come up with a template that means whenever we add a 54g to the network I can get it graphed real easy.
The interface is up and the graph shows traffic..
Any ideas on this missing var? Anything else helpful u could shove my way? Would be great if i could monitor signal strength on the wireless interface of a client, and associated clients on an AP...
hev
n00b
n00b
 
Posts: 4
Joined: Mon Apr 11, 2005 5:55 pm
Location: Bristol. UK

Postby Void Main » Mon Apr 11, 2005 8:19 pm

Hmm, you didn't happen to upgrade Cacti did you? I seem to remember the default format change recently. The "eth2/4" means the interface at ifIndex.4 is named eth2 and the "|query_ifIP|" is a Cacti replacement variable that *should* have been replaced with the IP address on that interface if your router were to actually return an address when queried. I just did an snmpwalk and I see that mine does not return the addresses either. The IF-MIB is compiled in but apparently the IP-MIB is not. I guess what this means is that you'll have to manually replace the |query_ifIP| with the IP address, or recompile SNMP with the IP-MIB and I am not sure how hard that might be, not to mention how much extra space it would eat up. It's been a while since I built that package and I don't know if I could do it again. :)

Here is my copy of the Makefile I used:
http://voidmain.is-a-geek.net/files/ipk ... 1_vm1-1.mk
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby hev » Tue Apr 12, 2005 8:05 am

Spent an hour or so looking at this, have come to the conclusion I have no idea what I'm doing ;)

Downloaded net-snmp-5.1.1, untarred, I have no (buildroot)/make/ dir.

However rather than hard-coding IPs I'd like to get somewhere with this - as I said there's other things I wanna graph as well, particularly the no. clients connected to an AP. Some pointers on where to go with this would be cool - I'm happy to learn by doing, giz a few hints? ;o
hev
n00b
n00b
 
Posts: 4
Joined: Mon Apr 11, 2005 5:55 pm
Location: Bristol. UK

Postby Void Main » Tue Apr 12, 2005 8:23 am

The first thing you have to do is successfully build an OpenWRT firmware. It should be "relatively" simple to compile net-snmp after that. Maybe I'll look at it this evening.
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby hev » Tue Apr 12, 2005 11:53 am

I see. Have found our OpenWRT dev tree (colleague was responsible for compiling), things making much more sense. We have a brand new Gv2.2 sitting here, apparently needing a new version of the devtree - which can also be used for the older 1.0s 1.1s etc. So I've plenty of things to play with and learn.
Once I've grokked building OpenWRT (apparently just requires typing 'make'!) with the *new* tree, I'll look at porting vars from your makefile and building ipkgs from the latest net-snmp release after that. Bit busy tonight so I'll let you know how it's going in a day or so.
Next I can look at adding MIBs etc for graphing associated users, signal level etc. Lots of new stuff to learn ;o
Thx for the offer of looking at this, gimme a few days to try myself tho? I hate getting strangers to do my job...
hev
n00b
n00b
 
Posts: 4
Joined: Mon Apr 11, 2005 5:55 pm
Location: Bristol. UK

Postby Void Main » Tue Apr 12, 2005 12:05 pm

I'll give you all the time you want. Hopefully enough time to come up with a package that I can use too. :)
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby hev » Tue Apr 26, 2005 11:00 am

k, after some issues with the experimental release the ver released on Saturday compiles;
writing firmware v3.37.2 on 5/4/25 (y/m/d)
adding 992 bytes of garbage
make[1]: Leaving directory `/usr/src/openwrt-23-04-2005/target'
(cd /usr/src/openwrt-23-04-2005/bin/packages; \
/usr/src/openwrt-23-04-2005/staging_dir_mipsel/usr/bin/ipkg-make-index . > Packages \
)

Configured net-snmp-5.2.1 basically using the config within your .mk file, added ip-mib;
Code: Select all
CC=mipsel-linux-uclibc-gcc LD=mipsel-linux-uclibc-ld ./configure --host=mipsel \
--with-cc=mipsel-linux-uclibc-gcc \
--without-rpm  \
--without-openssl  \
--without-dmalloc \
--without-efence \
--without-rsaref \
--with-endianness=little \
--with-sys-contact=root \
--with-sys-location=Unknown \
--with-default-snmp-version=2 \
--with-mib-modules="host ucd-snmp/proc ucd-snmp/loadave ucd-snmp/memory ucd-snmp/vmstat ucd-snmp/disk ip-mib" \
--with-out-mib-modules="snmpv3mibs smux notification target utilities agent_mibs agentx utilities/execute" \
--with-out-transports="Unix Callback TCP TCPIPv6 UDPIPv6" \
--with-logfile=none \
--with-persistent-directory=/var/net-snmp \
--enable-ucd-snmp-compatibility \
--disable-shared \
--enable-static \
--enable-mini-agent \
--with-defaults \
--prefix=/usr \
--sysconfdir=/etc \
--disable-manuals \
--disable-debugging \
--disable-scripts \
--disable-applications \
--disable-mibs \
--disable-mib-loading \
--disable-ipv6 \
--disable-privacy

and it b0rks;
mipsel-linux-uclibc-gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib -g -O2 -Delf -c mibII/at.c -o mibII/at.o
mibII/at.c: In function `ARP_Scan_Next':
mibII/at.c:705: error: `ifIndex' undeclared (first use in this function)
mibII/at.c:705: error: (Each undeclared identifier is reported only once
mibII/at.c:705: error: for each function it appears in.)
make[2]: *** [mibII/at.lo] Error 1
make[2]: Leaving directory `/home/lloyd/dev/net-snmp-5.2.1/agent/mibgroup'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/home/lloyd/dev/net-snmp-5.2.1/agent'
make: *** [subdirs] Error 1

Tried it without the ip-mib mib, I get the same error. So I can't get as far as u yet. Any suggestions? I'm tired, gonna come back to this tomorrow. Thought I'd touch base though...
hev
n00b
n00b
 
Posts: 4
Joined: Mon Apr 11, 2005 5:55 pm
Location: Bristol. UK

Postby Void Main » Tue Apr 26, 2005 11:07 am

It's been a long time since I've compiled it and I don't even remember at this point which version of OpenWRT I compiled it against. It's quite possible that something in OpenWRT has changed causing it to break. I'm not sure when I can get time to dig into it though.
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA


Return to Networking

Who is online

Users browsing this forum: No registered users and 2 guests