Giter Site home page Giter Site logo

mysql-cacti-templates's People

Watchers

 avatar

mysql-cacti-templates's Issues

SQL syntax error when SHOW INNODB STATUS doesn't have information

A user posted the following:

Error executing 'SELECT CONCAT('', ((10 << 32) + 2142993823)) AS
innodb_transactions, CONCAT('', (((10 << 32) + 2142993823) - ((10 << 32) +
2142968463))) AS unpurged_txns, CONCAT('', (( << 32) + )) AS
log_bytes_written, CONCAT('', (( << 32) + )) AS log_bytes_flushed,
CONCAT('', ((( << 32) + ) - (( << 32) + ))) AS unflushed_log, CONCAT('',
0+231781322+910087356) AS spin_waits, CONCAT('', 61713300314) AS
spin_rounds, CONCAT('', 122774767+42298281+44021761) AS os_waits': You have
an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near '<< 32) + )) AS
log_bytes_written, CONCAT('', (( << 32) + )) AS log_bytes_flushed' at line 1

The problem was SHOW INNODB STATUS was truncated, so some of the items were
empty strings instead of integers.

Original issue reported on code.google.com by baron.schwartz on 9 Oct 2008 at 10:21

Do big math the easy way

Big math can be done without calling back to MySQL, and this is preferable.

Original issue reported on code.google.com by baron.schwartz on 9 Oct 2008 at 10:00

Eliminate spikes in graphs

See issue 36: NaN support works, but there are still cases when spikes
happen (as far as I know) because "Hmm, it seems there are big spikes
because of roll-overs.  If something is restarted and the counter is then
less, Cacti assumes it has rolled past the max value and wrapped around. 
How to work around this, both in terms of making sure wraparounds are
counted, and not having spikes when there is a restart?"

Perhaps the solution to this is to simply run a tool on the RRD files to
remove spikes.

Original issue reported on code.google.com by baron.schwartz on 8 Nov 2008 at 4:40

Calculate binlog space without a mysql query

binlog space used can be counted with just ordinary PHP '+' operator.  The
result will be an inexact floating-point number, but who cares about a byte
here or there.  The result must be formatted as an integer with
sprintf('%u', $result).

Original issue reported on code.google.com by baron.schwartz on 17 Nov 2008 at 7:23

Not compatible with cactid

When using cactid, the script output gets truncated to 1024 chars (or, if
reading from script server, it only reads 1024 bytes at a time).  The
result set of these templates is > 1024, and the logs produce the following
errors:

...

06/10/2008 01:15:59 PM - CACTID: Poller[0] Host[99] DS[2467] SS[0] WARNING:
Result from SERVER not valid.  Partial Result: Key_read_requests:85...
06/10/2008 01:15:59 PM - CACTID: Poller[0] Host[99] DS[2467] SS[0] SERVER:
/usr/local/share/cacti/scripts/ss_get_mysql_stats.php ss_get_mysql_stats
<mysql_server>, output: U
06/10/2008 01:15:59 PM - CACTID: Poller[0] Host[99] DS[2468] SS[0] WARNING:
Result from SERVER not valid.  Partial Result: Aborted_connects:51 ...
06/10/2008 01:15:59 PM - CACTID: Poller[0] Host[99] DS[2468] SS[0] SERVER:
/usr/local/share/cacti/scripts/ss_get_mysql_stats.php ss_get_mysql_stats
<mysql_server>, output: U

...

One solution is to recompile cactid with a 2048-char (or higher) limit, but
that is (in my mind) a last resort.

Original issue reported on code.google.com by [email protected] on 10 Jun 2008 at 5:22

SQL insert fails - results truncated

What steps will reproduce the problem?
1. Running the MySQL template using Spine on Cacti 0.8.7b produces an
error. The SQL data returned by Spine appears to be truncated (to 919
characters) I tested on multiple servers and receive the same response.
Running the script from the command line produces the full response - with
a result something on the order of 2500 characters. 

Cacti log error (3 Examples):
 04/30/2008 10:30:14 AM - SPINE: Poller[0] ERROR: A database insert failed!
