on 12-Mar-2015 15:16
Problem this snippet solves:
The MS-SQL monitor (when properly configured) runs a query and compares the response to the receive string. If recvrow and recvcolumn are specified, the receive string comparison will be against only that data, rather than the full query result.
Here is a working example. (Thanks to Consultant Extraordinaire Nelson Ge for proving in the field.)
How to use this snippet:
Note: Having a SQL DBA on hand can be quite helpful in making sense of the monitor configuration fields and debug output.
Code :
monitor sql_field_check { defaults from mssql database "DB1" debug "no" password "bigip" recvcolumn "1" recvrow "2" recv "MyDogFrankie" send "select top 1 ItemID from Activity order by ActivityID" username "bigip" }