forums › forums › Monyog › Monyog customisation › Slave Delay
- This topic is empty.
-
AuthorPosts
-
-
February 11, 2010 at 6:08 pm #11872andrewshMember
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.
-
February 12, 2010 at 6:18 am #30485Sayan ChalihaMember
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 ' '. -
February 12, 2010 at 4:18 pm #30486andrewshMember'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
-
February 12, 2010 at 4:21 pm #30487andrewshMember
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?
-
-
AuthorPosts
- You must be logged in to reply to this topic.