Stuck at Cacti Installation Guide

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

Moderators: Developers, Moderators

cboyd213
Cacti User
Posts: 54
Joined: Sat Apr 05, 2008 12:15 am

Post by cboyd213 »

for my peplink if I go to: Create Graphs for this Host

It shows:
Data Query [SNMP - Interface Statistics]
This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.

Data Query Debug Information

+ Running data query [1].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/interface.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1'
+ No SNMP data returned
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/interface.xml'

What does this mean please?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

cboyd213 wrote:It is already set to SMMP only
But the screenshot shows "Ping and SNMP". What is correct, then?
Reinhard
cboyd213
Cacti User
Posts: 54
Joined: Sat Apr 05, 2008 12:15 am

Post by cboyd213 »

Sorry what I should have said is that I changed it to SNMP after I sent the screenshot and before you sent me the post

PEPLINK:
Associated Graph Templates
Graph Template Name Status
1) ucd/net - Memory Usage Not Being Graphed

when I click "Create Graphs for this Host"
I see:
Image

For Web-FTP Server 03:
Associated Graph Templates
Graph Template Name Status
1) Host MIB - Logged in Users Not Being Graphed
2) Host MIB - Processes Not Being Graphed

when I click "Create Graphs for this Host"
I see:
Image
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

cboyd213 wrote:+ Running data query [1].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/interface.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1'
+ No SNMP data returned
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/interface.xml'
In fact, this is the reason why the table of interfaces is empty in your last post. Core reason is
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1'
+ No SNMP data returned
In other words: cacti did an snmpwalk on OID '.1.3.6.1.2.1.2.2.1.1' and did not receive any answer. But from
snmpwalk -c crazycharter -v 2c 192.168.4.1 interface
IF-MIB::ifNumber.0 = INTEGER: 4
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifIndex.3 = INTEGER: 3
IF-MIB::ifIndex.4 = INTEGER: 4
IF-MIB::ifDescr.1 = STRING: LAN
IF-MIB::ifDescr.2 = STRING: WAN1
IF-MIB::ifDescr.3 = STRING: WAN2
IF-MIB::ifDescr.4 = STRING: WAN3
...
you found that the device is responding to a plain manual snmpwalk, showing indeed the interface index list.
So there MIGHT be a problem with the php-snmp code.

Please first verify, whether you are using php-snmp or plain net-snmp libraries. Visit the System Utilities to find all system information. If php-snmp is used, please de-install it and retry.
Reinhard
cboyd213
Cacti User
Posts: 54
Joined: Sat Apr 05, 2008 12:15 am

Post by cboyd213 »

Looks like both:

Running
net-snmp - 1:5.3.1
net-snmp-libs - 1:5.3.1
net-snmp-utils - 1:5.3.1
php-snmp - 5.1.6

I did reinstall php-snmp but it toke cacti with it so I also had to install cacti back
Still getting the same error message

Also I tried setting up a graph for my server 03 box and getting:

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Web-FTP Server 03 - CPU Usage" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="percent" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/cacti/rra/web-ftp_server_03_cpu_system_61.rrd":cpu_system:AVERAGE \
DEF:b="/var/www/cacti/rra/web-ftp_server_03_cpu_user_62.rrd":cpu_user:AVERAGE \
DEF:c="/var/www/cacti/rra/web-ftp_server_03_cpu_nice_60.rrd":cpu_nice:AVERAGE \
CDEF:cdefbc=TIME,1210921073,GT,a,a,UN,0,a,IF,IF,TIME,1210921073,GT,b,b,UN,0,b,IF,IF,TIME,1210921073,GT,c,c,UN,0,c,IF,IF,+,+ \
AREA:a#FF0000FF:"System" \
GPRINT:a:LAST:"Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" \
AREA:b#0000FFFF:"User":STACK \
GPRINT:b:LAST:" Current\:%8.2lf %s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n" \
AREA:c#00FF00FF:"Nice":STACK \
GPRINT:c:LAST:" Current\:%8.2lf %s" \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:c:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:cdefbc#000000FF:"Total" \
GPRINT:cdefbc:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefbc:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefbc:MAX:"Maximum\:%8.2lf %s"

RRDTool Says:

ERROR: opening '/var/www/cacti/rra/web-ftp_server_03_cpu_system_61.rrd': No such file or directory
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

If everything else fails, let's do a code change.

First, please copy lib/snmp.php to lib/snmp.php.save.
Then, please edit lib/snmp.php and find function snmp_get_method. Change all occurences of SNMP_METHOD_PHP to SNMP_METHOD_BINARY and retry.

