CPU Graph Problem
Moderators: Developers, Moderators
CPU Graph Problem
All my graphs which are the same template work fine except my CPU one. On some servers I get 0 as the value on the graph and on other servers I get NaN.
I already checked out gandalfs link to debugging... it still doesn't work. I would really appreciate some help because I've been struggling with this for a number of days now.
I already checked out gandalfs link to debugging... it still doesn't work. I would really appreciate some help because I've been struggling with this for a number of days now.
Step 1 (Check Cacti Log File):
I'm receiving
"WARNING: Result from CMD not valid. Partial Result: "
in the Cacti Log.
I'm not receiving
"CACTID: Host[...] DS[....] WARNING: SNMP timeout detected [500 ms], ignoring host '........'"
anywhere.
Step 2 (Check Basic Data Gathering):
When I run the 'sudo su - root /usr/local/cacti/scripts/f5-bigip-tmm-cpu.pl
<hostname> <snmp community>' command the output is the following:
I didn't think much of this because my TMM-memory scripts also brings up errors, but works just fine. This is the output I get if I run the TMM memory script if you are curious.
For snmpget I'm putting in ' snmpget -c public -v 2c bigip1.xxx.xxx.com .1.3.6.1.4.1.2021.10.1.3'
and receiving the following:
but with 'snmpwalk -c public -v 2c bigip1.xxxx.xxx.com .1.3.6.1.4.1.2021.10.1.3'
I'm receiving:
Step 3 Check cacti's poller:
Verified that my crontab is showing poller.php. I have cmd.php selected as my poller type.
I went ahead and changed Poller Logging Level to 'DEBUG'. Looking at the Cact.log I found this output.
The path /usr/local/cacti/scripts/ is correct. The name of the file is correct too.
--------------------------------------------------
Not sure if you want me to keep on going gandalf or if you have already spotted the error. Please let me know. I've attached the TMM-cpu file that i'm using along w/ a pic of evidence that my TMM memory is working fine. (Reminder: I'm using ver 0.8.7a) One thing that I'd like to add, my memory_limit under PHP Information in the Cacti Technical Support is stating that "It is highly suggested that you alter you php.ini memory_limit to 16M or higher." I increased it to 32MB (I have yet to restart the web server for it to take effect, it is still currently reading 8MB), not sure if this would have anything to do with the problem.
I'm receiving
"WARNING: Result from CMD not valid. Partial Result: "
in the Cacti Log.
I'm not receiving
"CACTID: Host[...] DS[....] WARNING: SNMP timeout detected [500 ms], ignoring host '........'"
anywhere.
Step 2 (Check Basic Data Gathering):
When I run the 'sudo su - root /usr/local/cacti/scripts/f5-bigip-tmm-cpu.pl
<hostname> <snmp community>' command the output is the following:
Code: Select all
/usr/local/cacti/scripts/f5-bigip-tmm-cpu.pl: line 6: syntax error near unexpected token `('
/usr/local/cacti/scripts/f5-bigip-tmm-cpu.pl: line 6: `use Net::SNMP qw(:snmp);'
Code: Select all
/usr/local/cacti/scripts/ss_f5-bigip-tmm-memory.php: line 1: ?php: No such file or directory
/usr/local/cacti/scripts/ss_f5-bigip-tmm-memory.php: line 2: =: command not found
/usr/local/cacti/scripts/ss_f5-bigip-tmm-memory.php: line 4: /1: Permission denied
/usr/local/cacti/scripts/ss_f5-bigip-tmm-memory.php: line 5: syntax error near unexpected token `E_ERROR'
/usr/local/cacti/scripts/ss_f5-bigip-tmm-memory.php: line 5: `error_reporting(E_ERROR);'
and receiving the following:
Code: Select all
UCD-SNMP-MIB::laLoad = No Such Instance currently exists at this OID
I'm receiving:
Code: Select all
UCD-SNMP-MIB::laLoad.1 = STRING: 1.02
UCD-SNMP-MIB::laLoad.2 = STRING: 1.03
UCD-SNMP-MIB::laLoad.3 = STRING: 1.00
Verified that my crontab is showing poller.php. I have cmd.php selected as my poller type.
I went ahead and changed Poller Logging Level to 'DEBUG'. Looking at the Cact.log I found this output.
Code: Select all
06/25/2008 10:20:22 AM - CMDPHP: Poller[0] Host[25] DS[383] WARNING: Result from CMD not valid. Partial Result:
06/25/2008 10:20:22 AM - CMDPHP: Poller[0] Host[25] DS[383] CMD: perl /usr/local/cacti/scripts/f5-bigip-tmm-cpu.pl xx.54.69.246 public, output: U
06/25/2008 10:20:22 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (383, 'tmmcpu', '2008-06-25 10:20:21', 'U')"
06/25/2008 10:20:22 AM - PHPSVR: Poller[0] DEBUG: INC: '/usr/local/cacti/scripts/ss_f5-bigip-tmm-memory.php' FUNC: 'ss_f5tmm_mem' PARMS: 'xx.54.69.246 public 2 161 500'
06/25/2008 10:20:22 AM - CMDPHP: Poller[0] Host[25] DS[384] SERVER: /usr/local/cacti/scripts/ss_f5-bigip-tmm-memory.php ss_f5tmm_mem xx.54.69.246 public 2 161 500 , output: sysStatMemoryTotal:1794113536 sysStatMemoryUsed:93771236
06/25/2008 10:20:22 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (384, '', '2008-06-25 10:20:21', 'sysStatMemoryTotal:1794113536 sysStatMemoryUsed:93771236')"
06/25/2008 10:20:22 AM - PHPSVR: Poller[0] DEBUG: PHP Script Server Shutdown request received, exiting
--------------------------------------------------
Not sure if you want me to keep on going gandalf or if you have already spotted the error. Please let me know. I've attached the TMM-cpu file that i'm using along w/ a pic of evidence that my TMM memory is working fine. (Reminder: I'm using ver 0.8.7a) One thing that I'd like to add, my memory_limit under PHP Information in the Cacti Technical Support is stating that "It is highly suggested that you alter you php.ini memory_limit to 16M or higher." I increased it to 32MB (I have yet to restart the web server for it to take effect, it is still currently reading 8MB), not sure if this would have anything to do with the problem.
- Attachments
-
- TMM CPU and Mem Graphs.JPG (70.25 KiB) Viewed 5188 times
-
- f5-bigip-tmm-cpu.pl
- (1.55 KiB) Downloaded 128 times
I went to Data Input Methods and put in the following for Input String:
/usr/local/perl <path_cacti>/scripts/f5-bigip-tmm-cpu.pl <hostname> <snmp_community>
Then ran the Rebuild Poller Cache.
Sadly, it is still not working.
/usr/local/perl <path_cacti>/scripts/f5-bigip-tmm-cpu.pl <hostname> <snmp_community>
Then ran the Rebuild Poller Cache.
Code: Select all
06/26/2008 10:05:06 AM - CMDPHP: Poller[0] Host[8] DS[404] WARNING: Result from CMD not valid. Partial Result:
06/26/2008 10:05:06 AM - CMDPHP: Poller[0] Host[8] DS[404] CMD: /usr/local/perl /home/ok20293/cacti/scripts/f5-bigip-tmm-cpu.pl 204.53.134.19 public, output: U
06/26/2008 10:05:06 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (404, 'tmmcpu', '2008-06-26 10:05:02', 'U')"
Last edited by Boulad on Thu Jun 26, 2008 1:18 pm, edited 1 time in total.
I would like to add that I have other scripts that use perl and they work fine.
Example: Input String for a load balance script for the server that Cacti is running on:
perl <path_cacti>/scripts/loadavg_multi.pl
Example: Input String for a load balance script for the server that Cacti is running on:
perl <path_cacti>/scripts/loadavg_multi.pl
Last edited by Boulad on Thu Jun 26, 2008 12:59 pm, edited 1 time in total.
Here is the CPU script that I'm using. Just a friendly reminder, I'm using Cacti 0.8.7a. The data and graph I'm importing.
- Attachments
-
- graph_template_tmm_cpu_usage_112.xml
- (8.41 KiB) Downloaded 203 times
-
- data_template_tmm_cpu_usage_206.xml
- (4.25 KiB) Downloaded 132 times
-
- f5-bigip-tmm-cpu.pl
- (1.55 KiB) Downloaded 156 times
Who is online
Users browsing this forum: No registered users and 0 guests