Page 1 of 2

Install NET-SNMP - B3?

Posted: 18 Apr 2012, 17:08
by texan
Hi,

How do I install NET-SNMP, to be able to read ifInOctets and ifOutOctets?

Re: Install NET-SNMP - B3?

Posted: 02 May 2012, 16:28
by texan
:cry: No one that know how to install it :cry:

Re: Install NET-SNMP - B3?

Posted: 03 May 2012, 06:51
by RandomUsername
From what I understand from this page - http://packages.debian.org/source/lenny/net-snmp, you just need to do this (as root):

Code: Select all

aptitude install libsnmp-base libsnmp15 snmp snmpd

Re: Install NET-SNMP - B3?

Posted: 03 May 2012, 15:45
by texan
All package was already installed - still nothing from ifInOctets and ifOutOctets.


root@B3:~# aptitude install libsnmp-base libsnmp15 snmp snmpd
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

Re: Install NET-SNMP - B3?

Posted: 03 May 2012, 23:30
by RandomUsername
My knowledge of snmp is quite limited so I think you're going to have to explain in more detail what you're trying to do.

Re: Install NET-SNMP - B3?

Posted: 04 May 2012, 09:17
by texan
I'm trying to retrieve some integers running snmpwalk;

[root@computer ~]# snmpwalk -v 2c -c public 127.0.0.1 | grep -E
'if(In|Out)Octets'
IF-MIB::ifInOctets.1 = Counter32: 3925379800
IF-MIB::ifInOctets.2 = Counter32: 3862050976
IF-MIB::ifOutOctets.1 = Counter32: 3925379800
IF-MIB::ifOutOctets.2 = Counter32: 808228674
[root@computer ~]#

With these I can make a network usage graph with RRD.
The problem is that I don't see these values walking the SNMP.

Re: Install NET-SNMP - B3?

Posted: 07 May 2012, 14:41
by nobody
i know it's not the solution you asked for, but if all you want is a network usage graph you may want to cansider installing munin on the B2/B3.

Re: Install NET-SNMP - B3?

Posted: 09 May 2012, 16:37
by texan
Munin can't draw any graphs if I can't install IF-MIB/NET-SNMP.

Re: Install NET-SNMP - B3?

Posted: 09 May 2012, 17:23
by jallee
texan wrote:Munin can't draw any graphs if I can't install IF-MIB/NET-SNMP.
If you do an.

Code: Select all

apt-get install munin
I believe it is something .. snmp .. there, else search whit.

Code: Select all

apt-cache search snmp

Re: Install NET-SNMP - B3?

Posted: 10 May 2012, 06:08
by texan
Actually I don't want Munin at all. Read the thread again.

I know how to search the repository. I still can't find the right
package though.

Re: Install NET-SNMP - B3?

Posted: 10 May 2012, 15:59
by jallee
texan wrote:Actually I don't want Munin at all. Read the thread again.

I know how to search the repository. I still can't find the right
package though.
Ok, to my humble knowledge net-snmp is snmpd.

Code: Select all

apt-get install snmpd

Re: Install NET-SNMP - B3?

Posted: 10 May 2012, 16:32
by texan
jallee wrote:
texan wrote:Actually I don't want Munin at all. Read the thread again.

I know how to search the repository. I still can't find the right
package though.
Ok, to my humble knowledge net-snmp is snmpd.

Code: Select all

apt-get install snmpd

Already installed.

root@B3:~# apt-get install snmpd
Reading package lists... Done
Building dependency tree
Reading state information... Done
snmpd is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Re: Install NET-SNMP - B3?

Posted: 11 May 2012, 16:04
by nobody
texan wrote:Munin can't draw any graphs if I can't install IF-MIB/NET-SNMP.
Sure it can. I do it every day. And as all you seem to need is network usage then munin will be a solution. Of course if you prefer whining about not being able to use your preferred solution insteD of being practical and just getting the job done, i cant be of any more help. Even after being commanded to read the thread again

Re: Install NET-SNMP - B3?