Error:'1064', SQL Fragment:'INSERT INTO poller_output (local_data_id,
rrd_name, time, output) VALUES (2715,'','2008-04-30
10:30:09','Key_read_requests:878312052 Key_reads:40271
Key_write_requests:165712695 Key_writes:32257043 history_list:188
innodb_transactions:1354372467 read_views:1 current_transactions:5
locked_transactions:0 active_transactions:0 pool_size:32768 free_pages:113
database_pages:32613 modified_pages:84 pages_read:57523 pages_created:3233
pages_written:6127459 file_fsyncs:21800329 file_reads:17496
file_writes:24395679 log_writes:20478236 pending_aio_log_ios:0
pending_aio_sync_ios:0 pending_buf_pool_flushes:0 pending_chkp_writes:0
pending_ibuf_aio_reads:0 pending_log_flushes:0 pending_log_writes:0
pending_normal_aio_reads:0 pending_normal_aio_writes:0 ibuf_inserts:0
ibuf_merged:0 ibuf_merges:0 spin_waits:13070628 spin_rounds:18120736
os_waits:274111 rows_inserted:65431 rows_updated:24029307 rows_deleted:3798
rows_read:3235969795 Table_locks_waited:4397609
Table_locks_immediate:157069704 Slow_queries:3 Open_files:171 Ope'

04/30/2008 10:30:10 AM - SPINE: Poller[0] ERROR: A database insert failed!
Error:'1064', SQL Fragment:'INSERT INTO poller_output (local_data_id,
rrd_name, time, output) VALUES (2746,'','2008-04-30
10:30:05','Key_read_requests:3 Key_reads:3 Key_write_requests:0
Key_writes:0 history_list:0 innodb_transactions:1280 read_views:1
current_transactions:1 locked_transactions:0 active_transactions:0
pool_size:512 free_pages:493 database_pages:19 modified_pages:0
pages_read:19 pages_created:0 pages_written:0 file_fsyncs:3 file_reads:25
file_writes:3 log_writes:8 pending_aio_log_ios:0 pending_aio_sync_ios:0
pending_buf_pool_flushes:0 pending_chkp_writes:0 pending_ibuf_aio_reads:0
pending_log_flushes:0 pending_log_writes:0 pending_normal_aio_reads:0
pending_normal_aio_writes:0 ibuf_inserts:0 ibuf_merged:0 ibuf_merges:0
spin_waits:8 spin_rounds:21 os_waits:4 rows_inserted:0 rows_updated:0
rows_deleted:0 rows_read:0 Table_locks_waited:0 Table_locks_immediate:13
Slow_queries:0 Open_files:21 Open_tables:7 Opened_tables:13
innodb_open_files:300 open_files_limit:1024 table_cache:64
Aborted_clients:0 Aborted_connects:1 Max_used'

04/30/2008 10:30:08 AM - SPINE: Poller[0] ERROR: A database insert failed!
Error:'1064', SQL Fragment:'INSERT INTO poller_output (local_data_id,
rrd_name, time, output) VALUES (2744,'dhcpdSnmpPoolSize','2008-04-30
10:30:04','29'),(2723,'','2008-04-30 10:30:04','Key_read_requests:1177560
Key_reads:4100 Key_write_requests:396434 Key_writes:4087 history_list:0
innodb_transactions:1280 read_views:1 current_transactions:1
locked_transactions:0 active_transactions:0 pool_size:512 free_pages:493
database_pages:19 modified_pages:0 pages_read:19 pages_created:0
pages_written:0 file_fsyncs:3 file_reads:25 file_writes:3 log_writes:8
pending_aio_log_ios:0 pending_aio_sync_ios:0 pending_buf_pool_flushes:0
pending_chkp_writes:0 pending_ibuf_aio_reads:0 pending_log_flushes:0
pending_log_writes:0 pending_normal_aio_reads:0 pending_normal_aio_writes:0
ibuf_inserts:0 ibuf_merged:0 ibuf_merges:0 spin_waits:7 spin_rounds:20
os_waits:4 rows_inserted:0 rows_updated:0 rows_deleted:0 rows_read:0
Table_locks_waited:0 Table_locks_immediate:118 Slow_queries:1 Open_files:26
Open_tables:10 Opened_tables:70 innodb_open_files:300 open_file'

Successful run from command line
# php -q /var/www/cacti/scripts/ss_get_mysql_stats.php xxxx
PHP Notice:  Undefined variable: config in /var/www/cacti/lib/snmp.php on
line 33
Key_read_requests:1183562 Key_reads:4176 Key_write_requests:398172
Key_writes:4241 history_list:0 innodb_transactions:1280 read_views:1
current_transactions:1 locked_transactions:0 active_transactions:0
pool_size:512 free_pages:493 database_pages:19 modified_pages:0
pages_read:19 pages_created:0 pages_written:0 file_fsyncs:3 file_reads:25
file_writes:3 log_writes:8 pending_aio_log_ios:0 pending_aio_sync_ios:0
pending_buf_pool_flushes:0 pending_chkp_writes:0 pending_ibuf_aio_reads:0
pending_log_flushes:0 pending_log_writes:0 pending_normal_aio_reads:0
pending_normal_aio_writes:0 ibuf_inserts:0 ibuf_merged:0 ibuf_merges:0
spin_waits:7 spin_rounds:20 os_waits:4 rows_inserted:0 rows_updated:0
rows_deleted:0 rows_read:0 Table_locks_waited:0 Table_locks_immediate:200
Slow_queries:1 Open_files:30 Open_tables:12 Opened_tables:72
innodb_open_files:300 open_files_limit:1024 table_cache:64
Aborted_clients:0 Aborted_connects:2 Max_used_connections:3
Slow_launch_threads:0 Threads_cached:0 Threads_connected:1
Threads_created:218 Threads_running:1 max_connections:100
thread_cache_size:0 Connections:240 slave_running:10 slave_stopped:0
Slave_retried_transactions:0 seconds_behind_master:0 slave_lag:0
Slave_open_temp_tables:0 Qcache_free_blocks:0 Qcache_free_memory:0
Qcache_hits:0 Qcache_inserts:0 Qcache_lowmem_prunes:0 Qcache_not_cached:0
Qcache_queries_in_cache:0 Qcache_total_blocks:0 query_cache_size:0
Questions:1069 Com_update:57 Com_insert:112 Com_select:437 Com_delete:0
Com_replace:0 Com_load:0 Com_update_multi:0 Com_insert_select:0
Com_delete_multi:0 Com_replace_select:0 Select_full_join:0
Select_full_range_join:0 Select_range:0 Select_range_check:0 Select_scan:19
Sort_merge_passes:0 Sort_range:0 Sort_rows:0 Sort_scan:0
Created_tmp_tables:19 Created_tmp_disk_tables:0 Created_tmp_files:5
Bytes_sent:254244 Bytes_received:110414895 innodb_log_buffer_size:1048576
unflushed_log:1048576 log_bytes_flushed:43655 log_bytes_written:43655
relay_log_space:47296047 binlog_cache_size:32768 Binlog_cache_disk_use:0
Binlog_cache_use:0 binary_log_space:35894532

Running on CentOS 5.1
cacti-0.8.7b-2.el5.rf
cacti-spine-0.8.7a-1.el5.rf
mysql-server-5.0.22-2.2.el5_1.1
Using r34 of your the script.

I am going to submit on the cacti forum as well. It looks like there is a
max length that spine can handle. 

Original issue reported on code.google.com by [email protected] on 30 Apr 2008 at 3:57

Make templates use data queries

A lot of templates need a data query.

  * mysql, memcached -- you can run several instances on one server.
  * disk usage
  * disk I/O 
  * network interfaces

In general, it would be good if most (all?) of the templates use a unified
way of generating data queries.  When meta/make-template.pl is run, it can
be run with or without the option to generate corresponding queries; each
meta definitions file can specify whether it should have data queries by
default.  The reason for this is because if you don't have multiple
instances on a single server, having to run the query is kind of a pain.

I'd still like a way to graph them all on one graph, but that only works
for very small values of N!

Original issue reported on code.google.com by baron.schwartz on 11 Nov 2008 at 1:49

Pull data from SHOW STATUS when possible

Data that comes from SHOW INNODB STATUS can often just as well be generated
from SHOW STATUS.

An ||= type of method ought to be used to fill in missing stuff from SHOW
INNODB STATUS with stuff from SHOW STATUS.

Original issue reported on code.google.com by baron.schwartz on 9 Oct 2008 at 9:59

Cannot import template file

What steps will reproduce the problem?
1. try to import cacti_host_template_x_db_server_ht.xml

What is the expected output? 

template is imported

What do you see instead?

Notice: Undefined index: import_file in
/usr/share/cacti/site/templates_import.php on line 56

Notice: Undefined index: import_file in
/usr/share/cacti/site/templates_import.php on line 56

Warning: Cannot modify header information - headers already sent by (output
started at /usr/share/cacti/site/templates_import.php:56) in
/usr/share/cacti/site/templates_import.php on line 62



What version of the product are you using? On what operating system?

cacti 0.8.6 / Linux Etch

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 23 Jul 2008 at 1:34

display error

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
trollop scripts # /usr/bin/php -q ss_get_mysql_stats.php server02
a0:34701507809 a1:1456419631 a2:880329418 a3:138964310 a4:100 a5:41698444
a6:0 a7:1 a8:0 a9:0 aa:512 ab:0 ac:509 ad:4 ae:2189235 af:34982 ag:4112233
ah:10314582 ai:1485244 aj:13205302 ak:8551550 al:0 am:0 an:0 ao:0 ap:0 aq:0
ar:0 as:0 at:0 au:402 av:402 aw:402 ax:246929802 ay:215063126 az:1335095
b0:3876059 b1:3789649 b2:3844635 b3:2432283226 b4:1165710 b5:387972405
b6:45752 b7:733 b8:384 b9:18434115 ba:300 bb:1024 bc:384 bd:13361 be:92609
bf:201 bg:0 bh:11 bi:1 bj:60222 bk:1 bl:200 bm:12 bn:48263505 bo:0 bp:0
bq:0 br:0 bs:0 bt:6098 bu:20595104 bv:714554773 bw:149938760 bx:46036526
by:16812740 bz:16899 c0:42427 c1:67108864 c2:1138524207 c3:56417586
c4:26245383 c5:169826814 c6:17381862 c7:136745 c8:3 c9:3249 ca:408819
cb:148 cc:1 cd:13446066 ce:261372 cf:11374885 cg:6754 ch:72138924 ci:116357
cj:8477670 ck:2048155948 cl:44202521 cm:38022647 cn:11662890 co:232667
cp:1032097427 cq:858537454 cr:1048576 cs:1048576 ct:8917559736
cu:8917559736 cv:0 cw:32768 cx:0 cy:0 cz:0trollop scripts #

What version of the product are you using? On what operating system?
cacti_host_template_x_db_server_ht_0.8.6i.xml

Please provide any additional information below.
07/20/2008 01:19:02 PM - POLLER: Poller[0] WARNING: Poller Output Table not
Empty. Potential Data Source Issues for Data Sources: (DS[773]), (DS[774]),
(DS[775]), (DS[776]), (DS[777]), (DS[778]), (DS[779]), (DS[780]),
(DS[781]), (DS[782]), (DS[796]), (DS[797]), (DS[798]), (DS[799]),
(DS[800]), (DS[801]), (DS[802]), (DS[803]), (DS[804]), (DS[805]),
(DS[806]), (DS[807]), (DS[808])
07/20/2008 01:18:22 PM - SYSTEM STATS: Time:21.4000 Method:cmd.php
Processes:1 Threads:N/A Hosts:27 HostsPerProcess:27 DataSources:845
RRDsProcessed:709
07/20/2008 01:18:21 PM - CMDPHP: Poller[0] Host[28] DS[772] WARNING: Result
from SERVER not valid. Partial Result: U
07/20/2008 01:18:21 PM - CMDPHP: Poller[0] Host[28] DS[771] WARNING: Result
from SERVER not valid. Partial Result: U
07/20/2008 01:18:21 PM - CMDPHP: Poller[0] Host[28] DS[770] WARNING: Result
from SERVER not valid. Partial Result: U
07/20/2008 01:18:21 PM - CMDPHP: Poller[0] Host[28] DS[769] WARNING: Result
from SERVER not valid. Partial Result: U 


Original issue reported on code.google.com by [email protected] on 20 Jul 2008 at 10:20

Make some graphs have negated elements

Reflecting opposites across the y-axis will make some things more clear. 
Examples: network bytes in/out, disk reads/writes, cache inserts/purges.

Original issue reported on code.google.com by baron.schwartz on 9 Nov 2008 at 6:24

xml importing

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?
debian cacti 8.6.i

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 18 May 2008 at 8:23

Graphs all show "nan" values

Today i've been busy setting up the mysql graphs you kindly created but until a 
few minutes ago 
all graphs showed "nan" values after searching and trying and comparing for a 
while i found out 
what the problem was.

When running the script on the commandline myself it gave back an error before 
the suspected 
output:

---- ERROR ----
PHP Notice:  Undefined variable: config in /usr/local/share/cacti/lib/snmp.php 
on line 33
PHP Stack trace:
PHP   1. {main}() /usr/local/share/cacti/scripts/ss_get_mysql_stats.php:0
PHP   2. include_once() /usr/local/share/cacti/scripts/ss_get_mysql_stats.php:73
---- ERROR ----

it seems you include config.php while other scripts all use global.php which 
itself includes 
config.php and creates the required config variable.
i've changed this in ss_get_mysql_stats.php (see part of diff below) and now my 
graphs actually 
start showing things. 

The diff with the changes made:

---- DIFF ----

@@ -69,7 +69,7 @@
 # 
===========================================================
=================
 # Set up the stuff we need to be called by the script server.
 # 
===========================================================
=================
-include_once(dirname(__FILE__) . "/../include/config.php");
+include_once(dirname(__FILE__) . "/../include/global.php");
 include_once(dirname(__FILE__) . "/../lib/snmp.php");

 # 
===========================================================
=================

---- DIFF ----

I don't know if i'm the only one with this problem but maybe it helps solve 
some in the future.

With regards,

Lammert Hellinga

Original issue reported on code.google.com by [email protected] on 8 May 2008 at 9:32

filename problem mysql_definitions.pl (currently mysql_definitons.pl in rev 40)


filename problem mysql_definitions.pl (currently mysql_definitons.pl in 
rev 40)

there appears to be either a misnamed file, or an error in the docs...i 
expect its a misnamed file

README passage:

The basic idea is to run the make-template.pl script with the template
definition file as input:

   perl make-template.pl mysql_definitions.pl > my_new_template.xml


the name of the file in http://mysql-cacti-
templates.googlecode.com/svn/trunk/meta/mysql_definitons.pl



What version of the product are you using? On what operating system?
rev40, ubuntu 6.06 x64, cacti 0.8.7b


its also worth noting that the make-template.pl script will bomb out if 
its not an SVN checkout and was downloaded directly


Original issue reported on code.google.com by [email protected] on 31 May 2008 at 2:01

Create an external config file

Since the .php files have to be configured, it's hard to upgrade them.  An
external config.php file would be really helpful.

Original issue reported on code.google.com by baron.schwartz on 4 Nov 2008 at 5:39

Thread Stack Error

What steps will reproduce the problem?
1. Running the php script as cacti user in scripts directory
2.
3.

What is the expected output? What do you see instead?

Should see returned data, get thread stack error instead.

 AS binary_log_space ': Thread stack overrun:  120304 bytes used of a
131072 byte stack, and 10788 bytes needed.  Use 'mysqld -O thread_stack=#' 

I've used the older mysql templates with no issues, and fairly sure this is
not a cacti issue, used for a lot of other stuff.


What version of the product are you using? On what operating system?

Debian etch, mysql 5.0 patched to etch security level. Cacti Version 0.8.7a


Please provide any additional information below.

Imported no errors, set the script up with necessary user information,
cacti itself is running fine, including the previous mysql templates the
software is based on.

Original issue reported on code.google.com by [email protected] on 30 Apr 2008 at 12:25

sh: path_php_binary: command not found


What steps will reproduce the problem?
1. Copy/update php script, import template, add new graphs.
2. Wait for poller to try to get data or run cmd.php

When executed directly as php script (php ss_get_mysql_stats.php --host 
127.0.0.1:3306 --items bf) it is showing result correct result (even when 
sudo -u apache - so permissions to temp file are correct).

When running from command line using cmd.php or by cacti poller itself I 
am getting:
_date_ - CMDPHP: Poller[x] Host[x] DS[x] WARNING: Result from CMD not 
valid.  Partial Result:
sh: path_php_binary: command not found

It is not my only script (but rest I have are perl based). I have checked 
and corrected paths in data input methods - no change.

Could you please check what might be wrong?

Cacti 0.8.7b, Gentoo linux, php 5.2.6.

Original issue reported on code.google.com by [email protected] on 28 Nov 2008 at 2:14

Undefined index error when running php script from the command line

What steps will reproduce the problem?
1. Import template
2. Create graphs
3. Run script

I see the following errors repeated over and over again:

Notice: Undefined index:  file_size in
/usr/local/apache2/htdocs/cacti/scripts/ss_get_mysql_stats.php on line 160


What version of the product are you using? On what operating system?
Using Fedora Core release 3
MySQL 4.1.10
Cacti 0.8.6j (fully patched)

Please provide any additional information below.

When I checkout line 160 of the php script code, I see the following routine:

   $result = run_query("SHOW MASTER LOGS", $conn);
   while ($row = @mysql_fetch_assoc($result)) {
      $row = array_change_key_case($row, CASE_LOWER);
      $binlogs[] = $row['file_size'];
   }

When I run "SHOW MASTER LOGS" on my MySQL server I do not get a display of
the 'file_size'.

ie:

mysql> SHOW MASTER LOGS;
+----------------------+
| Log_name             |
+----------------------+
| TO-MON-02-bin.000045 |
| TO-MON-02-bin.000046 |
| TO-MON-02-bin.000047 |
....etc

Any help would be appreciated.

Thanks!


Original issue reported on code.google.com by [email protected] on 6 May 2008 at 5:46

Cant get data for graphs on replication slaves

What steps will reproduce the problem?
1. just do a default setup for have the device be a replication slave

What is the expected output? What do you see instead?
i expected to see data on my graphs similar to the slaves master

What version of the product are you using? On what operating system?
latest-svn as of reporting this bug

Please provide any additional information below.
snmp is reporting in so i know the machine is communicable. As i metioned
above, the master of broken slave shows data for the mysql graphs...

Original issue reported on code.google.com by [email protected] on 21 May 2008 at 9:15

"nan" in Cacti - fine from command line

What steps will reproduce the problem?
1. Attempt to graph MySQL stats in Cacti
2. Everything returns as "nan"
3. From the command line it's all fine

What is the expected output? What do you see instead?
Expected output is valid values

What version of the product are you using? On what operating system?
mysql-cacti-templates 1.0.0
Cacti 0.8.6j
Centos 4.5

Please provide any additional information below.
In cacti everything returns "nan" but from the command line all is fine...

sh$ /usr/bin/php -q /var/www/cacti/scripts/ss_get_mysql_stats.php
host.domain.com username password
Key_read_requests:1618051935 Key_reads:13960793 Key_write_requests:37983702
Key_writes:37339538 history_list:0 innodb_transactions:0 read_views:0
current_transactions:0 locked_transactions:0 active_transactions:0
pool_size:0 free_pages:0 database_pages:0 modified_pages:0 pages_read:0
pages_created:0 pages_written:0 file_fsyncs:0 file_reads:0 file_writes:0
log_writes:0 pending_aio_log_ios:0 pending_aio_sync_ios:0
pending_buf_pool_flushes:0 pending_chkp_writes:0 pending_ibuf_aio_reads:0
pending_log_flushes:0 pending_log_writes:0 pending_normal_aio_reads:0
pending_normal_aio_writes:0 ibuf_inserts:0 ibuf_merged:0 ibuf_merges:0
spin_waits:0 spin_rounds:0 os_waits:0 rows_inserted:0 rows_updated:0
rows_deleted:0 rows_read:0 Table_locks_waited:2588760
Table_locks_immediate:78201304 Slow_queries:2394455 Open_files:504
Open_tables:275 Opened_tables:8254 innodb_open_files:0
open_files_limit:4010 table_cache:512 Aborted_clients:11704
Aborted_connects:38 Max_used_connections:467 Slow_launch_threads:0
Threads_cached:0 Threads_connected:330 Threads_created:6154624
Threads_running:22 max_connections:800 thread_cache_size:0
Connections:6154625 slave_running:0 slave_stopped:0
Slave_retried_transactions:0 slave_lag:0 Slave_open_temp_tables:0
Qcache_free_blocks:2142 Qcache_free_memory:56705256 Qcache_hits:146444273
Qcache_inserts:29819595 Qcache_lowmem_prunes:1061392
Qcache_not_cached:3366962 Qcache_queries_in_cache:7230
Qcache_total_blocks:16828 query_cache_size:67108864 Questions:251551490
Com_update:1522578 Com_insert:3568992 Com_select:33201547
Com_delete:3498013 Com_replace:24985314 Com_load:0 Com_update_multi:0
Com_insert_select:0 Com_delete_multi:0 Com_replace_select:0
Select_full_join:3687 Select_full_range_join:0 Select_range:81234
Select_range_check:364 Select_scan:2363751 Sort_merge_passes:2659
Sort_range:64815 Sort_rows:137949938 Sort_scan:1972270
Created_tmp_tables:307050 Created_tmp_disk_tables:7159
Created_tmp_files:5250 Bytes_sent:3948497184 Bytes_received:1330071296
innodb_log_buffer_size:0 unflushed_log:0 log_bytes_flushed:0
log_bytes_written:0 relay_log_space:0 binlog_cache_size:32768
Binlog_cache_disk_use:0 Binlog_cache_use:0 binary_log_space:0

Original issue reported on code.google.com by [email protected] on 13 Jun 2008 at 6:06

Create Apache templates

Create Apache templates.  Functionality TBD.

Original issue reported on code.google.com by baron.schwartz on 13 Oct 2008 at 2:07

Create system info templates

Create system information templates for things like

* disk usage
* disk I/O
* swap
* CPU
* load average
* memory usage
* LVM snapshot usage

Original issue reported on code.google.com by baron.schwartz on 13 Oct 2008 at 2:06

Invalid rrdtool command line getting invoked

I'm getting these errors when poller.php runs:

{{{
06/13/2008 11:58:30 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool
update /var/www/cacti/rra/mysql_free_pages_9.rrd --template  1213376309:U
ERROR: Not enough arguments
06/13/2008 11:58:30 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool
update /var/www/cacti/rra/mysql_pages_written_8.rrd --template  1213376309:U
ERROR: Not enough arguments
06/13/2008 11:58:30 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool
update /var/www/cacti/rra/localhost_proc_7.rrd --template proc 1213376309:144
06/13/2008 11:58:30 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool
update /var/www/cacti/rra/mysql_log_writes_10.rrd --template  1213376309:U
OK u:0.00 s:0.00 r:1.01
ERROR: Not enough arguments
06/13/2008 11:58:30 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool
update /var/www/cacti/rra/mysql_pending_ibuf_ao_rds_11.rrd --template 
1213376309:U
ERROR: Not enough arguments
06/13/2008 11:58:30 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool
update /var/www/cacti/rra/mysql_ibuf_merges_12.rrd --template  1213376309:U
ERROR: Not enough arguments
06/13/2008 11:58:30 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool
update /var/www/cacti/rra/mysql_unflushed_log_13.rrd --template  1213376309:U
ERROR: Not enough arguments
}}}

I'm using rrdtool-1.2.15 with mysql-cacti-templates-1.0.0, PHP
5.2.0-8+etch11, and cacti-0.8.7b.  What arguments does {{{rrdupdate}}} lack?

Original issue reported on code.google.com by [email protected] on 13 Jun 2008 at 5:07

Contribute documentation to cacti.net

It would be good to have documentation at

http://cacti.net/documentation.php

Original issue reported on code.google.com by baron.schwartz on 5 Nov 2008 at 6:25

Call to undefined function: array_change_key_case() in /web/sites/app/cacti/scripts/ss_get_mysql_stats.php on line 202

When I run from the command line: 
php -q ./ss_get_mysql_stats.php 10.0.0.2

I get this error:

xxxx:~/cacti/scripts$ php -
q /web/sites/app/cacti/scripts/ss_get_mysql_stats.php 10.0.0.2
<br>
<b>Fatal error</b>:  Call to undefined function:  array_change_key_case() 
in <b>/web/sites/app/cacti/scripts/ss_get_mysql_stats.php</b> on line 
<b>202</b><br>
xxxxx:~/cacti/scripts$ 

---------------------------
cacti-0.8.7b.tar.gz
mysql-cacti-templates-1.0.0.tar.gz
imported: cacti_host_template_x_db_server_ht_0.8.61.xml

didn't import this one: cacti_host_template_x_db_server_ht_0.8.6j.xml

do you need to import both?

Original issue reported on code.google.com by [email protected] on 23 Sep 2008 at 8:38

php script doesn't accept sockets

What steps will reproduce the problem?
------------------------------------------------------
1. attempt to use the ss_get_mysql_stats.php script with a socket.

What is the expected output?
------------------------------------------------------
i expect the script to preform just like it does with tcp/ip based 
connections.

What do you see instead?
------------------------------------------------------
Cannot connect to mysql server and app crash

What version of the product are you using? On what operating system?
------------------------------------------------------
1.1.1 on RHEL5.2 with MySQL 5.1.26

Please provide any additional information below.
-----------------------------------------------------------
in our environment, for security reasons, we run with --skip-networking. 
Only socket connections are allowed.

per php.net/mysql_connect, you can pass the location of a socket as the 
hostname via this pattern:  ":/path/socket". This worked OK but the 
$cache_file is constructed from the hostname, so I made a patch to strip 
out the ":" and any "/" in the hostname.

function ss_get_mysql_stats( $options ) {
<snip>
   $cache_file_name = str_replace(array(":", "/"), array("", "_"), 
$options[host]);
   $cache_file = "$cache_dir/$cache_file_name-mysql_cacti_stats.txt";
<snip>
}

Original issue reported on code.google.com by phpnotasp on 24 Oct 2008 at 4:13

ss_get_mysql_stats.php exceeds thread_stack

Running the stats script worked fine for months but now gives the following
output:
rror executing 'SELECT CONCAT('', 0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0
+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0
+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0
+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0
+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0
+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0
+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0
+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0
+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0
+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0
+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0
+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0
+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0
+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0
+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+1073742032+1073741929+1073744216+107374
2107+1073741952+1073741985+1073742731+1073741933+1073742047+1073753668+107374187
3+1073741992+1073741871+1085403161+1076942663+1073741925+1073742060+1075228984+1
075217549+1073742153+1073845424+1073742085+1073745642+683217222+1013+15186381)
A
S binary_log_space ': Thread stack overrun:  250448 bytes used of a 262144
byte stack, and 12000 bytes needed.  Use 'mysqld -O thread_stack=#' to
specify a bigger stack.PHP Warning:  (null)(): 2 result set(s) not freed.
Use mysql_free_result to free result sets which were requested using
mysql_query() in Unknown on line 0

