Debian, Monitoring

Using SNMP With Icinga

In my previous [blog](https://beingasysadmin.wordpress.com/2013/02/27/monitoring-servers-with-icinga-2/) i explained how to set up the Icinga monitoring system on Debian based machine. In this i will be explaining on how to use SNMP with icinga. Using SNMP we can get various info from a remote machine which can be used to icinga.

On the remote server we need to install the snmp server. In ordr to check whether the snmp is working fine, we can install the snmp client also on the same machine.

apt-get install snmp snmp-server

From Debian Wheezy onwards, the snmp-mibs package has been removed from the debian repositories. But we can download the debian file from the squeeze repo. Since it has only a few depenencies and they can be installed from the debian repositories, we can manually install the mibs package. But in Ubuntu mibs package is still available in their repositories.

Once the package is installed we can run the download-mibs to install all the necessary mibs. Now once the snmpd package is installed, we need to comment the MIBS option in the /etc/snmp/snmp.conf. And define the basic settings like, location, contact etc in the snmpd.conf file. We can define the ip to which snmp should listen either in the snmpd.conf file or in the /etc/default/snmp file as an extra option. Once the settings are modified, we can start the snmpd service.

So now the service will listening on the port 631 on the ip which we defined, by default 127.0.0.1. We can also enable authentication for snmp service, so that the snmp clients which passes the authentication will be able to get the result from the snmp service.

Once the snmp service has started on the remote server, we can test the snmp onnectivity from our icinga server using the nagios’ check_snmp plugin. Once we are able to get results from the snmp service, we can deploy tese snmp services into our icinga host configurations to get the results from the remote server’s using the check_snmp command.

Advertisements
Standard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s