AddMonitor APIs - Web Server/Services


This section explains how to use the AddMonitor API to add monitors of the category type 'Web Server/Services'. The following monitors are supported:

Apache Server

Syntax

http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=[TYPE]&displayname=[DISPLAYNAME] &host=[HOST]&port=[PORT]&serverstatusurl=[SERVERSTATUSURL]&apacheurl=[APACHEURL]

Request Parameters

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

Field Description
type The type of the monitor you want to add. Value should be Apache Server.
host The name of the host where the Apache server is running.
port The port number where the Apache server is running.
apacheauth Denotes whether the Apache server is authenticated. Possible values are true and false.
apacheUserName The user name of the Apache server. This is required only if apacheauth value is true.
apachepassword The password of the Apache server. This is required only if apacheauth value is true.
sslenabled Indicates whether SSL is enabled. The value should be either on or off
serverstatusurl Indicates whether the Apache Server Status url can be modified. The value should be either true or false.
apacheurl The Apache server status url. Example: http://<host-name:portNumber>server-status?auto

Sample Request

http://prod-server5:9090/AppManager/xml/AddMonitor?apikey=256d041620d0aee9901558b44706dc84&type=Apache Server&displayname=apmapache&host=shakthiprian&port=8080&serverstatusurl=true&apacheurl=ddss

Apache Solr

Syntax

  • http://[Host]:[Port]http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=[TYPE]&displayname=[DISPLAYNAME]&host=[HOST]&port=[PORT]&SSL=[TRUE/FALSE]
  • http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=[TYPE]&displayname=[DISPLAYNAME]&host=[HOST]&port=[PORT]&SSL=[TRUE/FALSE]&UserName=[USERNAME]&Password=[PASSWORD]

Request Parameters

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

Field Description
type The type of the database you want to add. Value should be Apache Solr
display name Display name of the Apache Solr monitor
host The name of the host in which Apache Solr server is running.
port The port number where Apache Solr server is running.
SSL Denotes if SSL is enabled or not. Value should be either true or false

Sample Request

  • http://prod-server8:9091/AppManager/xml/AddMonitor?apikey=90c166a4646e29315a57eca1d6b88858&type=ApacheSolr&displayname=SolrInstance&host=app-xp2&port=8993&ssl=false
  • http://localhost:9080/AppManager/xml/AddMonitor?apikey=a5f75b0fd164d85bb6730b0c78a5af86&type=ApacheSolr&displayname=SolrInstance&host=localhost&port=7574&ssl=false&UserName=solr&Password=SolrRocks

IIS Server

Syntax:

http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=[TYPE]&displayname=[DISPLAYNAME]&host=[HOST]&port=[PORT]sslenable=[true/false]

Request Parameters:

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

Field Description
type The type of the monitor you want to add. Value should be IIS Server.
host The name of the host where the IIS is running.
port The port number where the IIS is running.
sslenabled Specifies if SSL is enabled in the IIS Server. Possible values are True/False.

Sample Request:

http://prod-server8:9091/AppManager/xml/AddMonitor?apikey=90c166a4646e29315a57eca1d6b88858&type=IIS Server&displayname=apmiis&host=app-xp2&port=80sslenable=true

Nginx Server

Syntax:

http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=[TYPE]&displayname=[DISPALYNAME]&host=[HOST]&port=[PORT]&sslenable=[TRUE/FALSE]&nginxauth=[TRUE/FALSE]&username=[USERNAME]&password=[PASSWORD]&nginxstatusurl=[NGNIX STATUS URL]

Request Parameters:

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

Field Description
type The type of the monitor you want to add. Value should be Nginx.
host The name of the host where the Nginx server is running.
port The port number where the Nginx server is running.
nginxauth Denotes whether the Nginx server is authenticated. Possible values are true and false.
username The user name of the Nginx server. This is required only if nginxauth value is true.
password The password of the Nginx server. This is required only if nginxauth value is true.
nginxstatusurl Nginx Server Status url. The value should be either true or false. Please do insert /(slash) in prefix for nginxstatusurl as the example given below.

Sample Request:

http://operation-server9:9091/AppManager/xml/AddMonitor?apikey=a7867d64c831a50f8eb5be8bcfebab34&type=Nginx&displayname=apmnginx&host=deepak&port=8080&sslenable=true&nginxauth=true&username=deepak&password=deepak&nginxstatusurl=/nginx_status