I'm a bit worried about messing with thread_stack and have never seen this
warning before.

This is on CentOS 4.6 accessing MySQL server version 5.0.46-enterprise-gpl-log.

Original issue reported on code.google.com by [email protected] on 12 Aug 2008 at 8:13

InnoDB log buffer unflushed is wrong

The InnoDB log buffer unflushed in the InnoDB Log graph shows spikes that
reach about twice as large as the log buffer size.  This is impossible,
since the unflushed bytes can't be larger than the log size.

Screenshot is attached.

Original issue reported on code.google.com by baron.schwartz on 25 May 2008 at 6:13

Attachments:

Use of uninitialized value in join or string at ./make-template.pl line 884.

when using version 1.1.1 with the following command

./make-template.pl --script cacti_host_template_x_db_server_ht_0.8.6i.xml
mysql_definitions.pl

I get 

Use of uninitialized value in join or string at ./make-template.pl line 884.


when using version from SVN I get 

Use of uninitialized value in join or string at ./make-template.pl line 930.


To reproduce: 

Run the following command: 


What version of the product are you using? On what operating system?

Both SVN and released version 1.1.1. Both commands are run on OpenSuse 11.0


Original issue reported on code.google.com by [email protected] on 23 Oct 2008 at 4:54

Invert some graphs

