cacti/scripts/ss_get_mysql_stats.php works at command line, but reports errors in Poller log

"Jay Libove" <[email protected]>
Newsgroups gmane.network.cacti.user
Message-ID <[email protected]>
Hi Cacti Users,

Cacti 0.8.7i on CentOS 5 (x86_64), with the better-cacti-templates v1.1.18.

 

In the Cacti System Log File as viewed from the Cacti admin web UI System
Utilities -> View Cacti Log File, I see things like this (and of course I
have lots of empty graphs):

 

Log File [Total Lines: 500 - All Items Shown]

02/14/2012 03:25:06 PM - SYSTEM STATS: Time:4.5017 Method:cmd.php
Processes:1 Threads:N/A Hosts:4 HostsPerProcess:4 DataSources:22
RRDsProcessed:22

02/14/2012 03:25:06 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool
update /var/www/cacti/rra/shion_handler_commit_45.rrd --template
1329229504:U

02/14/2012 03:25:06 PM - CMDPHP: Poller[0] Time: 4.2917 s, Theads: N/A,
Hosts: 3

02/14/2012 03:25:06 PM - CMDPHP: Poller[0] Host[4] DS[45] CMD: /usr/bin/php
-q /var/www/cacti/scripts/ss_get_mysql_stats.php --host shion.opus5.net
--items di,ds,dt,du --user cactiquery --pass 'password' --port 3306, output:
U

02/14/2012 03:25:06 PM - CMDPHP: Poller[0] Host[4] DS[45] WARNING: Result
from CMD not valid. Partial Result: U

02/14/2012 03:25:05 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool
update /var/www/cacti/rra/shion_log_writes_46.rrd --template 1329229504:U

02/14/2012 03:25:05 PM - CMDPHP: Poller[0] Host[4] DS[46] CMD: /usr/bin/php
-q /var/www/cacti/scripts/ss_get_mysql_stats.php --host shion.opus5.net
--items ah,ai,aj,ak --user cactiquery --pass 'password' --port 3306, output:
U

02/14/2012 03:25:05 PM - CMDPHP: Poller[0] Host[4] DS[46] WARNING: Result
from CMD not valid. Partial Result: U

 

(In fact, All executions of the ss_get_mysql_stats.php script produce the
"Result from CMD not valid" error).

 

 

At the command prompt, however:

 

$ /usr/bin/php -q /var/www/cacti/scripts/ss_get_mysql_stats.php --host
shion.opus5.net --items di,ds,dt,du --user cactiquery --pass 'password'
--port 3306

di:357533 ds:135 dt:0 du:0

 

$ /usr/bin/php -q /var/www/cacti/scripts/ss_get_mysql_stats.php --host
shion.opus5.net --items ah,ai,aj,ak --user cactiquery --pass 'password'
--port 3306

ah:50494 ai:305855 aj:117361 ak:38938

 

$ /usr/bin/php -q /var/www/cacti/scripts/ss_get_mysql_stats.php --host
h1766939.stratoserver.net --items b4,b5,b6 --user cactiquery --pass
'AGq$Df!8' --port 3306

b4:1523 b5:627348806 b6:283

 

etc. for all of the ss_get_mysql_stats.php executions.

 

 

So I tried running the Poller directly, with   php /var/www/cacti/poller.php
--debug --force 2>&1|less

.. but that output doesn't include the specific data gathering script names,
so I don't know how to match it to what I'm seeing above.

In the Poller output, I do see a few occurrences of "ERROR: Not enough
arguments", such as:

 

Waiting on 1 of 1 pollers.

Waiting on 1 of 1 pollers.

Waiting on 1 of 1 pollers.

02/14/2012 03:29:17 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool
update /var/www/cacti/rra/localhost_log_writes_36.rrd --template
1329229755:U

ERROR: Not enough arguments

Waiting on 1 of 1 pollers.

 

Waiting on 1 of 1 pollers.

Waiting on 1 of 1 pollers.

02/14/2012 03:29:18 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool
update /var/www/cacti/rra/webnovias_log_writes_41.rrd --template
1329229757:U

ERROR: Not enough arguments

Waiting on 1 of 1 pollers.

 

Waiting on 1 of 1 pollers.

Waiting on 1 of 1 pollers.

02/14/2012 03:29:18 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool
update /var/www/cacti/rra/webnovias_handler_commit_44.rrd --template
1329229757:U

ERROR: Not enough arguments

Waiting on 1 of 1 pollers.

 

Waiting on 1 of 1 pollers.

Waiting on 1 of 1 pollers.

02/14/2012 03:29:18 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool
update /var/www/cacti/rra/webnovias_table_locks_immedit_43.rrd --template
1329229757:U

ERROR: Not enough arguments

Waiting on 1 of 1 pollers.

 

Waiting on 1 of 1 pollers.

Waiting on 1 of 1 pollers.

02/14/2012 03:29:20 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool
update /var/www/cacti/rra/shion_handler_commit_45.rrd --template
1329229758:U

02/14/2012 03:29:20 PM - SYSTEM STATS: Time:4.6775 Method:cmd.php
Processes:1 Threads:N/A Hosts:4 HostsPerProcess:4 DataSources:22
RRDsProcessed:22

ERROR: Not enough arguments

Loop  Time is: 4.68

Sleep Time is: 295.31

Total Time is: 4.69

 

.. so I guess that the data sources for log_writes (ak),
Table_locks_immediate (b5) and Handler_commit (di) are producing output but
in a form which the Poller's next command isn't expecting? (Just guessing
here).

 

 

How do I go about debugging this? 

 

Thanks,

Jay

 

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.