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



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





IMPORTANT: This message contains confidential information and is intended only 
for the individual named. If the reader of this message is not an intended 
recipient (or the individual responsible for the delivery of this message to an 
intended recipient), please be advised that any re-use, dissemination, 
distribution or copying of this message is prohibited. Please notify the sender 
immediately by e-mail if you have received this e-mail by mistake and delete 
this e-mail from your system.



Home | Main Index | Thread Index | Old Index