Some graphs would benefit from inverting.

For example, the MyISAM indexes.  Reads could be up and writes down.

Original issue reported on code.google.com by baron.schwartz on 20 Oct 2008 at 12:04

Error: XML: Hash version does not exist.

What steps will reproduce the problem?
1. Import the latest mysql-cacti-templates via browse or copy & paste.


What is the expected output? What do you see instead?
I'm expecting to see 'import successful' instead I see 'Error: XML: Hash
version does not exist.'


What version of the product are you using? On what operating system?
Cacti 0.8.6i, RH 4.4, MySQL 5.0.45


Please provide any additional information below.
I have successfully imported the templates on Cacti 0.8.6j w/ no issues. 
Same OS and MySQL version.

Original issue reported on code.google.com by [email protected] on 23 May 2008 at 9:37

Distinguish zero from no-value

A lot of times the scripts will return 0 if some value can't be found.  If
the value can't be returned, there should be a way to say so.  Should it

a) return -1 and the templates should recognize 0 as the min valid value?
2) return an empty string?
d) something else?

The consequence of the current behavior is that there can be sudden spikes
in the graphs.  If variable X is a huge counter and goes 99 million,
unknown, 99 million, then it looks like there is a spike of 99 million
between the measurements.

Original issue reported on code.google.com by baron.schwartz on 23 Oct 2008 at 11:02

