x
Loading
 Loading
Hello, Guest | Login | Register

Monitoring Linux Hosts with SNMP

Last month’s column introduced the Simple Network Management Protocol (SNMP) and described how SNMP can be used to monitor devices and hosts connected to your network. This month, we’ll configure a Linux machine as an SNMP agent and learn how to keep SNMP secure.

Last month’s column introduced the Simple Network Management Protocol (SNMP) and described how SNMP can be used to monitor devices and hosts connected to your network. This month, we’ll configure a Linux machine as an SNMP agent and learn how to keep SNMP secure.

Configuring Net-SNMP

Net-SNMP (http://www.net-snmp.org/), formerly known as UCD-SNMP, is the preferred SNMP package for Linux. Net-SNMP includes the snmpd daemon, an agent for Linux hosts, and a suite of client utilities. Net-SNMP does not include a manager (remember that an SNMP manager is the central monitor and the SNMP agent is the client); you’ll need to separately acquire SNMP management software if you want to talk to the Net-SNMP agent software.

The snmpd daemon is started via the /etc/init.d/snmp boot script and uses /usr/share/snmp/snmpd.conf as its default configuration file. (Be aware that the RPMs provided with recent SuSE distributions use the /etc/ucdsnmpd.conf configuration file instead, although you can change this by editing the boot script.) Figure One shows a sample Net-SNMP snmpd.conf file.

Figure One: Sample snmpd.conf file

 1 rocommunity somethingsecure 2 rwcommunity somethingelse 3 trapcommunity anothername 4 trapsink dalton 5 trap2sink dalton 6 7 syslocation “Building 2 Main Machine Room” 8 syscontact “chavez@ahania.com” 9 10 # Net-SNMP-specific items 11 #keyw [args] limit(s) 12 load 5.0 6.0 7.0 # 1,5,15 load average max 13 disk / 3%…

Please log in to view this content.

Not Yet a Member?

Register with LinuxMagazine.com and get free access to the entire archive, including:

  • Hands-on Content
  • White Papers
  • Community Features
  • And more.
Already a Member?
Log in!
Username

Password

Remember me

Forgotten your password?
Forgotten your username?
Read More
  1. Got Security? You're in Denial
  2. KDE 4.4: Does It Work Yet?
  3. Writing Custom Nagios Plugins with Python
  4. Power Up Linux GUI Apps
  5. Tweeting from the Command Line with Twyt
Follow Linux Magazine
Rackspace