Forum Discussion

BigTuna_117707's avatar
BigTuna_117707
Icon for Nimbostratus rankNimbostratus
Sep 13, 2017

SQL Monitor

I am trying to create a SQL health monitor that uses an alias address, does a SQL query and looks for a number in a row. If the number is returned the monitor marks the node up. The monitor is working fine but I would like to use a variable in it so I do not have to make a unique monitor for every node I apply it to. The monitor looks like this:

 

Send String SELECT Status FROM CentersStatus WHERE ServerName = 'servername'

 

Receive sting 1

 

I want to replace servername with the node IP that I am applying the monitor to.

 

Thanks

 

  • You cannot do this with an inbuilt SQL monitor - there is no mechanism for substitution in the SEND string. Is there no way to write the SQL query to select the correct row for the targeted device?

     

    Alternatively, you could write an external monitor (which get the node IP and port as parameters). You are limited in the tools you have available for connecting to SQL servers, though.

     

    https://devcentral.f5.com/wiki/advdesignconfig.externalmonitor.ashx