Graph extra information from InnoDB

There are a couple new things parsed and ready to output -- 

       'innodb_locked_tables'       => 'd0',
       'innodb_lock_structs'        => 'd1',

Original issue reported on code.google.com by baron.schwartz on 13 Oct 2008 at 12:18

Graphs need a --lower-limit parameter

Although the templates import successfully, as it turns out the web
interface won't permit editing a graph template unless a lower limit and
upper limit are specified.

In the absence of these, the graphs can look odd.  See
http://oss.oetiker.ch/rrdtool-trac/ticket/195 and
http://forums.cacti.net/viewtopic.php?t=29737 for the effect.  Adding
--lower-limit solves this.

Most graphs should be (0, MAX_INT64).

Graphs that have a negated element (see issue 42) should have (-MAX_INT64,
MAX_INT64).

Original issue reported on code.google.com by baron.schwartz on 9 Nov 2008 at 6:25

ss_get_mysql_stats.php does not indicate when stats are missing

I noticed that some of my stats disappeared when we enabled
innodb_lock_monitor.  The extra output pushed things off the status report.
 It would be nice if the script could log an error when expected stats like
buffer pool size are not seen in the SHOW INNODB STATUS output.

Original issue reported on code.google.com by [email protected] on 22 Sep 2008 at 9:28

