Monitoring an (Ubuntu) Linux Server with Serio IT Service View

Serio IT Service View comes with a Plugin for monitoring Linux servers, allowing you to monitor free disk space, free RAM, processor utilisation, and running processes.

This article describes how to set up monitoring of a Linux Server with Serio IT Service View. The specific distribution discussed is Ubuntu, but hopefully you will find it straightforward to adapt the procedure to your own version of Linux.

Part One: Installing snmpd (Part of the Net-SNMP suite)

Serio IT Service View monitors Linux servers through the SNMP Agent, snmpd, which is part of the Net-SNMP suite. snmpd must be installed and running on the Linux server you intend to monitor.

For users of all varieties of Linux, you can find advice on downloading, installing, and configuring Net-SNMP at the following website: www.net-snmp.org.

For Ubuntu users, there is no need to download as snmpd is included as standard in the Ubuntu distribution. To ensure that snmpd is installed on Ubuntu,

1. Open the Synaptic Package Manager (accessed from the 'System' > 'Administration' menu).

2. Select 'All' on the left.

3. In the list on the right locate the snmp and snmpd packages. If these are not yet installed, then mark them for installation and click on 'Apply'.

Part Two: Configuring snmpd

1. The snmpd.conf File

The configuration settings for snmpd are stored in a file called snmpd.conf. On Ubuntu, this file is located in the directory /etc/snmp.

A standard snmpd.conf file is supplied with Serio IT Service View. You'll find it in the 'Helpers' folder, under the folder were Serio IT Service View is installed (usually \Program Files\ITServiceView).

Back up your current snmpd.conf file on your Linux server, and then replace it with the standard one supplied with Serio IT Service View.

You can use the snmpd.conf file supplied with Serio IT Service View as-is, wihout changes. However, if necessary, you can make changes to the snmpd.conf file using a text editor. Use the comments within the file to guide you. There are two cases in which you may need to make changes to snmpd.conf:

a. to set the Community String

For security reasons, you may want to change the Community String within the file (set by default to 'public').

b. to specify the list of processes you would like to monitor

If you want use Serio IT Service View to check if certain processes are running on your Linux server, you need to list these processes in the snmpd.conf file. Add the processes you are interested in to snmpd.conf, using the example and comments within the file to guide you.

2. Command Line Options

You can run snmpd with various command line options (see http://www.net-snmp.org/docs/man/snmpd.html).

For the Ubuntu distribution, the default command line options are specified in the file etc/default/snmp, which you can open with a text editor. The default options are specified in the line beginning 'SNMPDOPTS':

SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'

One change is required here: you need to remove the final '127.0.0.1'. It specifies that snmpd should listen only for requests only on the loopback interface, which means that it will not detect requests from Serio IT Service View. With this change made the line should look like this:

SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid'

Save the file after making your changes.

3. Restart the snmpd Service

After making changes to configuration files, you need to restart the snmpd service. On Ubuntu, you can issue the command:

sudo /etc/init.d/snmpd restart

Part Three: Testing snmp on your Linux Server

It's not necessary to do this step, but it will help you confirm that the SNMP Agent, snmpd, is running smoothly on your Linux server. First check that it is running, by entering the following command at the terminal on your Linux server:

ps -A | grep snmpd

Then try the following command, also from terminal on the Linux server:

snmpwalk  -c public -v 2c localhost dskTable

(Note: If you changed the Community String from 'public' to something else in step 1 above, you need to substitute your new Community String in the command above.)

You should see a long list of results about the disks on your Linux server.

If you don't get any results, or you get a time out or other error message, there's clearly something wrong with the way snmpd is running and you need to resolve that before continuing. In that case, review the steps above to see if you can spot the problem.

Part Four: Adding the Linux Server as a Device in Serio IT Service View

The final step is to add the Linux server as a Device to Serio IT Service View. Do this in the usual way using the New Device wizard.

When using the wizard, you need to specify some SNMP settings. Make sure you specify 2c as the version for SNMP. Also, if you changed the Community String (see Part Two, section 1 above), you will need to specify the Community String you have used.

That's it! You're ready to go online.

Tags: 

Categories: