Forum Replies Created
-
AuthorPosts
-
Steve BondMember'danit' wrote:
i'm with steve on this. i think the ability to modify email alerts would be a big plus.
i receive slow query alerts when it is hard for me to investigate (for example in middle of the night or when i'm on the road). i would like to add a show process list to the email alert. surprisingly, i'm finding it to be impossible!
@danit,
I had the exact same idea a while back (great minds!), wanted to get a process list dump when the threshold was met. Unfortunately didn't get very far. See :http://www.webyog.co…?showtopic=4971
Outside monyog I created a script that checked the number of running threads and then did a show process list if it hit the threshold. I think our spikes were too short lived though as the number of queries listed was almost always way below the threshold. This might be suitable for your slow query requirement though.I
Would be very interested if you come up with another way to do it!
Steve
Steve BondMemberI've just been reviewing the thread and realised it didn't post the ultimate outcome.
I sent the mysql.data file for the offending server from MonYog over to the webyog support guys and got the following response:
Quote:Hi Steve,
Thanks for the mysql.data file. On analyzing the file we found that there was really a spike in the Bytes_sent value. The previous value of Bytes_sent was 37905826139, which jumped around 4.2GB to 42506680344 in 1 min duration.
We are still analyzing this case and trying to find if there is any bug on our side. We will update accordingly.
Followed by the final assessment of the situation:
Quote:Our analysis shows that this happens due to overflow of a 32-bit Integer used for containing the status variables by the MySQL server.
Please see the report http://bugs.mysql.com/bug.php?id=42698 (what I posted to bugs.mysql.com myself 2½ years ago). A server restart will reset the status variable to ZERO. You may schedule such daily or weekly for instance.That (and an upgrade to MySQL 5.6.3 – but this is still an early beta) is the only solution if traffic is so heavy that the 32-bit integer will overflow between occasional restarts.
In our case we were just about to migrate our production databases over to MySQL 5.5 on separate servers, so the counters were 'reset' for now.
Steve BondMemberThanks for the tip about the grouping.
Looking at the bytes sent and bytes recieved data for a 10 minute period around the dip it would appear the server was receiving data but not sending any for the minute between those collections.
Expanding the time period out there appears to be severel dips in received and sent data (at different times) over a 2 hours period.
There is also a massive spike in sent bytes (4.2G) which i don't believe is even possible in a minute.
Looks pretty nasty, leaning toward a possible switch issue for the dips. no idea about the spike!!
Steve BondMemberHi Manesh,
Thanks for the detailed response.
I've checked the monyog.log and although this does show several connection/collection failures to the server in question they are not at the time of the drop to 0 on the graph.
– The collections are done over a VPN to a remote site so this isn't necessarily unexpected.
Also by setting the history/trend to cover the minute during which the graph dipped to 0 monyog shows 'yes' in the availability indicator.
February 26, 2010 at 2:05 pm in reply to: Export Process List To File When Running Threads > Threshold #30187Steve BondMember'peterlaursen' wrote on '18:It will be a new feature and will require new code in MONyog. But there may be situations where retrieval of processlist is not possible (if the alert is about non-availability of service).
Hi there,
Any ideas if/when this might make it into MONYog?
December 18, 2009 at 4:41 pm in reply to: Export Process List To File When Running Threads > Threshold #30185Steve BondMember'peterlaursen' wrote on '18:I think we should then rather (optionally) include output of SHOW FULL PROCESSLIST in the alert itself. Only a personal idea. What say?
Yes, that sounds perfectly reasonable. It takes out the added step of retrieving the output file from an operational point of view.
The idea is simply to try and get an idea of what's running when the threads have got that high.
So to get the data out in the email, would it be possible to hack that in on the customisation pages or would that require a new feature/development from the MONYog team?
Regards,
Steve
Steve BondMemberI've finished now, all appears to be working correctly.
Final Script Attached
Steve BondMemberI don't mind you using it, but its still not quite right.
I get mail alerts even when its at 0%.
I'm still working on it at the moment so I will post the code when i've finished.
Steve BondMemberI worked it out if anyone else is interested. code attached as txt file
-
AuthorPosts