Importing of XML fails...

What steps will reproduce the problem?
 Import of XML fails. I get the following error: Error: XML: Hash version 
does not exist.




What version of the product are you using? On what operating system?
CentOS release 5 (Final), cacti 0.8.6i, i have the latest revision 34

Please provide any additional information below.




Original issue reported on code.google.com by [email protected] on 6 May 2008 at 6:04

Graph memcached stats

Memcached templates should be a separate set of templates.

Original issue reported on code.google.com by baron.schwartz on 13 Oct 2008 at 2:04

Missing Handler_* statistics (from SHOW STATUS)

Simple, the templates and scripts are missing Handler_* statistics and a 
Graph for them.

Handler_* statistics are very valuable. Especially comparing Handler_* to 
Com_*. You will very quickly find if any graph spike is due to an increase 
in # of queries, or if it's one huge mother-of-a-query that spikes on 
Handler_something.



Original issue reported on code.google.com by [email protected] on 13 Nov 2008 at 4:22

No data in graphs - [ PHP Notice: Undefined offset ]

What steps will reproduce the problem?
1. I did a installation of mysql graphs of xaprb, following notes step by
step. Import XML ok, etc.
2. I can connect from bash command line of cacti server to mysql server
(that i wish to monitorize). I created the graphs without problem
3. No data is showed in graphs (INNOBD graphs) and cactierror.log show
errors like :
PHP Notice:  Undefined offset:  0 in
/path/to/cacti/scripts/ss_get_mysql_stats.php on line 130


