pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Merging Joel Knight's SNMP MIB into net/net-snmp



All:

Just revisiting this.  The yamt-pf42 patch was merged into
NetBSD-current recently and appears to have all of the pfSync data
structures (correct me if I'm wrong), making it significantly easier to
merge Joel Knight's PF-MIB patches into our net/net-snmp/ 

Any change of getting his files added to pkgsrc/ before NetBSD 5.0
branches?

~BAS

---

On Thu, 2007-06-28 at 11:11 -0400, Brian A. Seklecki wrote:
> Oh god please yes!  
> 
> I'm working on pfsync and a general "OPENBSD-NETSTAT-MIB" for feeding
> "netstat -s" stats into a MIB.

All:

The PF-MIB patches compile against the Net-SNMP in Pkgsrc with a little
help (pfSync is missing).

The patch to r1.67 of pkgsrc/net/net-snmp/Makefile is here:
http://people.collaborativefusion.com/~seklecki/pkgsrc_netsnmp541_OBSD_pfMIB.patch

1) Untar the obsd-mibs42.tar
2) copy files/* into pkgsrc/net/net-snmp/files
3) Download the patch && patch -p0 < pkgsrc_netsnmp541_OBSD_pfMIB.patch
4) make extract
5) Manually adjust work/net-snmp-5.4.1/mibs/Makefile.in
6) make build (it will fail in work/net-snmp/local/ due 
   to USE_TOOLS=PERL)
7) cd work/net-snmp-5.4.1/local/ && make -k && cd -
8) make package

Example Output:

lavalamp@nbsdbuild-i386-netbsd4:/usr/pkgsrc/net/net-snmp# snmpwalk -v2c\
 -c netbsd localhost OPENBSD-CARP-MIB::carpIfTable

 OPENBSD-CARP-MIB::carpIfIndex.1 = INTEGER: 1
 OPENBSD-CARP-MIB::carpIfDescr.1 = STRING: "carp100"
 OPENBSD-CARP-MIB::carpIfVhid.1 = INTEGER: -1
 OPENBSD-CARP-MIB::carpIfDev.1 = ""
 OPENBSD-CARP-MIB::carpIfAdvbase.1 = INTEGER: 1
 OPENBSD-CARP-MIB::carpIfAdvskew.1 = INTEGER: 0
 OPENBSD-CARP-MIB::carpIfState.1 = INTEGER: init(0)

-----

Patch for work/net-snmp/mibs/Makefile.in:

http://people.collaborativefusion.com/~seklecki/pf_NetSNMP541_mibsMakefile.in_obsdPFMib.patch

Patch for files/pfMibObjects.c to disable pfsync(4) support:

http://people.collaborativefusion.com/~seklecki/pfMibObjects.c_nbsdPkgsrc.patch

~BAS

PS: 
It also has the added benefit of killing the dependency on Perl
run/build dependency :)


> I've also written a small Nagios plugin that uses the Net-SNMP bindings
> to walk the CARP Interface Status Table
> ("OPENBSD-CARP-MIB::carpIfTable") to check for proper active/standby
> configs:
> 
> http://www.nagiosexchange.org/Networking.53.0.html?&tx_netnagext_pi1[p_view]=1021




Home | Main Index | Thread Index | Old Index