Some data sources return 0 from snmp[SOLVED]

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
pompompom
Posts: 6
Joined: Mon Jan 30, 2023 12:39 am

Some data sources return 0 from snmp[SOLVED]

Post by pompompom »

I have installed and configured cacti successfully.
Only one problem: I cannot get network statistics and disk partitions form snmp
Cacti said..

Code: Select all

Total: 0.020000, Delta: 0.020000, Executing SNMP get for num of indexes @ '.1.3.6.1.2.1.2.1.0' Index Count:
Total: 0.020000, Delta: 0.000000, Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1' Index Count: 0
Total: 0.020000, Delta: 0.000000, No SNMP data returned
snmpwalk works fine

Code: Select all

snmpwalk -v3 -l authPriv -u myuser -a SHA512 -A "password" -x AES -X "password" cacti1.server  IF-MIB::ifDescr.2
IF-MIB::ifDescr.2 = STRING: eth0
System is Debian 11, both server and monitored client
Last edited by pompompom on Wed Feb 01, 2023 7:57 pm, edited 1 time in total.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Some data sources return 0 from snmp

Post by TheWitness »

Don't use the snmpd.conf strait from the distro. As a beginner, just use a one line snmpd.conf "ro public", then restart snmpd. That'll get you SNMP v2 access.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
pompompom
Posts: 6
Joined: Mon Jan 30, 2023 12:39 am

Re: Some data sources return 0 from snmp

Post by pompompom »

TheWitness wrote: Wed Feb 01, 2023 6:49 am Don't use the snmpd.conf strait from the distro. As a beginner, just use a one line snmpd.conf "ro public", then restart snmpd. That'll get you SNMP v2 access.
Thanks, but for security reason I prefer snmpv3.

I have tried using snmpv2 and...

Code: Select all

Total: 0.000000, Delta: 0.000000, Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/interface.xml'
Total: 0.000000, Delta: 0.000000, Running Data Query [4].
Total: 0.000000, Delta: 0.000000, Found Type = '3' [SNMP Query].
Total: 0.000000, Delta: 0.000000, XML file parsed ok.
Total: 2.510000, Delta: 2.500000, Executing SNMP get for num of indexes @ '.1.3.6.1.2.1.2.1.0' Index Count:
Total: 5.010000, Delta: 2.500000, Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1' Index Count: 0
Total: 5.010000, Delta: 0.000000, No SNMP data returned
Last edited by pompompom on Wed Feb 01, 2023 2:53 pm, edited 1 time in total.
pompompom
Posts: 6
Joined: Mon Jan 30, 2023 12:39 am

Re: Some data sources return 0 from snmp

Post by pompompom »

I notice that using snmpv3 the oid is different

Code: Select all

snmpwalk -v3 -l authPriv -u myuser -a SHA512 -A "pass" -x AES -X "pass" cacti1 iso.3.6.1.2.1.31.1.1.1.1.2
iso.3.6.1.2.1.31.1.1.1.1.2 = STRING: "eth0"
I have tried snmpwalk v2c with the oid searched by cacti

Code: Select all

snmpwalk -v2c -c public cacti1 -On 1.3.6.1.2.1.2.2.1.1
return..

Code: Select all

.1.3.6.1.2.1.2.2.1.1 = No Such Object available on this agent at this OID
I forgot one thing, the monitored machine are kvm/qemu vm.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Some data sources return 0 from snmp

Post by TheWitness »

You'll figure it out eventually.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
pompompom
Posts: 6
Joined: Mon Jan 30, 2023 12:39 am

Re: Some data sources return 0 from snmp[SOLVED]

Post by pompompom »

I have found a solution, but my post disappear.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Some data sources return 0 from snmp[SOLVED]

Post by TheWitness »

Good.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
pompompom
Posts: 6
Joined: Mon Jan 30, 2023 12:39 am

Re: Some data sources return 0 from snmp[SOLVED]

Post by pompompom »

The solution was to use MD5 instead of SHA when I create the user with snmp.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests