cancel
Showing results for 
Search instead for 
Did you mean: 

API rest - monitor at pool settings

Zdenda
Cirrus
Cirrus

Hello,

when I add monitor to pool via Rest API it works fine untill I try to set "Availability requirement" to "At least 1".

In API it's done with prefix "min 1 of" (https://clouddocs.f5.com/api/icontrol-rest/APIRef_tm_ltm_pool.html)

You can specify a single monitor, multiple monitors “http and https”, or a “min” rule, “min 1 of { http https }”.

 

But when I try it, I get 400 and such message:  "01070022:3: The monitor template { was not found.",

 

I use version v14.1.4.

Can you help me with this? Thanks

Zdenek

 

 

1 ACCEPTED SOLUTION

If you take off the curly braces it should work (tested with TMOS v15.1.3.1).

Please try:

curl -svk -u admin: 'https://localhost/mgmt/tm/ltm/pool/~Common~pool_monitor_test' -H 'Content-Type: application/json' -X PATCH -d '{"monitor": "min 1 of monitor_https_A monitor_https_B"}' | jq

To remove existing monitors:

curl -svk -u admin: 'https://localhost/mgmt/tm/ltm/pool/~Common~pool_monitor_test' -H 'Content-Type: application/json' -X PATCH -d '{"monitor": "none"}' | jq

 

 

 

View solution in original post

3 REPLIES 3

Sorry, but are you sure you're answering to my question?

If you take off the curly braces it should work (tested with TMOS v15.1.3.1).

Please try:

curl -svk -u admin: 'https://localhost/mgmt/tm/ltm/pool/~Common~pool_monitor_test' -H 'Content-Type: application/json' -X PATCH -d '{"monitor": "min 1 of monitor_https_A monitor_https_B"}' | jq

To remove existing monitors:

curl -svk -u admin: 'https://localhost/mgmt/tm/ltm/pool/~Common~pool_monitor_test' -H 'Content-Type: application/json' -X PATCH -d '{"monitor": "none"}' | jq

 

 

 

Thank you, nice easter egg 🙂