Cacti SNMP error

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
Andemik234
Posts: 6
Joined: Fri Jun 03, 2016 6:06 am

Cacti SNMP error

Post by Andemik234 »

Hello all,

I'm new to the cacti community, and I have a problem that i couldn't solve.

I followed some debuggins tutorials and i looked a lot of posts on the forum, but still blocked.

In cacti.log i have:

06/03/2016 11:25:25 AM - CMDPHP: Poller[0] WARNING: SNMP Get Timeout for Host:'serv2', and OID:'.1.3.6.1.2.1.1.3.0'
06/03/2016 11:25:26 AM - CMDPHP: Poller[0] Host[45] DS[627] WARNING: Result from CMD not valid. Partial Result: U
06/03/2016 11:25:26 AM - CMDPHP: Poller[0] Host[45] DS[627] WARNING: Result from CMD not valid. Partial Result: U
06/03/2016 11:25:26 AM - CMDPHP: Poller[0] Host[45] DS[628] WARNING: Result from CMD not valid. Partial Result: U

I have the "SNMP error" in red when i go on the 'serv2' device on cacti.
My cacti is running on 'serv2', and i can't graph his results. I have a lot of graphs thats work already, with other devices.

When i check my snmp agent, its seems all good:
snmpwalk -v 2c -c community localhost .1.3.6.1.2.1.1.1.0
SNMPv2-MIB::sysDescr.0 = STRING: Linux serv2 2.6.32-573.12.1.el6.x86_64 #1 SMP Mon Nov 23 12:55:32 EST 2015 x86_64

netstat -anp | grep 161
tcp 0 0 ::ffff:10.100.9.8:81 ::ffff:152.17.51.132:55161 TIME_WAIT -
udp 0 0 0.0.0.0:161 0.0.0.0:*

Crontab:
*/5 * * * * php /usr/share/cacti/poller.php &>/dev/null
00 * * * * echo "clean $(date)" > /usr/share/cacti/log/cacti.log

I tried with debugging level on the poller, with the id of the device:
grep 'Host\[97\]' cacti.log
06/03/2016 02:00:23 PM - CMDPHP: Poller[0] Host[97] SNMP: Host did not respond to SNMP
06/03/2016 02:04:22 PM - CMDPHP: Poller[0] Host[97] SNMP: Host did not respond to SNMP
06/03/2016 02:05:23 PM - CMDPHP: Poller[0] Host[97] SNMP: Host did not respond to SNMP
06/03/2016 02:10:22 PM - CMDPHP: Poller[0] Host[97] SNMP: Host did not respond to SNMP
06/03/2016 02:15:23 PM - CMDPHP: Poller[0] Host[97] SNMP: Host did not respond to SNMP
06/03/2016 02:20:22 PM - CMDPHP: Poller[0] Host[97] SNMP: Host did not respond to SNMP
06/03/2016 02:25:23 PM - CMDPHP: Poller[0] Host[97] SNMP: Host did not respond to SNMP
06/03/2016 02:30:23 PM - CMDPHP: Poller[0] Host[97] SNMP: Host did not respond to SNMP

I can ping it, and the cacti service run on this server.

Thank you in advance for your help. Sorry for the language.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Cacti SNMP error

Post by phalek »

And how did you setup the SNMP access to that device/server ? can you post the snmpd.conf ?

Compare what you have configured with my post here: https://www.urban-software.com/2016/05/ ... ver-cacti/
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Andemik234
Posts: 6
Joined: Fri Jun 03, 2016 6:06 am

Re: Cacti SNMP error

Post by Andemik234 »

There is my snmpd.conf:

rocommunity netwitness
disk /
disk /boot
disk /local/home
disk /local/opt
disk /tmp
disk /var
disk /local/opt/Dokuwiki
com2sec notConfigUser default public

group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser

view centreon included .1.3.6.1
view centreon included .1.3.6.1
view centreon included .1.3.6.1
view centreon included .1.3.6.1
view centreon included .1.3.6.1
view centreon included .1.3.6.1
view centreon included .1.3.6.1
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 centreon none none
access notConfigGroup "" any noauth exact systemview none none

syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)

dontLogTCPWrappersConnects yes

Thank you for you help and your post. I will check my configuration with it.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Cacti SNMP error

Post by phalek »

My guess is that you should comment out this line:

Code: Select all

access notConfigGroup "" any noauth exact systemview none none
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Andemik234
Posts: 6
Joined: Fri Jun 03, 2016 6:06 am

Re: Cacti SNMP error

Post by Andemik234 »

Thank you for your advice, i tried to comment out, but always the same problem.
Andemik234
Posts: 6
Joined: Fri Jun 03, 2016 6:06 am

Re: Cacti SNMP error

Post by Andemik234 »

I modified my snmpd.conf with the How To of Phalek.

There it is:
rocommunity netwitness
disk /
disk /boot
disk /local/home
disk /local/opt
disk /tmp
disk /var
disk /local/opt/Dokuwiki

com2sec notConfigUser default netwitness
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
view allview included .1
access notConfigGroup "" any noauth exact allview none none
syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)

snmpwalk -v 2c -c netwitness localhost .1.3.6.1.2.1.1.1.0
SNMPv2-MIB::sysDescr.0 = STRING: Linux fr0-vsiaas-1225 2.6.32-573.12.1.el6.x86_64 #1 SMP Mon Nov 23 12:55:32 EST 2015 x86_64

snmpwalk -v 2c -c netwitness localhost .1.3.6.1.4.1.2021.100.2.0
UCD-SNMP-MIB::versionTag.0 = STRING: 5.5

There are no rules in Ip.tables that could prevent the snmp connection.

I can't understand why i have a SNMP error, for my localhost.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Cacti SNMP error

Post by phalek »

Now that you've done that. GO to cacti, edit the device and make sure the SNMP Version is "2c" and the community matches the one you've chosen.

Once you hit the "Save" button, you should be able to see some SNMP Information to the top-left of the device screen. Can you check and tell us what you see there ?
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Andemik234
Posts: 6
Joined: Fri Jun 03, 2016 6:06 am

Re: Cacti SNMP error

Post by Andemik234 »

I can see "SNMP error" again.

Device1 (Device1)
SNMP Information
SNMP error

Not like an another external device, who works:

Device2 (Device2)
SNMP Information
System:15:21:19:08:UTC:2015:X86_64
Uptime: 457773921 (52 days, 23 hours, 35 minutes)
Hostname: fr0-log-p20
Location: undisclosed
Contact: undisclosed
Andemik234
Posts: 6
Joined: Fri Jun 03, 2016 6:06 am

Re: Cacti SNMP error

Post by Andemik234 »

I tried to put 127.0.0.1, as hostname for my device, because its the localhost.

It works fine:

Device1(127.0.0.1)
SNMP Information
System:Linux Device1 2.6.32-573.12.1.el6.x86_64 #1 SMP Mon Nov 23
12:55:32 EST 2015 x86_64
Uptime: 6951662 (0 days, 19 hours, 18 minutes)
Hostname: Device1
Location: Unknown (edit /etc/snmp/snmpd.conf)
Contact: Root root@localhost (configure /etc/snmp/snmp.local.conf)

I don't know why when i configure with the hostname it doesn't work. Thank you for all the help !
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest