Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Not Flushed Delayed Rows Notification

forums forums Monyog Monyog customisation Not Flushed Delayed Rows Notification

  • This topic is empty.
Viewing 4 reply threads
  • Author
    Posts
    • #11596
      Steve Bond
      Member

      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);

    • #29341
      Steve Bond
      Member

      I worked it out if anyone else is interested. code attached as txt file

    • #29342
      peterlaursen
      Participant

      Actually we will include scripting examples in documentation in next MONyog versions. Do you mind if we use this?

    • #29343
      Steve Bond
      Member

      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.

    • #29344
      Steve Bond
      Member

      I've finished now, all appears to be working correctly.

      Final Script Attached

Viewing 4 reply threads
  • You must be logged in to reply to this topic.