PHP

Syntax:

http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=[TYPE]&displayname=[DISPLAYNAME]&host=[HOST]&port=[PORT]&serverpath=[SERVERPATH]

Request Parameters:

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

Field Description
type The type of the monitor you want to add. Value should be PHP.
host The name of the host where the PHP is running.
port The port number where the PHP is running.
serverpath The path to be used for connection. The default value is /phpstats.php

Sample Request:

http://operation-server9:9091/AppManager/xml/AddMonitor?apikey=90c166a4646e29315a57eca1d6b88858&type=PHP&displayname=apmiis&host=myesuraj&port=80&serverpath=/phpstats.php

Real Browser Monitor (RBM)

Syntax:

http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=[TYPE]
&displayname=[DISPLAYNAME]&rbmagentID=[RBMAGENTID]&timeout=[TIMEOUT]&scriptname=[SCRIPTNAME]

Request Parameters:

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

Field Description
type The type of the monitor you want to add. Value should be RBM.
rbmagentID The ID of the RBM agent.
timeout The timeout value in seconds.
scriptname The name of the web script.

Sample Request:

http://prod-server8:9091/AppManager/xml/AddMonitor?apikey=90c166a4646e29315a57eca1d6b88858
&type=RBM&displayname=RBM_test&rbmagentID=10000000&timeout=15&scriptname=newS

URL Monitor

Syntax:

http://[host]:[port]/AppManager/xml/AddMonitor?apikey=[apikey]&type=[type]&displayname=[displayname]&timeout=[timeout]&url=[httpurl]&urlMethod=[method]&httpCondition=[condition]&httpValue=[responseCode]&checkForContent=[matchContent]&pollInterval=[pollInterval]&regex=true&casesensitive=true

Request Parameters

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

Field Description
type The type of the monitor you want to add. Value should be UrlMonitor.
displayname Name of the monitor to be created.
timeout The timeout value in seconds.
url The HTTP / HTTPS URL address that you want to monitor.
urlMethod This method specifies how to send form-data. Value should be G / P for Get and Post respectively.
httpCondition Error Response Code condition. Value should be LT / GT / EQ / NE / LE / GE (default GT).
httpValue The response code number based on which the monitor will be shown as up or down (default 200).
requestParams Specify the request parameters(eg., username, password).
checkForContent The keyword for content match.
verifyError The keyword for error verification.
errorIfMatch Enter a keyword which when matches with the content in the URL must be notified of error. Note: The search is case sensitive. Multiple keywords should be put within quotes. Otherwise, it will be treated as 'Any' one of the multiple keywords
userName Provide the User name if the URL requires Form-based authentication.
password Provide password, if the URL requires Form-based authentication.
payload Specify the payload type for POST form submission method. The types are FORM, Text, XML, JSON.
regex Specify if the content for content check contains a regular expression. The value of this field should be 'true', if you want to enable it.
casesensitive Specify if you want to do a case sensitive keyword search. The value of this field should be 'true', if you want to enable it.
userAgent Set the User Agent for monitoring the URL. (Values can be added like Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0))
sslVersion Specify the version of SSL configured for the URL. The values can one of the following values: SSLv3, TLSv1, TLSv1.1 or TLSv1.2. Default value will be Auto. (NON-MANDATORY PARAMETER)

Sample Request:

http://prod-server8:9090/AppManager/xml/AddMonitor?apikey=90c166a4646e29315a57eca1d6b88858&type=UrlMonitor&displayname=appmanager&timeout=60&url=http://appmanager.com&urlMethod=G&httpCondition=EQ&httpValue=200&requestParams=username=appAdmin%0Apassword=adminPass%0Arole=admin&checkForContent=Applications&verifyError=Exception&errorIfMatch=quit&regex=true&casesensitive=true

Web Server

Syntax:

http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=[TYPE]&displayname=[DISPLAYNAME]
&host=[HOST]&port=[PORT]

Request Parameters:

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

Field Description
type The type of the monitor you want to add. Value should be Web Server.
host The name of the host where the web server is running.
port The port number where the web server is running.

Sample Request:

http://prod-server8:9091/AppManager/xml/AddMonitor?apikey=90c166a4646e29315a57eca1d6b88858&type=Web Server&displayname=apmweb&host=app-xp2&port=80

SSL Certificate Monitor

