For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Zdenda's avatar
Zdenda
Icon for Cirrus rankCirrus
Jul 14, 2022
Solved

API rest - monitor at pool settings

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

 

 

  • 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

     

     

     

3 Replies

  • 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