Cant get SNMP monitoring

Preview: cant get SNMP monitoring
hi,

I have installed Nagios 3.2.3 with Nagios Plugins 1.4.15, Net-snmp 5.7.1 and check_snmp plugin (nagios-snmp-plugins.1.1.1) to monitor SNMP enabled devices. It did installed but when I try to monitor I am getting following 2 errors message , Please is anyone have ideas how to solve these following errors?

“check_mrtgtraf: Unable to open MRTG log file”
“External command error: /usr/local/bin/snmpget: error while loading shared libraries: libnetsnmp.so.30: cannot open shared object file: No such file or directory”

here my complete set of command I have used for installed…

sudo apt-get install apache2 libapache2-mod-php5 build-essential libgd2-xpm-dev

/usr/sbin/useradd -m -s /bin/bash nagios
passwd nagios

/usr/sbin/groupadd nagcmd
/usr/sbin/usermod -a -G nagcmd nagios
/usr/sbin/usermod -a -G nagcmd www-data

cd ~/downloads
tar xzf nagios-3.2.3.tar.gz
cd nagios-3.2.3
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
make install-webconf

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

/etc/init.d/apache2 reload

sudo apt-get libperl-dev
cd ~/downloads
tar xzf net-snmp-5.7.1.tar.gz
cd net-snmp-5.7.1
./configure
make
make install

cd ~/downloads
tar xzf nagios-plugins-1.4.11.tar.gz
cd nagios-plugins-1.4.11
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install

sudo apt-get libnet-snmp-perl
cd ~/downloads
nagios-snmp-plugins.1.1.1.tar.gz
cd nagios-snmp-plugins.1.1.1
./install.sh

ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

/etc/init.d/nagios start

PLEASE HELP ME
THANKS

SOLVED following Error:
“External command error: /usr/local/bin/snmpget: error while loading shared libraries: libnetsnmp.so.30: cannot open shared object file: No such file or directory”

Solution:
Copy /usr/local/lib/libnetsnmp.so.30 file in to /usr/lib
Restart the nagios server

But still I am getting FOLLOWING ERROR MESSAGE when I try to monitor bandwidth via mrtg logs

“check_mrtgtraf: Unable to open MRTG log file”

Is anyone have ideas… PLEASE HELP ME…

hi

first of all, check that you have mrtg installed. if not, then:

updatedb

create the /etc/mrtg folder and move the cfg file

create the working directory

create config file for your monitored device

open /etc/mrtg/mrtg.cfg in a text editor and make sure the line “WorkDir: /var/www/mrtg” (under Debian) is uncommented, and under Global Defaults the line “Options[_]: growright, bits” is uncommented.
add the following lines to mrtg.cfg under the Global Defaults

RunAsDaemon: Yes Interval: 5 Logdir: /var/log/ EnableIPv6: no
create the /var/www/mrtg/index.html file according to your monitored device’s cfg file

run mrtg with your monitored device’s cfg file

this is about it. if you get an error, run:

MRTG settings in /usr/local/nagios/etc/objects/switch.cfg should be changed from ‘/var/lib/mrtg’ to ‘/var/www/mrtg’, also this applies to any other cfg file that will be using mrtg

check nagios configuration and run nagios. you should get the right data in less then a minute.
also check yourserver/mrtg for some nice graphical displays and consider securing this folder with .httaccess or other methods.

This is a modified version of a small tutorial i found on google,
hope it helped.