Tuesday, April 24, 2012

Debian Squeeze SNMP install


Objective: To identify a quick way to get SNMP up and running on a newly install Debian Squeeze server. After making a few updates to the /etc/apt/sources.list file I decided to just download the files required and install them using dpkg since apt-get install just seemed to yield no packages available or they have been obsoleted. Perhaps some day when I have a bit more time I'll go back and figure out why apt-get was having issues since I usually like to use that tool to install; however, my goal was to stay focused on the task at hand which was to get SNMP running and not be distracted. This document assumes the reader understands basic Linux system administration command syntax and functions in addition to the ability to use online search engines to locate packages used by Debian. If you downloaded the OS and have installed it then you most likely meet the minimum and nothing below should seem foreign.

Process:

Step 1.) Obtain the following SNMP related files from the Debian website (yielded via online search):

Note- There may be newer files, these were the files I used at the time of install.

  • libperl5.10_5.10.1-17/squeeze2_i386.deb
  • libsnmp-base_5.4.3~dfsg-2_all.deb
  • libsnmp15_5.4.3~dfsg-2_i386.deb
  • snmp_5.4.1~dfsg-12_i386.deb
  • snmpd_5.4.1~dfsg-12_i386.deb
  • smistrip_0.4.8+dfsg2-3_all.deb (needed to read MIB file contents & prereq. To install downloader file)
  • snmp-mibs-downloader_1.1_all.deb

Step 2.) Install the packages.

dpkg -i <filename>

File name <filename> install order below:

  • libperl5.10_5.10.1-17/squeeze2_i386.deb
  • libsnmp-base_5.4.3~dfsg-2_all.deb
  • libsnmp15_5.4.3~dfsg-2_i386.deb
  • snmp_5.4.1~dfsg-12_i386.deb
  • snmpd_5.4.1~dfsg-12_i386.deb
  • smistrip_0.4.8+dfsg2-3_all.deb
  • snmp-mibs-downloader_1.1_all.deb

Step 3.) Check to see if snmp is running.

Grep for the snmpd process (ps -ef |grep snmpd)

If all went well and you didn't see any errors it should be running.

Step 4.) Customize the configuration.

* Edit /etc/snmp/snmpd.conf and put in your secure community strings

* Edit /etc/snmp/snmp.conf and comment out the last line that contains “mibs :”. (since the downloader

   file is installed, otherwise an error is received about being past the end of MIB tree when walking).

* Edit /etc/default/snmpd and locate the line with 127.0.0.1 in it and replace with 0.0.0.0 or the ip address of 
   the server.

Step 5.) Get a clean restart.

Restart the server.

Step 6.) Do a quick mib walk to confirm things are working proper.

Command syntax example: snmpwalk -c <community_string> <v1/v2c/v3> <ipaddress or localhost>

<Community_string> - whatever you unique string is- DO NOT use public.

<v1/v2c/v3> - whatever you have configured in your snmpd.conf file.

<ipaddress or localhost> - Either should work

Note: Since your environment is not the same as mine there is no guarantee the above procedure be successful; however, if it does and it saves time and frustration then I have achieved the goal when posting this information.
There are always multiple ways and options for doing things- Find the one that works best for you.

Friday, February 10, 2012

SNMP monitoring tools

When considering a new SNMP monitoring tool try to keep in mind that each basically provides the same functionality and it is first and foremost important to decide what you are trying to accomplish. Meaning what issues are you attempting to resolve by acquiring and deploying an SNMP monitoring tool.
This will help you determine which tool will give you the most bang for the buck.
You should also keep in mind your future needs, if those are currently unknown and you are just entering into this arena then I suggest starting with the most cost effective (cheapest) solution that meets you initial requirements to get your feet wet.

I mention cheapest since you will most likely quickly outgrow the solution and begin looking for a replacement (which is normal) and why you should get your feet wet with an inexpensive solution. Think of this tool as a set of training wheels to get you started and thinking of where you would like to go.