What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?
Version 0.8.7b. Linux Centos 5.

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 14 May 2008 at 8:37

SQL syntax error when SHOW INNODB STATUS doesn't have information

A user posted the following:

Error executing 'SELECT CONCAT('', ((10 << 32) + 2142993823)) AS
innodb_transactions, CONCAT('', (((10 << 32) + 2142993823) - ((10 << 32) +
2142968463))) AS unpurged_txns, CONCAT('', (( << 32) + )) AS
log_bytes_written, CONCAT('', (( << 32) + )) AS log_bytes_flushed,
CONCAT('', ((( << 32) + ) - (( << 32) + ))) AS unflushed_log, CONCAT('',
0+231781322+910087356) AS spin_waits, CONCAT('', 61713300314) AS
spin_rounds, CONCAT('', 122774767+42298281+44021761) AS os_waits': You have
an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near '<< 32) + )) AS
log_bytes_written, CONCAT('', (( << 32) + )) AS log_bytes_flushed' at line 1

The problem was SHOW INNODB STATUS was truncated, so some of the items were
empty strings instead of integers.

Original issue reported on code.google.com by baron.schwartz on 9 Oct 2008 at 10:22

Give an easy way to make parameters customizable

Parameters to scripts are a bit tough to make customizable right now.  If
the user wants to set up memcache with a non-default IP address for
example, she has to go through the data templates and select the "Use
Per-Data Source Value (Ignore this value)" checkbox beside the "server"
item.  Then she has to go to each data source and fill in the item.  That's
a royal hassle.