Syntax:

http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=SSLCertificateMonitor&displayname=[displayName]&domain=[domain]&port=[port]&monitorLeafCertOnly=[true/false]

Request Parameters:

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

Field Description
type The type of the monitor you want to add. Value should be SSLCertificateMonitor.
host The name of the host where the SSL Certificate Monitor is running.
port The port number where the SSL Certificate Monitor is running.
domain Enter the Domain name for which SSL certificate is required to be monitored.
isProxyNeeded Use isProxyNeeded if the server is connected through proxy. Possible values are:
  • isProxyNeeded=true
  • isProxyNeeded=false
ignoreHostNameError Specify if you want to Ignore SSL Certificate name mismatch error.Possible Values are:
  • ignoreHostNameError=true
  • ignoreHostNameError=false
monitorLeafCertOnly Option to ignore invalid root and intermediate certificate. If the value is not passed, then it is assumed to be true. (true or false)
timeout Enter the Timeout value in seconds.

Sample Request:

http://prod-server8:9091/AppManager/xml/AddMonitor?apikey=bc76b1abb8e9b209824a39d84578a194&type=SSLCertificateMonitor&displayname=SSLCertificateMonitor&domain=www.zoho.com&port=443&timeout=60&monitorLeafCertOnly=false

Elasticsearch Monitor

Syntax

http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=[TYPE] &displayname=[DISPLAYNAME]&host=[HOST]&port=[PORT]&ssl=[true/false]&DiscoverAllNodes=[Yes/No]

Request Parameters

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

Field Description
apikey The key generated from the Generate API Key option in the 'Admin' tab.
type The type of the monitor you want to add. Value should be ElasticSearchCluster.
displayname The display name of the Elasticsearch monitor.
host The name of the host in which Elasticsearch server is running.
port The port number where Elasticsearch server is running.
ssl Specfies if SSL is enabled or not. Value can be either true or false.
DiscoverAllNodes Specifies if you want to discover nodes in Elasticsearch cluster. (Yes/No)

Sample Request

http://localhost:9097/AppManager/xml/AddMonitor?apikey=7c18de184b2c8b1caa8d65790b382f32&type=ElasticSearchCluster&displayname=localhost&host=localhost&port=9200&ssl=false

To discover nodes:

http://localhost:9097/AppManager/xml/AddMonitor?apikey=7c18de184b2c8b1caa8d65790b382f32& DiscoverAllNodes=Yes&type=ElasticSearchCluster&host=104.49.30.30&port=9200&ssl=false&displayname=test

HAProxy Monitor

Syntax:

http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=HAProxy&displayname=[DISPLAYNAME]&host=[HOST]&port=[PORT]&SSL=[TRUE/FALSE]

Request Parameters:

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

Field Description
apikey The key generated from the Generate API Key option in the 'Admin' tab.
type The type of the monitor you want to add. Value should be HAProxy.
displayname The display name of the HAProxy monitor.
host The name of the host in which HAProxy server is running.
port The port number where HAProxy server is running.
ssl Specfies if SSL is enabled or not. Value can be either true or false.

Web Services

Syntax:

http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=Web Service&displayname=[DISPLAYNAME]&WSDLUrl=[WSDLURL]&endPointUrl=[ENDPOINTURL]&resFulWebservice=[true/false]&haid=[Monitor GroupId]&username=[USERNAME]&password=[PASSWORD]&customHeaders[Custom Header]&authToken[Authentication Token]

Request Parameter:

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

Field Description
WSDLUrl The WSDL URL required to add the monitor.
endPointUrl The end-point URL required to add the monitor.
resFulWebservice Set this value to true to enable REST-compliant Web services.
haid The Monitor Group ID.
username The username required to invoke the webservice.
password The password required to invoke the webservice.
customHeaders You can use our pre-defined headers or create your own custom headers to invoke operations.
authToken Provide the Authentication Token, if required.

Sample Request:

http://prod-server3:9090/AppManager/xml/AddMonitor?apikey=d0588c8b72c6e76713ac55c66e8d&type=Web Service&displayname=apmservice&WSDLUrl=http://www.dataaccess.com/webservicesserver/numberconversion.wso?WSDL&endPointUrl=http://www.dataaccess.com/webservicesserver/numberconversion.wso&timeout=30&resFulWebservice=true&haid=10001&username=user&password=pass123&customHeaders=test&authToken=authtoken