This will force cacti using net-snmp libraries instead of php-snmp, but without deinstalling php-snmp.
Reinhard
cboyd213
Cacti User
Posts: 54
Joined: Sat Apr 05, 2008 12:15 am

Post by cboyd213 »

Thanks for your with this but I tried it and it's still gaving me the same error:

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="WEB-FTP Server 03 - CPU Usage" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="percent" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/cacti/rra/web-ftp_server_03_cpu_system_42.rrd":cpu_system:AVERAGE \
DEF:b="/var/www/cacti/rra/web-ftp_server_03_cpu_user_43.rrd":cpu_user:AVERAGE \
DEF:c="/var/www/cacti/rra/web-ftp_server_03_cpu_nice_41.rrd":cpu_nice:AVERAGE \
CDEF:cdefbc=TIME,1211118857,GT,a,a,UN,0,a,IF,IF,TIME,1211118857,GT,b,b,UN,0,b,IF,IF,TIME,1211118857,GT,c,c,UN,0,c,IF,IF,+,+ \
AREA:a#FF0000FF:"System" \
GPRINT:a:LAST:"Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" \
AREA:b#0000FFFF:"User":STACK \
GPRINT:b:LAST:" Current\:%8.2lf %s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n" \
AREA:c#00FF00FF:"Nice":STACK \
GPRINT:c:LAST:" Current\:%8.2lf %s" \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:c:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:cdefbc#000000FF:"Total" \
GPRINT:cdefbc:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefbc:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefbc:MAX:"Maximum\:%8.2lf %s"

RRDTool Says:
ERROR: opening '/var/www/cacti/rra/web-ftp_server_03_cpu_system_42.rrd': No such file or directory
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please let's stick for the moment with Verbose Query. This step comes first. So we have to resolve it prior to anything else.
Reinhard
cboyd213
Cacti User
Posts: 54
Joined: Sat Apr 05, 2008 12:15 am

Post by cboyd213 »

not sure what you mean
Are you talking about the error I'm getting on the peplink

Data Query Debug Information
+ Running data query [1].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/interface.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1'
+ No SNMP data returned
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/interface.xml'

I'm not having a data probelm when I add my server 03 box to cacti
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Yep. Does the behaviour change if my last recommendations are met?
Reinhard
cboyd213
Cacti User
Posts: 54
Joined: Sat Apr 05, 2008 12:15 am

Post by cboyd213 »

Nope. Same error
pdt256
Posts: 2
Joined: Thu Oct 16, 2008 2:13 pm

peplink snmp problem

Post by pdt256 »

I am having the same problem. I run the Verbose Query for SNMP - Interface Statistics on my PePLink router:

Code: Select all

+ Running data query [1].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/local/src/cacti-0.8.7b/resource/snmp_queries/interface.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1'
+ No SNMP data returned
+ Found data query XML file at '/usr/local/src/cacti-0.8.7b/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/usr/local/src/cacti-0.8.7b/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/usr/local/src/cacti-0.8.7b/resource/snmp_queries/interface.xml'
However, when I run a snmpwalk from the Linux command line everything is returned fine.

Code: Select all

$ snmpwalk -v 2c -c public 192.168.1.100 .1.3.6.1.2.1.2.2.1
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifIndex.3 = INTEGER: 3
IF-MIB::ifDescr.1 = STRING: LAN
IF-MIB::ifDescr.2 = STRING: WAN1
IF-MIB::ifDescr.3 = STRING: WAN2
IF-MIB::ifType.1 = INTEGER: ethernetCsmacd(6)
IF-MIB::ifType.2 = INTEGER: ethernetCsmacd(6)
IF-MIB::ifType.3 = INTEGER: ethernetCsmacd(6)
[/code]
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

With 087b, Cacti performs

Code: Select all

snmpbulkwalk -c ... -v 2c -O Qn -Cr50 ... <host> <OID>
Please try this on your target.
An assumption would be, that the target does not support snmpbulkwalk.
Using 087b, a workaround would be to use SNMP V1; cacti will use snmpwalk, then.
Or check out 087c BETA1. This version allows using SNMP V2c. In this case, when setting the maximum number of OIDs to 1 for this host, cacti will automatically switch to using snmpwalk instead of snmpbulkwalk
Reinhard
pdt256
Posts: 2
Joined: Thu Oct 16, 2008 2:13 pm

Post by pdt256 »

Switching to SNMP v1 worked great. Thanks for the quick response.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Glad to hear this. So 087c would definitively be good for you
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest