How do the Parameters and Options Fields Listed in the ASM API rule_mod command alter a Script Monitor?
The ASM API provides a rule_mod command (https://api.cloudmonitor.ca.com/1.6/rule_mod?doc.) which allows a user to modify a monitor’s configuration without signing into the ASM UI. While most of the fields listed in the API function are independent of monitor, the Parameters and Options fields for this call function differently depending on the monitor type being modified by the call.
This KB will specifically discuss the two parameters for Script monitors.
The parameters field is a text field that allows a user to specify additional parameters as part of a monitor run. For Script monitors, this field corresponds to “Script Parameters” in the ASM UI. This field allows a user to pass additional parameters (typically variables) to the JMeter script. Specific variables that can be used are discussed in both ASM and Jmeter documentation in the following locations:
The Options Field allows a user to specify monitor specific options as list in the UI. For Script monitors, these options are “Encryption” and “Ignore Http Errors”. To specify these in the options of the API, the following variables are used separated by the ‘&’ character:
Parameter examples below:
UI Field API variable name API acceptable values
Encryption sec tls (for TLSv1.x), tlsv1.0, tlsv1.1, tlsv1.2, sslv3, and leave blank for negotiate
Ignore Http Errors assertonly 0 to report HTTP Errors and 1 to disable HTTP Errors
For example, running rule_mod with the following options…
…will result in the following monitor configuration:
<Please see attached file for image>
Release: APMCMB99000-8.3-App Synthetic Monitor-Basic Option