|
|
| Author |
Message |
Boulad
Joined: 13 Jun 2008 Posts: 27
|
Posted: Tue Jun 24, 2008 1:55 pm Post subject: 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.
|
|
| Back to top |
|
 |
Boulad
Joined: 13 Jun 2008 Posts: 27
|
Posted: Tue Jun 24, 2008 3:19 pm Post subject: |
|
|
| Bump
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12604 Location: Muenster, Germany
|
Posted: Tue Jun 24, 2008 3:48 pm Post subject: |
|
|
Fien that you've found my debug instructions. Now I need results of each step to get an idea what's failing. Step-by-step, please
Reinhard
|
|
| Back to top |
|
 |
Boulad
Joined: 13 Jun 2008 Posts: 27
|
Posted: Wed Jun 25, 2008 10:56 am Post subject: |
|
|
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:
| Code: | /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);' |
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.
| Code: | /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);' |
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:
| Code: | | UCD-SNMP-MIB::laLoad = No Such Instance currently exists at this OID |
but with 'snmpwalk -c public -v 2c bigip1.xxxx.xxx.com .1.3.6.1.4.1.2021.10.1.3'
I'm receiving:
| Code: | UCD-SNMP-MIB::laLoad.1 = STRING: 1.02
UCD-SNMP-MIB::laLoad.2 = STRING: 1.03
UCD-SNMP-MIB::laLoad.3 = STRING: 1.00 |
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.
| Code: | 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 |
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.
| Description: |
|
| Filesize: |
70.25 KB |
| Viewed: |
1676 Time(s) |

|
| Description: |
|
 Download |
| Filename: |
f5-bigip-tmm-cpu.pl |
| Filesize: |
1.55 KB |
| Downloaded: |
40 Time(s) |
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12604 Location: Muenster, Germany
|
Posted: Wed Jun 25, 2008 2:36 pm Post subject: |
|
|
Please edit the data input method. Replace "perl" by "/full/path/to/perl". Then run ./cli/rebuild_poller_cache.php and retry
Reinhard
|
|
| Back to top |
|
 |
Boulad
Joined: 13 Jun 2008 Posts: 27
|
Posted: Thu Jun 26, 2008 10:17 am Post subject: |
|
|
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.
| Code: | 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')" |
Sadly, it is still not working.
Last edited by Boulad on Thu Jun 26, 2008 1:18 pm; edited 1 time in total |
|
| Back to top |
|
 |
Boulad
Joined: 13 Jun 2008 Posts: 27
|
Posted: Thu Jun 26, 2008 11:39 am Post subject: |
|
|
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
Last edited by Boulad on Thu Jun 26, 2008 12:59 pm; edited 1 time in total |
|
| Back to top |
|
 |
Boulad
Joined: 13 Jun 2008 Posts: 27
|
Posted: Thu Jun 26, 2008 12:57 pm Post subject: |
|
|
| Bump. What should I do? Did I execute your suggestion incorrectly gandalf?
|
|
| Back to top |
|
 |
Boulad
Joined: 13 Jun 2008 Posts: 27
|
Posted: Thu Jun 26, 2008 2:45 pm Post subject: |
|
|
| Bump. Any help from anyone would be greatly appreciated. I've been working on this bugger for days now.
|
|
| Back to top |
|
 |
Boulad
Joined: 13 Jun 2008 Posts: 27
|
Posted: Fri Jun 27, 2008 2:02 pm Post subject: |
|
|
| Friendly Bump
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12604 Location: Muenster, Germany
|
Posted: Fri Jun 27, 2008 2:06 pm Post subject: |
|
|
I'm not really sure on this, because you've claimed thta the other script works fine. But I really recommend debugging your script until errors are gone. You may post the script here (did I see it in another post?).
Reinhard
|
|
| Back to top |
|
 |
Boulad
Joined: 13 Jun 2008 Posts: 27
|
Posted: Fri Jun 27, 2008 2:41 pm Post subject: |
|
|
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.
| Description: |
|
 Download |
| Filename: |
data_template_tmm_cpu_usage_206.xml |
| Filesize: |
4.25 KB |
| Downloaded: |
64 Time(s) |
| Description: |
|
 Download |
| Filename: |
graph_template_tmm_cpu_usage_112.xml |
| Filesize: |
8.41 KB |
| Downloaded: |
97 Time(s) |
| Description: |
|
 Download |
| Filename: |
f5-bigip-tmm-cpu.pl |
| Filesize: |
1.55 KB |
| Downloaded: |
53 Time(s) |
|
|
| Back to top |
|
 |
Boulad
Joined: 13 Jun 2008 Posts: 27
|
Posted: Mon Jun 30, 2008 8:13 am Post subject: |
|
|
| Friendly Bump
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12604 Location: Muenster, Germany
|
Posted: Mon Jun 30, 2008 2:47 pm Post subject: |
|
|
Any chance for an online debug session? If yes, please provide data via pm
Reinhard
|
|
| Back to top |
|
 |
Boulad
Joined: 13 Jun 2008 Posts: 27
|
Posted: Tue Jul 01, 2008 7:37 am Post subject: |
|
|
| Please check your PMs gandalf. Thanks
|
|
| Back to top |
|
 |
|