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.


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:

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/
6) make build (it will fail in work/net-snmp/local/ due 
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::carpIfDescr.1 = STRING: "carp100"
 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/

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


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:

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