Forum Discussion

Magnum_IP's avatar
Magnum_IP
Icon for Nimbostratus rankNimbostratus
Feb 05, 2013

Multiple Receive Strings in MSSQL Monitor

Can anybody tell me how to check for multiple receive strings in an MSSQL Monitor?

 

 

I have tried the following formats

 

(A|B)

 

A|B

 

'A'|'B'

 

but without success.

 

 

Thanks,

 

fergu5

 

6 Replies

  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus
    I'm not sure you can.

     

     

    What you could do is either use two monitors and only require 1 of them to be up, OR write an external monitor that does all of your checks and returns UP or DOWN.

     

     

    H
  • Hamish,

     

    Thanks for your reply. I've tried the two monitor scenario and that works, I'd rather not use an external monitor if I can help it, I want to keep the solution simple.

     

    Just to explore one last avenue...

     

    In my original mail I said I was trying to check for the receive string A or B, with any other response causing the monitor to fail. Let's say there was only one other value, C, is there a way to have the MSSQL monitor check the value is not C?

     

    Perhaps,

     

    !C

     

    Regards,

     

    fergu5

     

  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus
    Yeah. You could use the down on receive action for C...

     

     

    H
  • Hamish,

     

    Apologies for another question. I can't see anything like the 'down on receive' option you mention in the MSSQL Monitor page in the GUI, are you suggesting using an external monitor to achieve this logic?

     

    Regards,

     

    fergu5

     

  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus
    Sorry. Good point. I forgot you were using the MSSQL monitor... I think you'd have to use an external monitor for that.. (Or an external webpage that does the check and use an HTTP monitor with a specific IP and Port).

     

     

    H
  • The monitoring daemon should support POSIX extended regexes. So (A|B) should work to match a literal A or B in the response content:

     

     

    sol5917: Using regular expressions in a health monitor Receive String

     

    https://support.f5.com/kb/en-us/solutions/public/5000/900/sol5917.html

     

     

    If that's not working, you can check SOL12531 for troubleshooting suggestions:

     

     

    SOL12531 - Troubleshooting health monitors

     

    https://support.f5.com/kb/en-us/solutions/public/12000/500/sol12531.html

     

     

    Aaron