Unable to see CPU and disk information after Cacti upgrade

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

Moderators: Developers, Moderators

Post Reply
onnastick
Posts: 7
Joined: Fri Feb 04, 2005 12:27 pm

Unable to see CPU and disk information after Cacti upgrade

Post by onnastick »

Last week, I upgraded Cacti from 0.8.6d to 0.8.6g. We have a bunch (a few dozen) of Windows 2000 Server hosts where we are graphing CPU utilization, available disk space, free memory, traffic, etc.

Since the upgrade, the CPU utilization and available disk space are no longer showing any data in the graphs. I have not been using Cacti very long, so I'm not sure of exactly what data to collect to troubleshoot this problem. I tried clicking Verbose Query next to SNMP - Get Processor Information, and this is what it says:

Code: Select all

+ Running data query [9].
+ Found type = '6 '[script query].
+ Found data query XML file at '/opt/www/html/cacti/resource/script_server/host_cpu.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /opt/www/html/cacti/scripts/ss_host_cpu.php 10.4.102.10 3 2:161:500:public:::MD5::[None] index'
+ Executing script query '/usr/bin/php -q /opt/www/html/cacti/scripts/ss_host_cpu.php 10.4.102.10 3 2:161:500:public:::MD5::[None] query index'
+ Found data query XML file at '/opt/www/html/cacti/resource/script_server/host_cpu.xml'
+ Found data query XML file at '/opt/www/html/cacti/resource/script_server/host_cpu.xml'
+ Found data query XML file at '/opt/www/html/cacti/resource/script_server/host_cpu.xml'
+ Found data query XML file at '/opt/www/html/cacti/resource/script_server/host_cpu.xml'
+ Found data query XML file at '/opt/www/html/cacti/resource/script_server/host_cpu.xml'
If there is some data I can collect to troubleshoot this problem, please let me know. Thanks.
onnastick
Posts: 7
Joined: Fri Feb 04, 2005 12:27 pm

Post by onnastick »

Further information: each time a poll occurs, I get a large number of these messages in the cacti/log/cacti.log file:

Code: Select all

03/06/2006 01:05:05 PM - CACTID: Poller[0] Host[75] DS[601] SS[1] WARNING: Result from SERVER not valid.  Partial Result: ...
onnastick
Posts: 7
Joined: Fri Feb 04, 2005 12:27 pm

Post by onnastick »

Okay, I did some more digging and found that when the poll occurs, according to a sniffer trace, the machine running cacti sends SNMP queries only for the sysUpTime and the ifInOctets of the interfaces, but nothing else. So I am guessing this is some sort of script/cacti issue.
onnastick
Posts: 7
Joined: Fri Feb 04, 2005 12:27 pm

Post by onnastick »

Also, I looked in the ss_host_cpu.php script to see what OID is supposed to be queried, and when I do an snmpwalk from the command line with the same version and community string that cacti is configured to use, it seems to work fine:

Code: Select all

# snmpwalk -c public -v 2c 10.4.102.10 .1.3.6.1.2.1.25.3.3.1
HOST-RESOURCES-MIB::hrProcessorFrwID.1 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorFrwID.2 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorLoad.1 = INTEGER: 5
HOST-RESOURCES-MIB::hrProcessorLoad.2 = INTEGER: 5
#
onnastick
Posts: 7
Joined: Fri Feb 04, 2005 12:27 pm

Post by onnastick »

