FreeBSD SNMP
From MediaWiki
Contents |
FreeBSD SNMP Monitoring using bsnmp
FreeBSD ships with a minimal bsnmpd(1) in the base OS which is tightly coupled with the OS subsystems like netgraph(3) and pf(4) which is really. This is very different from net-snmp which is a beast of its own.
See http://people.freebsd.org/~harti/bsnmp/
Configuration
rc.conf.local
bsnmpd_enable="YES"
/etc/snmpd.config
# # Set some common variables # location := "Bangalore, India" contact := "mail@shankerbalan.net" system := 1 # FreeBSD traphost := localhost trapport := 162
/etc/hosts.allow
ACLs are managed using tcpwrappers
snmpd: 127.0.0.0/255.255.255.0 : allow
Testing
snmpwalk(1)
> portinstall net-mgmt/net-snmp
> snmpwalk -v2c -c public localhost system SNMPv2-MIB::sysDescr.0 = STRING: faith.shanu.net 0 FreeBSD 7.0-CURRENT SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.12325.1.1.2.1.1 DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (26227) 0:04:22.27 SNMPv2-MIB::sysContact.0 = STRING: mail@shankerbalan.net SNMPv2-MIB::sysName.0 = STRING: faith.shanu.net SNMPv2-MIB::sysLocation.0 = STRING: Bangalore, India SNMPv2-MIB::sysServices.0 = INTEGER: 76 SNMPv2-MIB::sysORLastChange.0 = Timeticks: (9) 0:00:00.09 SNMPv2-MIB::sysORID.1 = OID: SNMPv2-SMI::enterprises.12325.1.1.1.10.2 SNMPv2-MIB::sysORID.2 = OID: SNMPv2-SMI::enterprises.12325.1.1.1.10.3 SNMPv2-MIB::sysORID.3 = OID: SNMPv2-MIB::snmpMIB SNMPv2-MIB::sysORID.4 = OID: SNMPv2-SMI::enterprises.12325.1.1 SNMPv2-MIB::sysORID.5 = OID: IF-MIB::ifMIB SNMPv2-MIB::sysORID.6 = OID: IP-MIB::ipMIB SNMPv2-MIB::sysORID.7 = OID: TCP-MIB::tcpMIB SNMPv2-MIB::sysORID.8 = OID: UDP-MIB::udpMIB SNMPv2-MIB::sysORID.9 = OID: IP-MIB::ip.24 SNMPv2-MIB::sysORID.10 = OID: HOST-RESOURCES-MIB::host SNMPv2-MIB::sysORDescr.1 = STRING: udp transport mapping SNMPv2-MIB::sysORDescr.2 = STRING: lsock transport mapping SNMPv2-MIB::sysORDescr.3 = STRING: The MIB module for SNMPv2 entities. SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for the Begemot SNMPd. SNMPv2-MIB::sysORDescr.5 = STRING: The MIB module to describe generic objects for network interface sub-layers. SNMPv2-MIB::sysORDescr.6 = STRING: The MIB module for managing IP and ICMP implementations, but excluding their management of IP routes. SNMPv2-MIB::sysORDescr.7 = STRING: The MIB module for managing TCP implementations. SNMPv2-MIB::sysORDescr.8 = STRING: The MIB module for managing UDP implementations. SNMPv2-MIB::sysORDescr.9 = STRING: The MIB module for the display of CIDR multipath IP Routes. SNMPv2-MIB::sysORDescr.10 = STRING: The MIB module for Host Resource MIB (RFC 2790). SNMPv2-MIB::sysORUpTime.1 = Timeticks: (0) 0:00:00.00 SNMPv2-MIB::sysORUpTime.2 = Timeticks: (0) 0:00:00.00 SNMPv2-MIB::sysORUpTime.3 = Timeticks: (9) 0:00:00.09 SNMPv2-MIB::sysORUpTime.4 = Timeticks: (9) 0:00:00.09 SNMPv2-MIB::sysORUpTime.5 = Timeticks: (9) 0:00:00.09 SNMPv2-MIB::sysORUpTime.6 = Timeticks: (9) 0:00:00.09 SNMPv2-MIB::sysORUpTime.7 = Timeticks: (9) 0:00:00.09 SNMPv2-MIB::sysORUpTime.8 = Timeticks: (9) 0:00:00.09 SNMPv2-MIB::sysORUpTime.9 = Timeticks: (9) 0:00:00.09 SNMPv2-MIB::sysORUpTime.10 = Timeticks: (9) 0:00:00.09