The user should be able to say

meta/make-template.pl --make-per-datasource server,[others,] ....

And then the resulting template ought to have the desired checkboxes ready
to fill, and with the allow_nulls set to "off" in the data input.

When issue 44 is done, there will probably be some interplay between these
functionalities.

Original issue reported on code.google.com by baron.schwartz on 11 Nov 2008 at 1:50

Improve replication graph

Using r40, I found that the 'MySQL Replication' graph left a little to be 
desired. Two issues:

1. slave_running / slave_stopped are generally not visible once a server has 
fallen appreciably 
behind in replication

2. Non-trivial to utilize the heartbeat table support; even with heartbeat it 
shows the (in my 
opinion worthless) seconds_behind_master value

My resolution is:

Included in attached patch:
- Change "X MySQL Replication GT" to remove 'seconds_behind_mstr'
- Delete seconds_behind_master Output Field from "X Get MySQL Stats"
- Delete seconds_behind_mstr from "X MySQL Replication DT"
- Add <hb_table> to Input String in "X Get MySQL Stats"
- Add hb_table Input Field in "X Get MySQL Stats"
- Modify gatherer script to assign slave_lag either from heartbeat table or 
from 
seconds_behind_master depending on whether or not hb_table value is provided; 
assign value of 
slave_lag to slave_running or slave_stopped depending on state

Requires manual intervention:
- 'Use per-data source value' for username/password/heartbeat table in "X MySQL 
Replication 
DT", pre-fill user/pass with cacti/cacti if desired. Note that you have to 
provide a user and pass 
in order to provide a heartbeat table value.

A few other suggestions not implemented here:
- The documentation should note that SELECT is required in addition to SUPER 
for the cacti 
MySQL user if heartbeat is used.
- It would be nice if there was a visual representation of a failed hb_table 
check (like the 
heartbeat table or row isn't present), perhaps making slave_running / 
slave_stopped negative on 
the graph?
- Eliminate open tmp tables / retried transactions from this graph, as they 
don't really scale 
similar to slave_lag and are likely to be hard to view.

Original issue reported on code.google.com by [email protected] on 30 May 2008 at 12:01

Attachments:

script requires SUPER, PROCESS rights in mysql but the readme states the mysql user only needs SUPER

What steps will reproduce the problem?
1. follow installation instructions in readme
2. test the php script, get error: "Error executing 'SHOW /*!50000 ENGINE*/
INNODB STATUS': Access denied; you need the PROCESS privilege for this
operation"
3. run "GRANT PROCESS ON..." for the user, test again, problem solved.

What is the expected output? What do you see instead?
Expected it to work with the permissions stated in the instructions.

What version of the product are you using? On what operating system?
1.0.0 with mysql-server-5.1.26 on FreeBSD 7.0-STABLE

Please provide any additional information below.
The readme should probably be updated to reflect this.

Original issue reported on code.google.com by [email protected] on 29 Sep 2008 at 4:27

Result from CMD not valid. Partial Result:

What steps will reproduce the problem?
1. Install, setup, run...
2. Receive errors in log file

What is the expected output? What do you see instead?
Erm... I expect graphs with values on them? Instead, I see graphs with lots
of "nan" values, and lots of errors in the log:

09/29/2008 09:12:01 PM - CMDPHP: Poller[0] Host[1] DS[51] WARNING: Result
from CMD not valid. Partial Result: 

What version of the product are you using? On what operating system?
I've tried the mysql-cacti-templates 1.0.0 .tar.gz, as well as the r60 from
SVN. Other software: Fedora 9 x64, MySQL 5.0.67-1, PHP 5.2.6-2, Cacti 0.8.7b

Please provide any additional information below.
M-C-T is setup to use the same MySQL user that Cacti uses (not root); have
granted SUPER and PROCESS privileges.

I tried to make a new template for 0.8.7b, but I got this from the Perl script:
No such version '0.8.7b', try one of 0.8.4 0.8.5 0.8.5a 0.8.6 0.8.6a 0.8.6b
0.8.6c 0.8.6d 0.8.6e 0.8.6f 0.8.6g 0.8.6h 0.8.6i 0.8.6j at make-template.pl
line 547.

If I was getting no errors in the log, then I would assume the problem lies
elsewhere, but I'm thinking it's something to do with the versions...

I get no notices/warnings/errors when I manually run the PHP script from
the command line.

Original issue reported on code.google.com by [email protected] on 29 Sep 2008 at 8:36

Make each template pass a parameter so only desired information is printed back on cmdline

Even with the short variable names, some users are seeing the output be too
long for Cacti to handle.  As a result I think the command-line parameter
needs to include which set of data is desired back from the script, so it
can be shorter.  The first invocation will still fill the cache file, but
each invocation will return only a subset of the information.

Original issue reported on code.google.com by baron.schwartz on 9 Oct 2008 at 10:27

Enable caching again

ss_get_by_ssh.php doesn't permit caching.  Fix it :)

Original issue reported on code.google.com by baron.schwartz on 11 Nov 2008 at 12:39

Monitor ps

Monitor ps to track:

CPU usage
virtual size
resident size
count

aggregated by process name.

Original issue reported on code.google.com by baron.schwartz on 13 Oct 2008 at 10:12

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.