Anyone have any suggestions on how to narrow down what is happening? From my observations, it appears to be a Cacti problem (either config, which hasn't changed, or software) or possibly PHP/SNMP problem.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Find out what OID(s) it's improperly polling by enabling debugging. Turn the polling level in cacti to debug (Settings | Polling level) for one cycle, wait for Cacti to run, and paste the output of the actual log file (<webroot>/cacti/log/cacti.log). If it contains WEBLOG entries, then don't bother posting since they just clutter up the log. Turn off WEBEVENTS logging and try again.
onnastick
Posts: 7
Joined: Fri Feb 04, 2005 12:27 pm

Post by onnastick »

Thanks for responding! The log with debug setting is extremely long. If you would like me to make the whole log from the single poll available elsewhere, let me know and I can put it somewhere, but hopefully this will be enough, I am pasting the log entries for 1 host only.

Code: Select all

03/07/2006 01:30:00 PM - CACTID: Poller[0] DEBUG: In Poller, About to Start Polling of Host
03/07/2006 01:30:00 PM - CACTID: Poller[0] MYSQL: Connecting to MySQL database 'cacti' on 'localhost'...
03/07/2006 01:30:00 PM - CACTID: Poller[0] DEBUG: Valid Thread to be Created
03/07/2006 01:30:00 PM - CACTID: Poller[0] DEBUG: The Value of Active Threads is 4
03/07/2006 01:30:00 PM - CACTID: Poller[0] MYSQL: Connected to MySQL database 'cacti' on 'localhost'...
03/07/2006 01:30:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '29': 'SELECT id, hostname,snmp_community,snmp_username,snmp_passwo
rd,snmp_version,snmp_port,snmp_timeout,status,status_event_count,status_fail_date,status_rec_date,status_last_error,min_time,max_tim
e,cur_time,avg_time,total_polls,failed_polls,availability FROM host WHERE id=3'
03/07/2006 01:30:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '29': OK
03/07/2006 01:30:00 PM - CACTID: Poller[0] Host[3] SNMP Result: Host responded to SNMP
03/07/2006 01:30:00 PM - CACTID: Poller[0] DEBUG: MySQL Insert ID '5': 'update host set status='3',status_event_count='0', status_fa
il_date='2006-03-01 11:05:00',status_rec_date='2006-02-14 11:45:00',status_last_error='Host did not respond to SNMP',min_time='0.580
070',max_time='999.999990',cur_time='1.266960',avg_time='5.842286',total_polls='143972',failed_polls='10776',availability='92.5152' 
where id='3''
03/07/2006 01:30:00 PM - CACTID: Poller[0] DEBUG: MySQL Insert ID '5': OK
03/07/2006 01:30:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '30': 'SELECT data_query_id,action,op,assert_value,arg1 FROM poller
_reindex WHERE host_id=3'
03/07/2006 01:30:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '30': OK
03/07/2006 01:30:00 PM - CACTID: Poller[0] Host[3] RECACHE: Processing 3 items in the auto reindex cache for '10.4.102.10'
03/07/2006 01:30:00 PM - CACTID: Poller[0] DEBUG: MySQL Insert ID '6': 'update poller_reindex set assert_value='7906577' where host_
id='3' and data_query_id='1' and arg1='.1.3.6.1.2.1.1.3.0''
03/07/2006 01:30:00 PM - CACTID: Poller[0] DEBUG: MySQL Insert ID '6': OK
03/07/2006 01:30:00 PM - CACTID: Poller[0] DEBUG: MySQL Insert ID '7': 'update poller_reindex set assert_value='7906577' where host_
id='3' and data_query_id='8' and arg1='.1.3.6.1.2.1.1.3.0''
03/07/2006 01:30:00 PM - CACTID: Poller[0] DEBUG: MySQL Insert ID '7': OK
03/07/2006 01:30:00 PM - CACTID: Poller[0] DEBUG: MySQL Insert ID '8': 'update poller_reindex set assert_value='7906577' where host_
id='3' and data_query_id='9' and arg1='.1.3.6.1.2.1.1.3.0''
03/07/2006 01:30:00 PM - CACTID: Poller[0] DEBUG: MySQL Insert ID '8': OK
03/07/2006 01:30:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '31': 'SELECT action,hostname,snmp_community,snmp_version,snmp_user
name,snmp_password,rrd_name,rrd_path,arg1,arg2,arg3,local_data_id,rrd_num,snmp_port,snmp_timeout FROM poller_item WHERE host_id=3 OR
DER BY arg1'
03/07/2006 01:30:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '31': OK

03/07/2006 01:30:00 PM - PHPSVR: Poller[0] DEBUG: INCLUDE: '/opt/www/html/cacti/scripts/ss_host_cpu.php' SCRIPT: 'ss_host_cpu' CMD: 
'10.4.102.10 3 2:161:500:public:::MD5::[None] get usage 0'
03/07/2006 01:30:00 PM - CACTID: Poller[0] Host[3] DS[39] SS[0] WARNING: Result from SERVER not valid.  Partial Result: ...
03/07/2006 01:30:00 PM - CACTID: Poller[0] Host[3] DS[39] SS[0] SERVER: /opt/www/html/cacti/scripts/ss_host_cpu.php ss_host_cpu 10.4
.102.10 3 2:161:500:public:::MD5::[None] get usage 0, output: U
03/07/2006 01:30:00 PM - PHPSVR: Poller[0] SERVER: /opt/www/html/cacti/scripts/ss_host_cpu.php ss_host_cpu 10.4.102.10 3 2:161:500:p
ublic:::MD5::[None] get usage 0 output U
03/07/2006 01:30:00 PM - PHPSVR: Poller[0] DEBUG: INCLUDE: '/opt/www/html/cacti/scripts/ss_host_cpu.php' SCRIPT: 'ss_host_cpu' CMD: 
'10.4.102.10 3 2:161:500:public:::MD5::[None] get usage 1'
03/07/2006 01:30:01 PM - CACTID: Poller[0] DEBUG: In Poller, About to Start Polling of Host
03/07/2006 01:30:01 PM - CACTID: Poller[0] MYSQL: Connecting to MySQL database 'cacti' on 'localhost'...
03/07/2006 01:30:01 PM - CACTID: Poller[0] DEBUG: Valid Thread to be Created
03/07/2006 01:30:01 PM - CACTID: Poller[0] DEBUG: The Value of Active Threads is 5
03/07/2006 01:30:01 PM - CACTID: Poller[0] MYSQL: Connected to MySQL database 'cacti' on 'localhost'...
03/07/2006 01:30:01 PM - CACTID: Poller[0] Host[3] DS[40] SS[1] WARNING: Result from SERVER not valid.  Partial Result: ...
03/07/2006 01:30:01 PM - CACTID: Poller[0] Host[3] DS[40] SS[1] SERVER: /opt/www/html/cacti/scripts/ss_host_cpu.php ss_host_cpu 10.4
.102.10 3 2:161:500:public:::MD5::[None] get usage 1, output: U
03/07/2006 01:30:01 PM - PHPSVR: Poller[0] SERVER: /opt/www/html/cacti/scripts/ss_host_cpu.php ss_host_cpu 10.4.102.10 3 2:161:500:p
ublic:::MD5::[None] get usage 1 output U
03/07/2006 01:30:01 PM - PHPSVR: Poller[0] DEBUG: INCLUDE: '/opt/www/html/cacti/scripts/ss_host_disk.php' SCRIPT: 'ss_host_disk' CMD
: '10.4.102.10 3 2:161:500:public:::MD5::[None] get total 2'
03/07/2006 01:30:01 PM - CACTID: Poller[0] Host[3] DS[37] SS[0] WARNING: Result from SERVER not valid.  Partial Result: ...
03/07/2006 01:30:01 PM - CACTID: Poller[0] Host[3] DS[37] SS[0] SERVER: /opt/www/html/cacti/scripts/ss_host_disk.php ss_host_disk 10
.4.102.10 3 2:161:500:public:::MD5::[None] get total 2, output: U
03/07/2006 01:30:01 PM - PHPSVR: Poller[0] SERVER: /opt/www/html/cacti/scripts/ss_host_disk.php ss_host_disk 10.4.102.10 3 2:161:500
:public:::MD5::[None] get total 2 output U
03/07/2006 01:30:01 PM - PHPSVR: Poller[0] DEBUG: INCLUDE: '/opt/www/html/cacti/scripts/ss_host_disk.php' SCRIPT: 'ss_host_disk' CMD
: '10.4.102.10 3 2:161:500:public:::MD5::[None] get total 5'
03/07/2006 01:30:01 PM - CACTID: Poller[0] Host[3] DS[38] SS[1] WARNING: Result from SERVER not valid.  Partial Result: ...
03/07/2006 01:30:01 PM - CACTID: Poller[0] Host[3] DS[38] SS[1] SERVER: /opt/www/html/cacti/scripts/ss_host_disk.php ss_host_disk 10
.4.102.10 3 2:161:500:public:::MD5::[None] get total 5, output: U
03/07/2006 01:30:01 PM - PHPSVR: Poller[0] SERVER: /opt/www/html/cacti/scripts/ss_host_disk.php ss_host_disk 10.4.102.10 3 2:161:500
:public:::MD5::[None] get total 5 output U
03/07/2006 01:30:01 PM - PHPSVR: Poller[0] DEBUG: INCLUDE: '/opt/www/html/cacti/scripts/ss_host_disk.php' SCRIPT: 'ss_host_disk' CMD
: '10.4.102.10 3 2:161:500:public:::MD5::[None] get used 2'
03/07/2006 01:30:01 PM - CACTID: Poller[0] Host[3] DS[37] SS[0] WARNING: Result from SERVER not valid.  Partial Result: ...
03/07/2006 01:30:01 PM - CACTID: Poller[0] Host[3] DS[37] SS[0] SERVER: /opt/www/html/cacti/scripts/ss_host_disk.php ss_host_disk 10
.4.102.10 3 2:161:500:public:::MD5::[None] get used 2, output: U
03/07/2006 01:30:01 PM - PHPSVR: Poller[0] SERVER: /opt/www/html/cacti/scripts/ss_host_disk.php ss_host_disk 10.4.102.10 3 2:161:500
:public:::MD5::[None] get used 2 output U
03/07/2006 01:30:01 PM - PHPSVR: Poller[0] DEBUG: INCLUDE: '/opt/www/html/cacti/scripts/ss_host_disk.php' SCRIPT: 'ss_host_disk' CMD
: '10.4.102.10 3 2:161:500:public:::MD5::[None] get used 5'

03/07/2006 01:30:01 PM - CACTID: Poller[0] Host[3] DS[38] SS[1] WARNING: Result from SERVER not valid.  Partial Result: ...
03/07/2006 01:30:01 PM - CACTID: Poller[0] Host[3] DS[38] SS[1] SERVER: /opt/www/html/cacti/scripts/ss_host_disk.php ss_host_disk 10
.4.102.10 3 2:161:500:public:::MD5::[None] get used 5, output: U
03/07/2006 01:30:01 PM - PHPSVR: Poller[0] SERVER: /opt/www/html/cacti/scripts/ss_host_disk.php ss_host_disk 10.4.102.10 3 2:161:500
:public:::MD5::[None] get used 5 output U
03/07/2006 01:30:01 PM - CACTID: Poller[0] Host[3] DS[27] SNMP: v2: 10.4.102.10, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.1677
7219, value: 1798367684
03/07/2006 01:30:01 PM - CACTID: Poller[0] Host[3] DS[27] SNMP: v2: 10.4.102.10, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.167
77219, value: 419775975
03/07/2006 01:30:01 PM - CACTID: Poller[0] Host[3] DS[30] SNMP: v2: 10.4.102.10, dsname: users, oid: .1.3.6.1.2.1.25.1.5.0, value: 2
7
03/07/2006 01:30:01 PM - CACTID: Poller[0] Host[3] DS[31] SNMP: v2: 10.4.102.10, dsname: proc, oid: .1.3.6.1.2.1.25.1.6.0, value: 57
03/07/2006 01:30:01 PM - CACTID: Poller[0] Host[3] DS[169] SNMP: v2: 10.4.102.10, dsname: ccm_free_phymem, oid: .1.3.6.1.4.1.232.11.
2.13.2.0, value: 2569
03/07/2006 01:30:01 PM - CACTID: Poller[0] Host[3] DS[170] SNMP: v2: 10.4.102.10, dsname: ccm_free_virmem, oid: .1.3.6.1.4.1.232.11.
2.13.4.0, value: 327
03/07/2006 01:30:01 PM - CACTID: Poller[0] DEBUG: MySQL Insert ID '9': 'INSERT INTO poller_output (local_data_id,rrd_name,time,outpu
t) VALUES (27,'traffic_in','2006-03-07 13:30:00','1798367684'),(27,'traffic_out','2006-03-07 13:30:00','419775975'),(30,'users','200
6-03-07 13:30:00','27'),(31,'proc','2006-03-07 13:30:00','57'),(169,'ccm_free_phymem','2006-03-07 13:30:00','2569'),(170,'ccm_free_v
irmem','2006-03-07 13:30:00','327'),(39,'cpu','2006-03-07 13:30:00','U'),(40,'cpu','2006-03-07 13:30:00','U'),(37,'hdd_total','2006-
03-07 13:30:00','U'),(38,'hdd_total','2006-03-07 13:30:00','U'),(37,'hdd_used','2006-03-07 13:30:00','U'),(38,'hdd_used','2006-03-07
 13:30:00','U')'
03/07/2006 01:30:01 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '32': 'SELECT id, hostname,snmp_community,snmp_username,snmp_passwo
rd,snmp_version,snmp_port,snmp_timeout,status,status_event_count,status_fail_date,status_rec_date,status_last_error,min_time,max_tim
e,cur_time,avg_time,total_polls,failed_polls,availability FROM host WHERE id=4'
03/07/2006 01:30:01 PM - CACTID: Poller[0] DEBUG: MySQL Insert ID '9': OK
03/07/2006 01:30:01 PM - CACTID: Poller[0] Host[3] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
03/07/2006 01:30:01 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '32': OK
onnastick
Posts: 7
Joined: Fri Feb 04, 2005 12:27 pm

Post by onnastick »

I believe I have resolved the problem. Step 7 in the cacti/docs/UPGRADE says to copy all custom scripts from the old cacti to the new one, but the command line says:

shell> cp cacti_old/scripts/* cacti/scripts/

So, when I ran this step without fully understanding cacti yet, I overwrote all the new scripts (such as ss_host_cpu.php) with the old ones. After I extracted another copy of 0.8.6g, I copied all the scripts back in -- since we have no customized ones -- and now when I refresh the data queries at the bottom of the device configuration page, it works.

Glad we got it figured out, but make the documentation a little more concise for people who haphazardly copy and paste the command-lines like me. :oops:
User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

You are correct. I thought we had fixed that section of the documentation :(

TheWitness
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?
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests