[HOWTO] Install and configure the Net-SNMP agent for Unix

If you figure out how to do something interesting/cool in Cacti and want to share it with the community, please post your experience here.

Moderators: Developers, Moderators

User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Sorry for reading your post too late :cry:

I'm not using 5.4 everywhere, for example extending the agent does not work any more for me on AIX 64 bits...
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
7063
Posts: 5
Joined: Mon Jul 09, 2007 10:56 am

Post by 7063 »

fmangeant wrote:Sorry for reading your post too late :cry:

I'm not using 5.4 everywhere, for example extending the agent does not work any more for me on AIX 64 bits...
Don't worry, I managed the issue on my own. Have a nice week end.
neji
Posts: 3
Joined: Wed Aug 01, 2007 4:51 pm

Help!!

Post by neji »

Hi, I instaled Cacti in Fedora 6, and i can add a host, but i cant get de diskinfo from the host. I trie with:

snmpwalk -v 1 -c public tcp:localhost:161 .1.3.6.1.4.1.2021.9.1.2

but got this:

End of MIB

I tried wiht this too:

snmptranslate .1.3.6.1.4.1.2021.9.1.2
UCD-SNMP-MIB::dskPath
snmpwalk -v 1 -c public tcp:localhost:161 UCD-SNMP-MIB::dskPath

and i got the same

This is my /etc/snmp/snmp.conf

agentaddress tcp:161
com2sec notConfigUser default public
rocommunity public
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
view all included .iso 80
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
access notConfigGroup "" any noauth exact systemview none none
syslocation Bat. C2
syscontact root@ares.dcaa.unam.mx
includeAllDisks 10%


Any help?, thanks
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Re: Help!!

Post by fmangeant »

neji wrote:This is my /etc/snmp/snmp.conf

includeAllDisks 10%
Hi

most of the time (at least on my servers) the includeAllDisks option does not work. Could you replace it with something like this :

Code: Select all

disk /
disk /usr
disk /var
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
neji
Posts: 3
Joined: Wed Aug 01, 2007 4:51 pm

Help!!

Post by neji »

Hi

I replaced includeAllDisk with this:

Code: Select all

disk /
and restart the snmp service: "service snmpd restart", and i got this:

Code: Select all

$ snmpwalk -v 1 -c public tcp:localhost:161 dskPath
End of MIB
$ snmpget -v 1 -c public tcp:localhost:161 dskPath
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: UCD-SNMP-MIB::dskPath
Any idea?, thanks
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Can you try with only that in snmpd.conf ?

Code: Select all

agentaddress tcp:161
rocommunity public
disk /
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
neji
Posts: 3
Joined: Wed Aug 01, 2007 4:51 pm

Post by neji »

fmangeant wrote:Can you try with only that in snmpd.conf ?

Code: Select all

agentaddress tcp:161
rocommunity public
disk /
Thanks!
I tried with that snmpd.conf and that's works. Now i can get that info and add that host in my cacti-host, and view the graphics. Thanks!
Antistar
Posts: 2
Joined: Tue Oct 09, 2007 4:04 am

man

Post by Antistar »

i just simply love you. thank you very much
Smux
Posts: 40
Joined: Mon Sep 10, 2007 2:47 pm

Post by Smux »

My net-snmp agent dont work when i click in Verbose Query to get informations to my processors. I just click and before 5 minutes my webserver returns error 500: internal error server, in my server, show a loop process to /usr/bin/php -q
/home/xxx/www/cacti/scripts/ss_host_cpu.php ... shows it:

Code: Select all

[root@svr02 ~]# /usr/bin/php -q /home/sigfbr/public_html/cacti/scripts/ss_host_disk.php xxx.xxx.xxx.xxx 6 2:161:500:public:::MD5::DES: index
No log handling enabled - turning on stderr logging
Cannot find module (MTA-MIB): At line 0 in (none)
Cannot find module (NETWORK-SERVICES-MIB): At line 0 in (none)
Cannot find module (LM-SENSORS-MIB): At line 0 in (none)
In my other server with net-snmp 5.3.1 this not happen...

Can anyone compile a version 5.4 to linux centos (fedore core 6) and attach here to me??
Last edited by Smux on Tue Dec 04, 2007 2:11 pm, edited 1 time in total.
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Can you :
  • update Net-SNMP to version 5.3.1-15 (available here) on your Fedora Core 6 box ?
  • unset the MIBS variable on your Cacti server ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
Smux
Posts: 40
Joined: Mon Sep 10, 2007 2:47 pm

Post by Smux »

hey fmangeant,

Thank you very much!! But when i click in Verbose Query my error persists... My cacti is 0.8.7a with svn revision at 4371.
Last edited by Smux on Tue Dec 04, 2007 2:08 pm, edited 1 time in total.
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Try that :

Code: Select all

$ unset MIBS
$ /usr/bin/php -q /home/sigfbr/public_html/cacti/scripts/ss_host_disk.php xx.xx.xx.xx 6 2:161:500:public:::MD5::DES: index
By the way, maybe you should remove your IP address from your previous post.
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
Smux
Posts: 40
Joined: Mon Sep 10, 2007 2:47 pm

Post by Smux »

Ip address removed:

Code: Select all

[root@svr02 snmp]# /usr/bin/php -q /home/sigfbr/public_html/cacti/scripts/ss_host_disk.php xx.xx.xx.xx 6 2:161:500:public:::MD5::DES: index
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15


[root@svr02 snmp]# /usr/bin/php -q /home/sigfbr/public_html/cacti/scripts/ss_host_cpu.php xx.xx.xx.xx 6 2:161:500:public:::MD5::DES: index

how to i solve my problem?
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Smux wrote:My cacti is 0.8.7a with svn revision at 4371.
Could you revert to 0.8.7a ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
Smux
Posts: 40
Joined: Mon Sep 10, 2007 2:47 pm

Post by Smux »

I have same problem with 0.8.7a.

This is my 0.8.7a with revision 4371:

Code: Select all

[root@svr02 snmp]# /usr/bin/php -q /home/sigfbr/public_html/cacti/scripts/ss_host_cpu.php localhost 2 2:161:500:public:::MD5::DES: index

[root@svr02 snmp]#
and my 0.8.7a:

Code: Select all

[root@svr02 snmp]# /usr/bin/php -q /home/sigfbr/public_html/cacti2/scripts/ss_host_cpu.php localhost 2 2:161:500:public:::MD5::DES: index
[root@svr02 snmp]#
if I check my other server with old cacti (0.8.7):

Code: Select all

root@svr03 [/home/admin]# /usr/bin/php -q /home/sysmon/public_html/cacti/scripts/ss_host_cpu.php localhost 2 2:161:500:public:::MD5::DES: index
0
1
2
3
root@svr03 [/home/admin]#
my snmpd.conf is the same for all my servers

Code: Select all

[root@svr02 snmp]# cat snmpd.conf

rocommunity public
syslocation ForBrazil - SvrXX
syscontact roberto@forbrazil.com.br
# dontPrintUnits true
includeAllDisks 10%


createUser xxxx MD5 xxxxxxx DES
group groupv3             usm      admfbrsnmp
view    all included   .iso      80
access groupv3         ""        any       auth      exact    systemview         all        all
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests