Java Runtime - AddMonitor API


Here is how you can use the AddMonitor API to add a Java Runtime monitor:

Syntax

https://[HOST]:[PORT]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=[TYPE]&displayname=[DISPLAYNAME]&host=[HOST]&port=[PORT]&jndiurl=[JNDIURL]&jmxEnabled=on&jmxurl=[URL]&authEnabled=on&username=[Username]&password=[Password]

Supported HTTP methods: POST

Allowed roles: Administrator

Request Parameters

The parameters involved in the API request are described below. Also, refer the list of common request parameters.

Field Description
type The type of the monitor you want to add. Value should be Java Runtime.
host The name of the host where the monitor is running.
port The port number where the Java Runtime monitor is running.
jndiurl The JNDI name. The default value is jmxrmi.
jmxEnabled To enable customized JMX URL, the value of jmxEnabled should be on (jmxEnabled=on). Then, give the JMX URL as value for the parameter jmxurl (jmxurl=[URL])
jmxurl The customized JMX URL. This parameter can be used only if the value of jmxEnabled is on.
authEnabled To enable authentication, the value of authEnabled should be on. If the value is on, also specify the username and password used for authentication.
username, password If the value for authEnabled is on, also specify the username and password used for authentication. (username=[Username]&password=[Password])

Sample Request

https://apm-prod-server:8443/AppManager/xml/AddMonitor?apikey=aaaaaabbbbbbccccccddddddeeeeee&type=Java Runtime&displayname=apmjava&host=myesuraj&port=1099&jndiurl=/jmxrmi&jmxEnabled=on&jmxurl=[URL]&authEnabled=on&username=admin&password=appman