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

Slave Delay

forums forums Monyog Monyog customisation Slave Delay

  • This topic is empty.
Viewing 3 reply threads
  • Author
    Posts
    • #11872
      andrewsh
      Member

      I have implemented mk-slave-delay from maatkit toolset for some of my servers. What this program does is delays replication by certain number of hours by stopping and starting sql_thread on a slave. I want to stop monitoring for sql_thread on certain hosts by modifying replication 4 script.

      Does any one have any idea how to accomplish this?

      I want to stop monitoring sql_tread on some slaves (replication 4) but monitor everything else slave related.

      Thank you.

    • #30485

      Hi Andrew,

      This can be simply done by hard-coding another condition in replication-4.js. Here's an example:

      Code:
      obj = {

      Group : “Replication”,
      Name : “Slave I/O state”,
      Formula : “Slave_IO_State”,
      Value : function()
      {
      if(IsReplicationSlave(MONyog.Server.Config.IsReplicationSlave) == false || !MONyog.MySQL.Slave.Slave_IO_State || MONyog.Connections.ConnectionName == '')
      return “(n/a)”;

      return (MONyog.MySQL.Slave.Slave_IO_State);

      },

      DocText : “This value is same as the State Field of SHOW PROCESSLIST of slave I/O Thread.” +
      ” This gives you more details on what the thread is doing – whether its trying to connect to the master,”+
      ” waiting for events, reconnecting to the master, etc.”
      };
      _ALL_COUNTERS.push(obj);

      This will disable it and display only '(n/a)' for the connection named ''. If you configured alerts for this counter, ie, MailAlert: 'Yes', this will also prevent mails from being sent for ''.

    • #30486
      andrewsh
      Member
      'Sayan wrote on '12:

      Hi Andrew,

      This can be simply done by hard-coding another condition in replication-4.js. Here's an example:

      Code:
      obj = {

      Group : “Replication”,
      Name : “Slave I/O state”,
      Formula : “Slave_IO_State”,
      Value : function()
      {
      if(IsReplicationSlave(MONyog.Server.Config.IsReplicationSlave) == false || !MONyog.MySQL.Slave.Slave_IO_State || MONyog.Connections.ConnectionName == '')
      return “(n/a)”;

      return (MONyog.MySQL.Slave.Slave_IO_State);

      },

      DocText : “This value is same as the State Field of SHOW PROCESSLIST of slave I/O Thread.” +
      ” This gives you more details on what the thread is doing – whether its trying to connect to the master,”+
      ” waiting for events, reconnecting to the master, etc.”
      };
      _ALL_COUNTERS.push(obj);

      This will disable it and display only '(n/a)' for the connection named ''. If you configured alerts for this counter, ie, MailAlert: 'Yes', this will also prevent mails from being sent for ''.

      Forgot to mention my monyog version is 2.82 and the suggested solution failed but when i installed trial version of 3.07 it worked. Any suggestions how can i make it work with 2.82

    • #30487
      andrewsh
      Member

      i have version 2.82 of monyog and suggested solution has failed for it. but it worked for trial version of 3.07. Is there anything specific that could account for version difference?

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