Monday, July 29, 2013

Install and Configure SNMP on Ubuntu


Installation of SNMP service on Ubuntu  is little different in comparison to red-hat base systems. There are simple steps to install and configure but first important thing is which package is equivalent to which package in Debian Repository, there are two packages named snmp and snmpd. snmp is the client tools and snmpd is server.
so lets start the installation

sudo apt-get install snmpd snmp

Only by this snmp will be installed on the system, now its time to configure it.

Configuration
Now Rename the Original SNMPD configuration file

sudo mv /etc/snmp/snmpd.conf  /etc/snmp/snmpd.conf.org

then create new configuration file

sudo vim.tiny /etc/snmp/snmpd.conf

and copy this content to that file

rocommunity  public
syslocation  "India"
syscontact  dexterdgeek@gmail.com


Make snmpd use the newly created file and make it listen to all interfaces:

Edit /etc/default/snmpd

Change from:
# snmpd options (use syslog, close stdin/out/err).
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'

To:
# snmpd options (use syslog, close stdin/out/err).
#SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf'

and restart snmpd

sudo /etc/init.d/snmpd restart


Test
Do a snmpwalk from another host against your newly configured host.

snmpwalk -v2c -c public 127.0.0.1

Yes it works!!

Tuesday, July 23, 2013

Monitring Machine


From last fewdays , i was tying to configure a Linux system to monitor my Lab Network and services. There is not any much information available on net. There are few networking tools avalable, so I thought to give them a try and here are tehe details fo them.
I tried these three tools:
1. MRTG
2. Munin
3. Nagios

The Multi Router Traffic Grapher, or just simply MRTG is free s/w for monitoring and measuring the traffic load on networklinks. It allows the user to see traffic load on a network over time in graphical form.MRTG uses the Simple Network Management Protocol (SNMP) to send requests with two object identifiers (OIDs) to a device. The device, which must be SNMP-enabled, will have a management information base (MIB) to look up the OIDs specified.

Munin is a networked resource monitoring tool that can help analyze resource trends and "what just happened to kill our performance?" problems. Munin presents output in graphs through a web interface.

Nagios is an open source computer system monitoring, network monitoring and infrastructure monitoring software application. Nagios offers monitoring and alerting services for servers, switches, applications, and services. It alerts the users when things go wrong and alerts them a second time when the problem has been resolved.

I installed this on Ubuntu 12.04. Installation and Configuration steps are in my others posts.
Source: Wikipedia