Home arrow Applications Tips arrow Net-snmpd Tips
Net-snmpd Tips PDF
Sunday, 01 June 2008
FreeBSD 6.x versions have in ports a service for snmp monitoring: net-snmp, located in /usr/ports/net-mgmt/net-snmp, and also available as package.

Net-snmp is a very usefull service to monitor your server. Many applications including Cacti and MRTG need snmpd service in order to generate statistics.

Here are few tips for setting up and debug a snmp service:


Tip 1. Configure your net-snmp service
----------------------------------------------------

After you've installed net-snmp package you wll find an example config file here:

/usr/local/share/snmp/snmpd.conf.example

In order to setup net-snmp service, rename snmpd.conf.example file to snmpd.conf and copy it to:

/usr/local/etc/snmp/snmpd.conf

Also you could generate a snmpd.conf with a Perl script:

# snmpconf -g basic_setup



Tip 2. Verify your net-snmp service
----------------------------------------------

Before checking functionality of snmp to make sure that is started, you can do a ps:

# ps awux | grep snmpd

If the process is started, to make sure it works we can scan from outside to see if is port 161 is open:

# nmap 10.0.0.1 sU -p 161


After modifying snmpd.conf and starting the service, you can test functionalty of snmp service with snmpwalk:

# /usr/local/bin/snmpwalk -v 2c -c public 127.0.0.1



Tip 3. Accessing a net-snmp information from command line
---------------------------------------------------------------------------------

To get info about a specific snmp parameter of snmp service:

# /usr/local/bin/snmpget -v 2c -c private 127.0.0.1 system.sysUpTime.0

 
< Prev   Next >

Other BSD Systems

OpenBSD

Misc

Solaris

Polls

Best BSD firewall?