Nginx Plus

Syntax:

http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=NginxPlus&displayname=[Display Name]&host=[Host Name]&port=[Port No]&ssl=[true/false]&UserName=[User Name](optional)&Password=[password](optional)

Request Parameter:

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

Field Description
type The type of the Service you want to add. Value should be NginxPlus.
host The name of the host in which Nginx Plus is running.
ssl Whether SSL is enabled. Value should be true or false.
port The port number where Nginx Plus is running.
username The name of the user who has permission to access the Nginx Plus.
password The password of the user who has permission to access the Nginx Plus.

Sample Request:

http://localhost:9092/AppManager/xml/AddMonitor?apikey=961280ec3cd4c76b39c1c9fbd871c5b0&type=NginxPlus&displayname=FromAPI&host=demo.nginx.com&port=443&ssl=true&UserName=test&Password=test

ME ServiceDesk Plus

Syntax

http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=[TYPE]&displayname=[DISPLAYNAME]&hostname=[HOST]&port=[PORT]&ssl=[TRUE/FALSE]&restapiKey=[RestAPIKey]&MonitorPGSQLDB=[MonitorPGSQLDB]&dbtype=[DBType]&DBHost=[DatabaseHost]&DBName=[DataBaseName]&DBPort=[DataBasePort]&DBUserName=[DataBaseUserName]&DBPassword=[DBPassword]&namedInstance=[IsNameInstance]&instance=[instance]

Request Parameters

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

Field Description
Hostname The name or Ip address of the host where Servicedesk-Plus / SDP MSP is running.
Port The Running Port of Servicedesk-Plus / SDP MSP.
SSL If Enabled  Specifies if SSL enabled for Servicedesk-Plus / SDP MSP.
restapiKey To generate a new API key in ServiceDesk Plus, follow the steps given below:
  • Log in to ServiceDesk Plus.
  • Go to the Personalize tab available in the top pane.
  • Click API key Generation.You can either select the Never Expire option or specify the date of expiry:
  • If you select the Never Expire option, the key will be used in Applications Manager, until you generate a new key.
  • If you have set a date of expiry, you must manually update the new key in APM after that set time period for data collection to happen.
  • Click Generate.
    • Copy the API Key generated to use it in Applications Manager.
MonitorPGSQLDB Specify if you wish to monitor PGSQL Database with Yes/No. Displaying the respective tab in UI depends on this value. (Case Sensitive)
DBType The Database Type. Values can be pgsql or mssql. (Case Sensitive)
DBName, DBPort, DBUserName and DBPassword PostgresSQL database credentials.
SSLEnabled True if the SSL is enabled.

Sample Request

http://prod-server3:9090/AppManager/xml/AddMonitor?apikey=5b43655d12396a7917e5d5b036ced3aa&type=SDPMonitor&displayname=satya_sdp&hostname=satyavani-0618&port=8081&ssl=false&restapiKey=5B7ADE19-D4D7-4556-9F54-07FAF42D2C29&MonitorPGSQLDB=Yes&dbtype=[DBType]&DBHost=[DatabaseHost]&DBName=[DataBaseName]&DBPort=[DataBasePort]&DBUserName=[DataBaseUserName]&DBPassword=[DBPassword]&namedInstance=[IsNameInstance]&instance=[instance]

ME OpManager

Syntax

http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=OPMMonitor&hostname=[HOST]&port=[PORT]&authEnabled=[true/false]&username=[USERNAME]&password=[PASSWORD]&displayname=[DISPLAYNAME]&JNDIPath=[JNDIPATH]&MonitorPGSQLDB=[Yes/No]&dbtype=[DBType]&DBHost=[DatabaseHost]&DBName=[DataBaseName]&DBPort=[DataBasePort]&DBUserName=[DataBaseUserName]&DBPassword=[DBPassword]&namedInstance=[IsNameInstance]&instance=[instance]&SSLEnabled=[SSLEnabled]

Request Parameters

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

Field Description
Hostname The name or Ip address of the host where ME OPManager is running.
Port The running port of ME OPManager.
authEnabled Specifies if authentication is enabled for ME OPManager.
username and password Credential of the user.
JNDIPath JNDIPATH for installation of OpManager
MonitorPGSQLDB Specify if you wish to monitor PGSQL Database with Yes/No. Displaying the respective tab in UI depends on this value. (Case Sensitive)
DBType The Database Type. Values can be pgsql or mssql. (Case Sensitive)
DBName, DBPort, DBUserName and DBPassword PostgresSQL database credentials.
SSLEnabled True if the SSL is enabled.