Posted: 13 May 2012, 11:07
by Cheeseboy
Hi texan,

You need to install the MIBS as well, in the snmp-mibs-downloader package:

Code: Select all

niklas@b3:~$ sudo apt-get install snmpd snmp snmp-mibs-downloader
(I think that if you already have a /etc/snmp/snmp.conf file, you have to get rid of the line 'mibs :' or it will not work. I think I just deleted the file...)

Edit /etc/snmp/snmpd.conf and uncomment this line:

Code: Select all

rocommunity public  localhost
Restart snmpd:

Code: Select all

niklas@b3:~$ sudo /etc/init.d/snmpd restart
Set the MIBS variable to IF-MIB that you are interested in, or you will have to wait all day:

Code: Select all

niklas@b3:~$ export MIBS=IF-MIB
niklas@b3:~$ snmpwalk -v 2c -c public 127.0.0.1 | grep -E 'if(In|Out)Octets'
IF-MIB::ifInOctets.1 = Counter32: 6813559
IF-MIB::ifInOctets.2 = Counter32: 2367243795
IF-MIB::ifInOctets.3 = Counter32: 2517069826
IF-MIB::ifInOctets.4 = Counter32: 2436125601
IF-MIB::ifInOctets.5 = Counter32: 4069041910
IF-MIB::ifInOctets.7 = Counter32: 0
IF-MIB::ifInOctets.14 = Counter32: 245148007
IF-MIB::ifOutOctets.1 = Counter32: 6830111
IF-MIB::ifOutOctets.2 = Counter32: 96100640
IF-MIB::ifOutOctets.3 = Counter32: 4200563557
IF-MIB::ifOutOctets.4 = Counter32: 2258954014
IF-MIB::ifOutOctets.5 = Counter32: 220062692
IF-MIB::ifOutOctets.7 = Counter32: 0
IF-MIB::ifOutOctets.14 = Counter32: 0
Cheers,

Cheeseboy

Re: Install NET-SNMP - B3?

Posted: 14 May 2012, 14:01
by texan
Cheeseboy wrote:Hi texan,

You need to install the MIBS as well, in the snmp-mibs-downloader package:

Code: Select all

niklas@b3:~$ sudo apt-get install snmpd snmp snmp-mibs-downloader
(I think that if you already have a /etc/snmp/snmp.conf file, you have to get rid of the line 'mibs :' or it will not work. I think I just deleted the file...)

Edit /etc/snmp/snmpd.conf and uncomment this line:

Code: Select all

rocommunity public  localhost
Restart snmpd:

Code: Select all

niklas@b3:~$ sudo /etc/init.d/snmpd restart
Set the MIBS variable to IF-MIB that you are interested in, or you will have to wait all day:

Code: Select all

niklas@b3:~$ export MIBS=IF-MIB
niklas@b3:~$ snmpwalk -v 2c -c public 127.0.0.1 | grep -E 'if(In|Out)Octets'
IF-MIB::ifInOctets.1 = Counter32: 6813559
IF-MIB::ifInOctets.2 = Counter32: 2367243795
IF-MIB::ifInOctets.3 = Counter32: 2517069826
IF-MIB::ifInOctets.4 = Counter32: 2436125601
IF-MIB::ifInOctets.5 = Counter32: 4069041910
IF-MIB::ifInOctets.7 = Counter32: 0
IF-MIB::ifInOctets.14 = Counter32: 245148007
IF-MIB::ifOutOctets.1 = Counter32: 6830111
IF-MIB::ifOutOctets.2 = Counter32: 96100640
IF-MIB::ifOutOctets.3 = Counter32: 4200563557
IF-MIB::ifOutOctets.4 = Counter32: 2258954014
IF-MIB::ifOutOctets.5 = Counter32: 220062692
IF-MIB::ifOutOctets.7 = Counter32: 0
IF-MIB::ifOutOctets.14 = Counter32: 0
Cheers,

Cheeseboy
Hi Cheeseboy

Thank you. It's working fine now.
I had missed the part where I should have had uncommented the rocommunity line.

Thanks again.