Comments (5)
Hi Eric,
Sorry for the slow reply, I somehow missed this issue until now.
I haven't tested this, but you should be able to make the change you're looking for by just a few things.
change all occurances of ts_min to ts_max in the following files:
conf/config.inc.php
views/report.php
views/graph_search.php
lib/Anemometer.php
You probably also want to make sure that the indexes on the report_history table are changed to include ts_max instead of ts_min where it occurs. Let me know if there are any issues and I will try to assist.
from anemometer.
Also just a note on this:
I think this issue doesn't affect us the same way because of the way we're collecting and storing slow query logs. We have a cron process set up which samples only 36 seconds every 15 minutes. This means that for any given sample, the ts_min and ts_max are rather close together, and when reporting on any given time interval you're usually looking at several different collection periods aggregated together.
We collect logs this way because when we enable the slow query log, we're also setting the long_query_time to 0.00 -- in Percona mysql this logs all queries. On a busy server this is a lot of data, hence the short collection period. In effect we're sampling about 4% of all queries. In Oracle mysql my suggestion would be to use 0.0001 or something similarly small as the long_query_time.
from anemometer.
Thanks for the update.
What I did as a work around was tail the slow log last 25K lines save that off and then on the next pass i take another sample of 25K lines and do a diff. I run this via cron every 10 minutes.
LIMIT=25000
mv -v /tmp/$HOST.slow /tmp/$HOST.slow.last
ssh $HOST "tail -n$LIMIT $SLOWLOG" > /tmp/$HOST.slow
diff -u /tmp/$HOST.slow.last /tmp/$HOST.slow |sed -e 's/^-//' -e 's/^+//' > /tmp/$HOST.updates
pt-query-digest $ARGS --filter=" $event->{Bytes} = length($event->{arg}) and $event->{hostname}="$HOST"" /tmp/$HOST.updates
from anemometer.
This issue has been fixed more permanantly by the the new mysql 5.6 support. It's now possible to override the column names used for some special fields types. You'll have to use the new sample.config.inc.php, and add the following
'special_field_names' => array(
'time' => 'ts_max',
)
into the array defined starting at line 296:
$conf['reports']['slow_query_log'] = array(
from anemometer.
thank your update,
'special_field_names' => array(
'time' => 'ts_max',
)
this may dosn't work for mysql 5.7, how i can do?
from anemometer.
Related Issues (20)
- Anemometer does not support 5.7 as backend DB HOT 3
- Anemometer for remote servers
- hostname_max column is empty HOT 3
- Blank page after selecting a Datasource HOT 5
- Following documentation leads to data connection error. HOT 1
- Incorrect query results and problems with FULL GROUP BY HOT 5
- Division by 0 warnings
- How to get the UI up and running ? HOT 2
- TimeZone error HOT 1
- Maintaining of Anemometer HOT 2
- Plot failed when there are return characters in SQL HOT 1
- PHP Fatal error: Uncaught exception 'Exception' with message DateTime HOT 1
- SHOW TABLE STATUS and SHOW CREATE TABLE occurs messy code
- Error in Query Explain Plugin: Connection error: Lost connection to MySQL server at 'reading initial communication packet', system error: 111(2013)
- Is there an analyzer or visualizer for table locks and deadlock issues?
- pt-query-digest 3.0.11 changed `checksum` from BIGINT UNSIGNED to CHAR(32) HOT 5
- can't find visual explain at /usr/bin/pt-visual-explain
- Click the checksum details page bug "Unknown checksum: ……"
- Incorrect search results based on time range HOT 1
- There is a SQL inject vulnerability
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anemometer.