Using NetXMS to monitor MySql replication status and progress

Started by BillLortz, September 19, 2013, 01:48:09 AM

Previous topic - Next topic

BillLortz

I have a need to monitor the replication status of MySQL on several hundred remote servers.    Initially when a server first is installed I would like to monitor how far replication is since the process can take more than a day.   Once a server is fully in production, I need to monitor some status fields to ensure everything is OK with replication.

I'm on MySql version 5.5.32 and version 1.2.8 of NetXMS.

In MySQL, the way of getting the fields I'm interested is to do the query "Show Slave Status;" which returns a wide table with lots of variables.  Currently, there is no "select" statement that will return the info I need.
 
I've written a powershell script that can launch mysql, perform the query, and grab the output from the table.  I can configure external commands to call the script and get the value into NetXMS.   Unfortunately, external commands and powershell specifically have a fair amount of overhead.    I'd prefer that there is a more direct way within NetXMS to get this info.  The servers that I'm monitoring are very CPU bound decoding and monitoring multiple live camera streams and every bit of overhead added for monitoring the database has the potential of disrupting that process.  That is why I'm trying to lighten the footprint.

I tried using the NetXMS ODBC subagent.   I can get it to execute the query, but the subagent is hardcoded to select only column 1.  I'd like to track columns 6, 11, 12, and 19.

Is there a more native way of using NetXMS to either:

  • return a table using an odbc inquiry
  • or select a column from an odbc subagent inquiry
  • or perhaps execute SQL statements from within an netxms script that would do the query and filter the resulting column
If not, are any of those options being considered in the future?  For example, the ODBC subagent seems to have column 1 hardcoded in it.   If there was an optional way of specifying the column number in the agent config file, it would be helpful.   The new table functionality looks very intriguing - it would seem to me that ODBC queries would be a natural extension because they can return tables.

Thanks in advance.

Bill

Victor Kirhenshtein

Hi!

We are working on sub-agent called DBQUERY which will eventually replace ODBCQUERY sub-agent. It will allow you to do table query and retrieve it as table DCI in NetXMS. Some limited version will be included in 1.2.9.

Best regards,
Victor