Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

create http monitoring in case of status 500 or higher disable node or pool-member

cleiton_82
Nimbostratus
Nimbostratus

Help

I need

Create http monitor:  

POST 'http://192.168.0.100:8080/ClayRestApi/NMON40'

in case of status 500 or higher disable node or pool-member

5 REPLIES 5

Paulius
MVP
MVP

@cleiton_82 I believe what you are looking for is the following. Please note the line following the send string or receive string is what should be pasted into that respective box in the F5 GUI when configuring the health monitor

send string:
POST /ClayRestApi/NMON40 HTTP/1.0\r\n\r\n\r\n

receive string:
^HTTP\/1.[10]\s5[0-9][0-9]

@Paulius 

I need the string with the parameters below:

curl --location --request POST 'http://192.168.0.100:8080/ClayRestApi/NMON40'\
--header 'Content-Type: application/json'\
--data-raw '{    "workflow": "modelSTUB",
    "recordType": "NMON40",
    "source": "SOURCE",
    "dest": "PMAX",
    "tranCode": "200",
    "dataSpecificationVersion": "2.0",
    "extendedHeader": "Via_Var",
    "clientIdFromHeader": "U_ORO001_CR",
    "recordCreationDate": "20230208",
    "recordCreationTime": "190706",
    "recordCreationMilliseconds": "016",
    "gmtOffset": "-03.00"
}'

@cleiton_82 In this comment is it necessary to send creation information and time offset or just the other header fields?

@Paulius Those same header fields that are in the curl command

 

--header 'Content-Type: application/json'\
--data-raw '{    "workflow": "modelSTUB",
    "recordType": "NMON40",
    "source": "SOURCE",
    "dest": "PMAX",
    "tranCode": "200",
    "dataSpecificationVersion": "2.0",
    "extendedHeader": "Via_Var",
    "clientIdFromHeader": "U_ORO001_CR",
    "recordCreationDate": "20230208",
    "recordCreationTime": "190706",
    "recordCreationMilliseconds": "016",
    "gmtOffset": "-03.00"
}'

@cleiton_82 This might work for you for the send string but I'm not 100% positive on it because I have never had to send data in an HTTP monitor.

POST /ClayRestApi/NMON40 HTTP/1.0\r\nContent-Type: application/json\r\n\r\n{"workflow": "modelSTUB",\r\n"recordType": "NMON40",\r\n"source": "SOURCE",\r\n"dest": "PMAX",\r\n"tranCode": "200",\r\n"dataSpecificationVersion": "2.0",\r\n"extendedHeader": "Via_Var",\r\n"clientIdFromHeader": "U_ORO001_CR",\r\n"recordCreationDate": "20230208",\r\n"recordCreationTime": "190706",\r\n"recordCreationMilliseconds": "016",\r\n"gmtOffset": "-03.00"\r\n}\r\n\r\n

 I had been rethinking the receive string and do you want a valid response to be any HTTP status code ranging from 1xx to 4xx and only a 5xx would be an invalid response?