November 9th, 2007

SNMP not in use error in Cacti

A few days ago i installed cacti on a Debian Etch with snmp. After i configured snmp i noticed that when i clicked the host under Devices menu the host settings windows opens and it shows an error saying “SNMP not in use”. Maybe some of you got his error and you need help in resolving it. Here is how its done: Notice the “SNMP Community” box ? is it empty ? mine was and that is the problem, fill in the community you filled under snmpd.conf and press Save. Now Click your host again and it should work just fine.

SNMP not in use error in Cacti

And in the second picture its working fine after entering the community:

SNMP not in use error in Cacti resolved

Install SNMP (Simple Network Management Protocol) on Debian     I’m writing this tutorial to help other that may have the same problem I had. Let me explain to you: I have a Debian server called debian1 which has external ip on eth0 and a local ip on eth0:1, and a second Debian server called debian2 which only has local ip on eth0. I need to access debian2 with ssh from the internet. I cant do that directly because debian2 does not have an external ip address to connect to the internet. But we can use a port forwarding rule on debian1 so that I can access debian2 trough debian1 on a specific port. The only command you have to use is:

iptables -A PREROUTING -t nat -p tcp -i eth0 –dport 88 -j DNAT –to

after entering this command debian1 will forward any request on port 88 from eth0 to on port 22. Now all I have to do is to enter port 88 in putty and I can log-in to debian2 trough ssh. That’s it short and simple about port forwarding.

Install SNMP (Simple Network Management Protocol) on Debian     This is an update to a previous post regarding the change of mac address in Debian. In the previous tutorial I told you can change it by ifconfig from a root account. Now I’m going to teach you how to set an interface mac address using /etc/network/interfaces . This is a better way to set your mac address because the mac you set in /etc/network/interfaces will always load when the interfaces are loaded so you don’t have to worry about the mac after reboot for example. Let’s start by looking at my /etc/network/interfaces it looks like this:

#This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
dns-search .com
hwaddress ether 00:01:04:1b:2C:1F

Open this file in your favorite editor. I use nano. You can see that my ip address is and my gateway is instead of these in your file you will see your network settings. Now, under the last line of the interfaces file you have to add the following

hwaddress ether 00:01:04:1b:2C:1F

replacing 00:01:04:1b:2C:1F with the mac you want to assign to the interface where you are adding the line. Now save the file with ctrl+x then y to confirm and restart the network service with
/etc/init.d/networking restart
Now type ifconfig and there it is you should see the mac you entered earlier assigned to eth0 (if you choused eth0). You’re done the mac will now load every time the network load’s.

Install SNMP (Simple Network Management Protocol) on Debian     It could happen to anyone to have problems with date and time. For example I had a problem a few day’s ago with an older server of mine which has problems with hardware time, it resets everytime I disconnect it from power. Its something to do with the motherboard I changed the battery but that didn’t solved the problem. That’s why sometimes I need to correct its date with the following method:

date –set 2007-10-15
to set yyyy-mm-dd
date –set 16:47:30
to set hh-mm-ss
hwclock –systohc
to sync hardware clock to what we introduced earlier

    At least from Debian version 2.2 onwards, the system automatically saves the system time to hardware clock on shutdown, and sets the system clock from hardware clock when Debian boots up. This is done in the script /etc/init.d/

    Another thing you might ran into is changing the timezone.
If the timezone is not set or is wrong, log in as superuser and run tzconfig to configure the timezone.

That’s it a short tutorial about date in Debian.

Install SNMP (Simple Network Management Protocol) on Debian     In this tutorial I’m going to teach you how to install SNMP on Debian and configure it for local or remote use. Simple Network Management Protocol is a widely used protocol for monitoring the health and welfare of network equipment, computer equipment and even devices like UPS’s. Net-SNMP is a suite of applications used to implement SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6. In my case I’m using snmp to monitor the status of my servers, both linux and windows. I use Cacti to graph all this information. (I will cover cacti installation on Debian in a future post).

For the method described below I’m using apt for installing snmp, so before you start this you should configure apt and add some http or ftp sources into your /etc/apt/sources.list or if you have your installation dvd/cd you can use that. Let’s get started:

We need to install snmpd package using the following command:
apt-get install snmpd

    That’s it snmpd is installed, now we move on to the config part. We will edit /etc/snmp/snmpd.conf. This is the main config file for snmpd so before doing any changes you should take a copy of this file in case anything goes wrong with this command:
cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.orig
next open file for edit with:
nano /etc/snmp/snmpd.conf

Now for local access only you should change
#com2sec paranoid default public
com2sec readonly default public
#com2sec readwrite default private

#com2sec paranoid default public
com2sec readonly default public
#com2sec readwrite default private

Notice “public” this will be our community. If you want to interrogate the snmp service from another server you should change:
#com2sec paranoid default public
com2sec readonly default public
#com2sec readwrite default private

#com2sec paranoid default public
com2sec local localhost public
com2sec mynetwork public
#com2sec readwrite default private

(replace “” with the ip of the remote server)
you also need to add these line to /etc/snmp/snmpd.conf
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup usm mynetwork

Next step in remote interrogating is to edit /etc/default/snmpd with
nano /etc/default/snmpd
and remove the bit.

Next step, is optional, if you want to personalize a bit your snmpd you can edit this:
syslocation Unknown (configure /etc/snmp/snmpd.local.conf)
syscontact Root (configure /etc/snmp/snmpd.local.conf)

to something like
syslocation Main Datacenter

Now we need to restart the snmp service to activate the new settings.
/etc/init.d/snmpd restart

Your snmp server is now active and running.

© 2007-2011 YourITronics | Any logo, trademark and project represented here are property of their respective owners | Wordpress | Privacy Policy    RSS