Forum Discussion

nikzin_341815's avatar
nikzin_341815
Icon for Nimbostratus rankNimbostratus
Apr 03, 2019

LTM Monitor Receive String

Hello, my ltm monitor receive string doesn't work. Problem is that i am only interested in one line. Here is the whole output of the receive sting:

 

{ "returnCode": 0, "version": "9.0.0.37265", "product": "match", "command": "list project", "errorMsg": "OK", "projectList": [ { "projectId": "4711", "author": "Sam Sample", "description": "Test", "title": "Example", "configurationTime": "Date:Time", "state": "RUNNING" } ] }

 

For me only the line with: "state": "RUNNING" is interesting. When this is changing pool member should be go offline and no traffic will be forwarded. I have tested with differnet wildcards e.g.:

 

.\"state\":\"RUNNING\".

 

But it doesn't work.

 

Thankfull for any help.

 

Cheers, Nikolas

 

2 Replies

  • The receive string uses regex to match, however just put in the following which should match:

    "state": "RUNNING"
    
  • Hi,

    You can also try:

    "state":\s?"RUNNING"

    with "\s?", my regular expression will accept the following expression (with and without space):

    • "state": "RUNNING"
    • "state":"RUNNING"

    Regards