Sample Request

http://prod-server3:9090/AppManager/xml/AddMonitor?apikey=38cb51649cf3ac0614c3aab294a7bebd&type=OPMMonitor&hostname=172.21.151.93&port=1998&authEnabled=false&username=&password=&displayname=testOPM&JNDIPath=/jmxrmi&MonitorPGSQLDB=Yes&dbtype=pgsql&DBHost=172.21.151.93&DBPort=13306&DBName=OpManagerDB&DBUserName=postgres&namedInstance=[IsNameInstance]&instance=[instance]&SSLEnabled=false

ME ADManager Plus

Syntax

http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=ADMPMonitor&hostname=[HOST]&port=[PORT]&authEnabled=[AUTHENABLED]&username=[USERNAME]&password=[PASSWORD]&displayname=[DISPLAYNAME]&JNDIPath=[JNDIPATH]&MonitorPGSQLDB=[Yes/No]&dbtype=[DBType]&DBHost=[DatabaseHost]&DBName=[DataBaseName]&DBPort=[DataBasePort]&DBUserName=[DataBaseUserName]&DBPassword=[DBPassword]&namedInstance=[IsNameInstance]&instance=[instance]&SSLEnabled=[SSLEnabled]

Request Parameters

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

Field  Description
hostname The name or Ip address of the host where ADManager Plus is running.
port The Running Port of ADManager Plus.
authEnabled Specifies if authentication is enabled.
username and password Credential of the user.
displayname The displayname of the ADManager Plus monitor.
JNDIPath The JNDIPATH for installation of ADManager Plus.
MonitorPGSQLDB Specify if you wish to monitor PGSQL Database with Yes/No. Displaying the respective tab in UI depends on this value. (Case Sensitive)
dbtype The Database Type. Values can be pgsql or mssql. (Case Sensitive)
DBName, DBPort, DBUserName and DBPassword PostgresSQL database credentials.
SSLEnabled Specifies if SSL enabled for ADManager Plus.

Sample Request

http://prod-server3:9090/AppManager/xml/AddMonitor?apikey=3be1ffd5109b27613464da89545964ba&type=ADMPMonitor&hostname=localhost&port=1991&authEnabled=false&username=&password=&displayname=test&JNDIPath=/jmxrmi&MonitorPGSQLDB=Yes&dbtype=pgsql&DBHost=satyavani-0618&DBName=DB&DBPort=13306&DBUserName=postgres&DBPassword=postgres&namedInstance=false&SSLEnabled=false

REST API Monitor

Syntax

http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[API Key]&type=RESTAPIMonitor&displayname=[Display Name]&API=[REST API URL]&Timeout=[Timeout Value in Seconds]&Method=[GET/POST/PUT/DELETE]&RespType=[XML]&UserName=[Username]&Password=[Password]

Request Parameters

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

Parameter Description
type The type of the monitor you want to add. Value should be RESTAPIMonitor
displayname The display name of the monitor.
API The API call to be monitored.
Timeout The amount of time spent by APM to establish a connection with the server hosting the API service (in seconds).
Method The Form Submission method used to access the API. (GET/POST/PUT/DELETE)
RespType The type of response to be expected.(Text/XML/JSON).
payLoadType The format in which request data will be sent (applicable only for POST & PUT methods). Value can be FORM, Text, XML or JSON.
payLoad The request data (the format should match the payLoadType specified).
customHeaders Specify the headers to establish a connection with the API server. Use sep to separate the header name and value. For specifying multiple headers, use the separator # (Please encode the request parameters if they are sent via GET).

Sample Request

http://Prod-server7:9010/AppManager/xml/AddMonitor?apikey=8519e4fadfd79d5dc78bce7489bd9319&type=RESTAPIMonitor&displayname=Dummy&API=https://www.google.co.in/&Timeout=10&Method=POST&payLoadType=Text&payLoad=PayloadContent&customHeaders=Accept_sep_application/json; version=2.0#User-Agent_sep_Mozilla/5.0 (Windows NT 6.3;Win64; x64)&UserName=User1&Password=Pass_123