forums › forums › Monyog › Monyog customisation › Not Flushed Delayed Rows Notification
- This topic is empty.
-
AuthorPosts
-
-
July 22, 2009 at 2:58 pm #11596Steve BondMember
Hi All,
I'm trying to put together a customisation to clooect the not_flushed_delayed_rows status variable and to alert when this value reaches a certain percentage of the delayed_insert_queue system variable.
Below is what i have hacked together from looking at the other collectors but it doesn't work. my javascrpt sucks so if anyone can point me in the right direction i would appreciate it.
Thanks in advance
/*
MONyog – MySQL Monitor and Advisor
Copyright © 2009 Webyog Softworks Private Limited (http://www.webyog.com)
*/
obj = {
Group : “NVM Custom Counters”,
Name : “Percentage Delayed Rows Not Flushed”,
Formula : “not_flushed_delayed_rows / delayed_queue_size”,
Value : function()
{
if(MONyog.MySQL.Custom.Available != 1)
return “”;
return(SafeDiv0(MONyog.MySQL.GlobalStatus.not_flushed_delayed_rows,MONyog.MySQL.
GlobalVariables.delayed_queue_size)*100).tofixed(2)+ “%”;
},
MailAlert : “Yes”,
Chart : “Yes”,
Barchart : “Yes”,
Warning : 70,
Critical : 90,
AlertCondition : function()
{
GetWarnStatusInt(this.Value, this.Critical, this.Warning, true);
},
DocText : “The number of delayed inserts not yet commited to the database”
};
obj = {
Group : “NVM Custom Counters”,
Name : “Number of Delayed Rows Not Flushed”,
Formula : “not_flushed_delayed_rows”,
Value : function()
{
if(MONyog.MySQL.Custom.Available != 1)
return “”;
return MONyog.MySQL.GlobalStatus.not_flushed_delayed_rows;
},
DocText : “The number of delayed inserts not yet commited to the database”
};
_ALL_COUNTERS.push(obj);
-
July 22, 2009 at 3:30 pm #29341Steve BondMember
I worked it out if anyone else is interested. code attached as txt file
-
July 22, 2009 at 3:50 pm #29342peterlaursenParticipant
Actually we will include scripting examples in documentation in next MONyog versions. Do you mind if we use this?
-
July 23, 2009 at 10:04 am #29343Steve BondMember
I 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.
-
July 23, 2009 at 12:28 pm #29344Steve BondMember
I've finished now, all appears to be working correctly.
Final Script Attached
-
-
AuthorPosts
- You must be logged in to reply to this topic.