This API allows the user to configure monitors in Applications Manager. The different monitors supported are:
The common parameters involved in the API request are described below:
|apikey *||The key generated from the Generate API Key option in the 'Admin' tab.|
|displayname *||The display name of the monitor.|
|subnet||The subnet where the server is running. The default value is 18.104.22.168|
|pollInterval||The interval at which the server needs to be polled. This variable is optional. If no value is mentioned, the default value of 5 minutes will be taken.|
|groupID (haid)||The id of the monitor group. In Applications Manager, you can find the groupID of a monitor group using the following method:
|resolvedns||The value can be 'True' or 'False'. Do not resolve DNS name when you have multiple system IP addresses configured with single DNS name.|
|credentialID||A unique identifier set by Applications Manager for a credential.|
|label||Assign labels for a resource.|
When adding a new monitor as a Delegated Admin user, the following parameters should be appended in the API URL:
|addToGroup *||Denotes if the monitor should be added to monitor group. Value is either true or false.|
|groupID *||The group ID of the monitor group to which the monitor is to be added.|
When adding a new monitor from an admin server in the Enterprise Edition, the user can select the Managed server of his preference. To do so, the following parameters should be appended in the API URL:
|ManagedServerID *||The new monitor will be added in the Managed Server of which the ID is specified.|
|ManagedServerGroupName *||The new monitor will be added in a Managed Server in the specified Group.|
* If these parameters are not specified, the managed server will be selected based on the load-factor.
HTML encoding will be required for parameters with special characters (like display name or password). For example, if a password contains a special character like &, ", # , & , % or + , it should be replaced with the corresponding string as below while passing the password in the REST API:
For More information about HTML encoding, refer here.
Invoking the Add Monitor API will change the display name for existing monitors.
This example helps you add a Windows server to Applications Manager:
<message>Monitor added successfully.</message>
If the API is not executed correctly, the request will fail and errors will be thrown as shown below:
<message>The Transaction mentioned in the request URL should be yes or no.</message>
Note: Sometimes, API executions could result in error conditions. In case of an error, the error information would be sent in the response body. The response body will have <error> as the child node along with the appropriate error code. To know more about the list of common error conditions, refer here.