snmp-dca-base
1 Topicjson format for the snmp-dca-base user-defined part
The question: When I'm constructing the json for the payload to create an snmp-dca-base monitor, how do I phrase the user-defined parts? I am on 11.5 trying to add a custom snmp-dca-base monitor with user-defined data so that I can poll my custom oid. (Not using snmp-dca since we want to poll something more specific.) I've beaten my head against this for a while and do not understand the bit in the manual which says how to format this. Adding stanzas like "user-defined key1 value1 user-defined key2 value2" works in tmsh on the command line but I've hit a wall with the json. Page 49-127 of the 11.5.0 tmsh reference says (it seems copied from the external monitor section?): user-defined Specifies any user-defined command-line arguments and variables that the external program requires. Use the following syntax to specify a user defined parameter. modify external my_external user-defined my_param_name my_param_value Use the following syntax to remove a user defined parameter. modify external my_external user-defined my_param_name none For a monitor that would look like this without the user-defined portions when created from scratch (this one works): ltm monitor snmp-dca-base /Common/cwt2 { community bigsecret defaults-from /Common/snmp_dca_base interval 10 time-until-up 0 timeout 30 version v2c } I am trying to make it look like this if I created it from scratch (this one does not work): ltm monitor snmp-dca-base /Common/cwt2 { community bigsecret defaults-from /Common/snmp_dca_base interval 10 time-until-up 0 timeout 30 version v2c user-defined thing1 .1.2.3.4.5.6 user-defined thing1_coefficient 123 user-defined thing1_threshold 456 } My json input payload so far (I get the least complicated error message with this one): {"community":"bigsecret","version":"v2c","user-defined":[{"cwt2_coefficient":"1"}],"defaults-from":"/Common/snmp_dca_base","name":"/Common/cwt2"} But the output: { "errorStack" : [], "message" : "\"{\" unknown property", "code" : 400 } And the log line from /var/log/audit: Mar 2 15:01:52 lb-lab notice icrd_child[25573]: 01420002:5: AUDIT - pid=25573 user=cwood folder=/Common module=(tmos) status=[Syntax Error: "{" unknown property] cmd_data=create ltm monitor snmp-dca-base /Common/cwt2 { community bigsecret version v2c user-defined replace-all-with { { It thinks that the '{' (left squiggly bracket) is a property? Odd, but I do get the monitor created when I remove the user-defined portion from the input json, albeit without those lines.353Views0likes0Comments