Bug ID 520970: LTM monitors snmp-dca and snmp-dca-base have property 'user-defined' with nonstandard behavior

Last Modified: Feb 10, 2021

Bug Tracker

Affected Product:  See more info
BIG-IP TMOS(all modules)

Fixed In:
12.0.0

Opened: Apr 30, 2015
Severity: 3-Major

Symptoms

LTM monitors snmp-dca and snmp-dca-base have a property called user-defined that behaves in a nonstandard way when queried through iControl REST. The user-defined property takes a space-delimited name-value pair of the form: tmsh modify ltm monitor snmp-dca my-snmp-dca user-defined a b However, in iControl REST, this property is displayed as part of the apiRawValues JSON object, and is of the form: "apiRawValues": { "userDefined c": "d", "userDefined a": "b" }

Impact

In order to read the user-defined attribute through iControl REST, each key-value pair must be read from the apiRawValues JSON object and requires additional string parsing.

Conditions

The user-defined attribute in LTM snmp-dca and snmp-dca-base monitors is not 'none', and is queried by iControl REST.

Workaround

To retrieve the environment variables from a monitor, the userDefined attribute is not present, but the value can be parsed from the apiRawValues JSON object. For each key-value pair, the values are displayed as 'userDefined {key}': '{value}'. For creating or modifying an object, the correct JSON syntax is: # Create an LTM external monitor with three environment variables # restcurl -u admin:admin /mgmt/tm/ltm/monitor/external/ -X POST -d '{ "name" : "test1234", "userDefined":"name1\" \"value1\" user-defined \"name2\" \"value2\" user-defined \"name3\" \"value3" }' { (snip for brevity) "apiRawValues": { "userDefined name1": "value1", "userDefined name2": "value2", "userDefined name3": "value3" } } # Delete a single environment variable from an existing monitor by setting the value to none: restcurl -u admin:admin /mgmt/tm/ltm/monitor/external/myexternalmonitor -X PATCH -d '{ "userDefined":"\"thing\" \"none\"" }'

Fix Information

None

Behavior Change