AddMonitor APIs - Cloud Apps


This section explains how to use the AddMonitor API to add monitors of the category type Cloud Apps. The following monitors are supported:

Amazon

Syntax

For Applications Manager versions till 15170:

http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=[TYPE]&accessKey=[ACCESSKEY]&SecretAccessKey=[SECRETACCESSKEY]&displayname=[DISPLAYNAME]&AccountType=[ACCOUNTTYPE]&AmazonServices=[SERVICES]

For Applications Manager versions 15180 onwards:

http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=Amazon&accessKey=[ACCESSKEY]&SecretAccessKey=[SECRETACCESSKEY]&displayname=[DISPLAYNAME]&AccountType=[ACCOUNTTYPE]&AmazonServices=[SERVICES]&GlobalRegions=[GLOBALREGIONS/False] &ChinaRegions=[CHINAREGIONS/False]&AWSGovCloudRegions=[GOVCLOUDREGIONS/False]&AdvancedSettings=[True/False]&discoverchild=[yes/no/unmanage]&DeletedResourceAction=[Alert/Stop/Unmanage/Delete]&StopDiscovery=[True/False]&AWSServicesToStopDiscovery=[SERVICES]&NameFilterRegex=[.*[a-zA-Z0-9-_.].*]

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 Amazon
AmazonServices The Amazon Services that you want to monitor. Possible values are:
  • EC2 (for Elastic Compute Cloud)
  • RDS (for Relational Database Services)
  • S3 (for S3 Buckets)
  • SNS (for Simple Notification Services)
  • DYNAMODB (for DynamoDB)
  • ALB (for Application Load Balancer)
  • NLB (for Network Load Balancer)
  • SQS (for Simple Queue Service)
  • LAMBDA (for Lambda functions)
  • BEANSTALK (for Elastic Beanstalk environments)
  • ECS (for Elastic Container Service clusters)
  • EKS (for Elastic Kubernetes Service)
  • DYNAMODB,EC2,RDS,S3,SNS,ALB,NLB,SQS,LAMBDA,BEANSTALK,ECS,EKS (for multiple services)
accessKey The access Key ID of the AWS account with API access.

Note: Click here to know more about access keys.

SecretAccessKey The secret access key of the accessKey for the AWS account.
AccountType The account type. Possible values are
  • AwsGlobal
  • AwsChina
  • AwsGovCloud
GlobalRegions* List of global regions that you can choose from when AwsGlobal AccountType is chosen. Possible values are:
All-Regions, us-east-1, us-east-2, us-west-1, us-west-2, ca-central-1, eu-west-1, eu-west-2, eu-west-3, eu-central-1, eu-north-1, ap-south-1, ap-northeast-1, ap-northeast-2, ap-southeast-1, ap-southeast2-2, sa-east-1, ap-east-1, ap-northeast-3, me-south-1, af-south-1, eu-south-1 or False.

Note: Specify the value All-Regions only if you want to monitor from all the above-mentioned regions. Do not enter other region values when All-Regions is specified.

ChinaRegions* List of China regions that you can choose from when AwsChina AccountType is chosen. Possible values are:
cn-northwest-1, cn-north-1 or False.
AWSGovCloudRegions* List of US GovCloud regions that you can choose from when AwsGovCloud AccountType is chosen. Possible values are:
us-gov-west-1, us-gov-east-1 or False.
discoverchild* Enables configuration options for discovery of child monitors. Possible values are yes, no, and unmanage.
AdvancedSettings* Enables advanced settings, when checked. Possible values are either True or False.
DeletedResourceAction* Actions to be performed on the resources deleted in Amazon console. If this parameter is not used, by default it is 'Alert'. Possible values are Alert/Stop/Unmanage/Delete.
StopDiscovery* Prevents discovery of resources under chosen service. Possible values are either True or False.
AWSServicesToStopDiscovery* Services for which further discovery of resources must be prevented. Available services are ALB, BEANSTALK, DynamoDB, EC2, ECS, LAMBDA, NLB, RDS, S3, SNS, and SQS. If this option is not used, then the value should be False.
NameFilterRegex* Regex to filter EC2 instances and adds the instances that match the regex alone.

Note: Regex may contain alphanumeric characters, hyphen(-), underscore(_), and period(.) symbols. To ignore characters, specify .* at the beginning/end/middle one or more times.

Note: Parameters with * have been added from Applications Manager version 15180 onwards.

Sample Request

For Applications Manager versions till 15170:

http://localhost:9090/AppManager/xml/AddMonitor?apikey=897cc23e5ca9b0f9a0c3838343517734&accessKey=ACCESSKEYACCESSKEYAC&type=Amazon&SecretAccessKey=SECRETACCESSKEYSECRETACCESSKEYSECRETACCE&displayname=test&AccountType=AwsGlobal&AmazonServices=DYNAMODB,EC2,RDS,S3,SNS,ALB,NLB,SQS,LAMBDA,BEANSTALK,ECS,EKS

For Applications Manager versions 15180 onwards:

http://localhost:9090/AppManager/xml/AddMonitor?apikey=23kjk34k34khkhkh34l5j3&type=Amazon&accessKey=ACCESSKEYACCESSKEYAC&SecretAccessKey=SECRETACCESSKEYSECRETACCESSKEYSECRETACCE&displayname=Amazon&AccountType=AwsGlobal&AmazonServices=EC2,RDS,S3,SNS,ALB,NLB,SQS,LAMBDA,BEANSTALK,ECS,EKS&GlobalRegions=us-east-1,us-west-2&AdvancedSettings=true&discoverchild=unmanage&DeletedResourceAction=[Alert/Stop/Unmanage/Delete]&StopDiscovery=True&AWSServicesToStopDiscovery=DYNAMODB&NameFilterRegex=[.*[a-zA-Z0-9-_.].*]

Windows Azure (deprecated)

Syntax

http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=WindowsAzure&displayname=[displayName]&SubscriptionID=[SubscriptionID]&AccountName=[AccountName]&AccountKey=[AccountKey]&Timeout=[Timeout]

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 WindowsAzure
SubscriptionID Enter your Windows Azure subscription ID.

Note: Subscription ID can be obtained by signing into windows.azure.com using your windows live id. Then click Hosted Service and navigate to Storage & CDN, then to Storage Accounts.

AccountName Enter the Account Name of your Windows Azure Storage account.
AccountKey Enter the Account key of your Windows Azure Storage account.
Timeout Specify a Timeout interval in seconds.

Sample Request

http://prod-server2:9098/AppManager/xml/AddMonitor?apikey=24uk5g34kuj5vh45kug4k25ug3&type=WindowsAzure&displayname=azure&SubscriptionID=qwerty785213&AccountName=54321&AccountKey=qwerty&Timeout=30

OpenStack

Syntax

http://[HOST]:[PORT]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=OpenStack&displayname=[DISPLAY_NAME]&baseAuthURL=[IDENTITY_URL]&tenantName=[PROJECT_NAME]&username=[USENAME]&password=[PASSWORD]&isProxyNeeded=[true/false]&isProjectScopedToken=[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 Applications Manager API key (To get the API Key, go to Applications Manager → Admin → REST API)
displayname The display name of the OpenStack monitor
type The type of the monitor you want to add. For OpenStack, it should be "OpenStack"
baseAuthURL The Base Authentication URL for OpenStack. Eg: http://controller:5000
tenantName The Project Name associated with User of OpenStack account.
username The Username of OpenStack account.
password The Password of OpenStack account.
isProxyNeeded Specifies if a proxy is required for monitoring. Possible values are true/false.
isProjectScopedToken Specifies if the authorization scope is set to Tenant/Project. Possible values are True/False.

Sample Request

http://prod-server2:9098/AppManager/xml/AddMonitor?apikey=37e05e898e97f63b66aec9fbd10b9d3c&type=OpenStack&displayname=OpenStack_API&baseAuthURL=http://controller:5000&tenantName=Venus&username=admin&password=Abc@123&isProxyNeeded=false&isProjectScopedToken=False

Error Handling:

4601 - The Authentication URL should not be empty.
4602 - The Tenant Name should not be empty.

Microsoft Azure

To add Microsoft Azure monitor using Mode 1 (AD Application & Service Principal):

Syntax

http://[HOST]:[PORT]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=MicrosoftAzure&displayname=[DISPLAYNAME]&SubscriptionID=[SUBSCRIPTIONID]&AzureServices=[SERVICES]&DiscoveryMode=[DISCOVERYMODE]&ClientID=[CLIENTID]&TenantID=[TENANTID]&AppKey=[APPKEY]

Request Parameters

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

Field Description
type Type of the monitor you want to add. Value should be 'MicrosoftAzure'.
displayname Preferred display name of the monitor.
SubscriptionID Subcription ID of the Azure subscription to be monitored.
AzureServices Azure services to be monitored. The possible values are
  • VirtualMachines
  • StorageAccounts
  • SQLDatabases
  • ServiceBus
Provide the services as comma-separated values.
DiscoveryMode Mode of resource discovery. The value should be 'AzureSPApp'.
ClientID Client ID of the AD Application created in Azure portal.
TenantID Tenant ID (Directory ID) of Azure Active directory.
AppKey Password of the AD Application created in Azure portal.

Sample Request

http://apm-k12r2-2:9900/AppManager/xml/AddMonitor?apikey=er8s9g98ds6gdfg77d85g87sd68&type=MicrosoftAzure&displayname=AzureRestAPI&SubscriptionID=12aaaaaa-bbbb-cccc-dddd-000a111b111c&AzureServices=VirtualMachines,StorageAccounts,SQLDatabases,ServiceBus&DiscoveryMode=AzureSPApp&ClientID=12aaaaaa-bbbb-cccc-dddd-000a111b111c&TenantID=12aaaaaa-bbbb-cccc-dddd-000a111b111c&AppKey=1234abcde456/abCDeDFdfknsefLJSDkdnl

To add Microsoft Azure monitor using Mode 2 (Azure Organizational Account):

Syntax

http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=MicrosoftAzure&displayname=[DISPLAYNAME]&SubscriptionID=[SUBSCRIPTIONID]&AzureServices=[SERVICES]&DiscoveryMode=[DISCOVERYMODE]&AzureOrgUserName=[USEREMAILOFORGANIZATIONALACCOUNT]&AzureOrgPassword=[PASSWORDOFORGANIZATIONALACCOUNT]

Request Parameters

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

Field Description
type Type of the monitor you want to add. Value should be 'MicrosoftAzure'.
displayname Preferred display name of the monitor.
SubscriptionID Subcription ID of the Azure subscription to be monitored.
AzureServices Azure services to be monitored. The possible values are
  • VirtualMachines
  • StorageAccounts
  • SQLDatabases
  • ServiceBus
Provide the services as comma-separated values.
DiscoveryMode Mode of resource discovery. The value should be 'AzureOrgAccount'
AzureOrgUserName Organizational account created in Azure portal.
AzureOrgPassword Password of the organizational account.

Sample Request

http://apm-k12r2-2:9900/AppManager/xml/AddMonitor?apikey=dfs758s6d5f876df986sdf97sdf785&type=MicrosoftAzure&displayname=AzureRestAPI&SubscriptionID=12aaaaaa-bbbb-cccc-dddd-000a111b111c&AzureServices=VirtualMachines,StorageAccounts,SQLDatabases,ServiceBus&DiscoveryMode=AzureOrgAccount&AzureOrgUserName=apmou@apmoutlook.onmicrosoft.com&AzureOrgPassword=Abc123

To add Microsoft Azure monitor using Mode 3 (OAuth Mode):

Syntax

http://[HOST]:[PORT]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=MicrosoftAzure&displayname=[DISPLAYNAME]&SubscriptionID=[SUBSCRIPTIONID]&AzureServices=[SERVICES]&DiscoveryMode=[DISCOVERYMODE]&OAuthVal=[OAUTHVALUE]

Request Parameters

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

Field Description
type Type of the monitor you want to add. Value should be 'MicrosoftAzure'.
displayname Preferred display name of the monitor.
SubscriptionID Subcription ID of the Azure subscription to be monitored.
AzureServices Azure services to be monitored. The possible values are
  • VirtualMachines
  • StorageAccounts
  • SQLDatabases
  • ServiceBus
Provide the services as comma-separated values.
DiscoveryMode Mode of resource discovery. The value should be 'AzureOAuth'.
OAuthVal Indicates the OAuth value.

Sample Request

http://prod-server:9900/AppManager/xml/AddMonitor?apikey=lk54h45k6glk34jkg5kj346fgk34h5j534&type=MicrosoftAzure&displayname=AzureOAuthRestAPI&SubscriptionID=12aaaaaa-bbbb-cccc-dddd-000a111b111c&AzureServices=VirtualMachines,StorageAccounts,SQLDatabases,ServiceBus&DiscoveryMode=AzureOAuth&OAuthVal=10000000

Oracle Cloud Infrastructure

Syntax

http://[HOST]:[PORT]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=OracleCloud&displayname=[DISPLAY_NAME]&TenancyOCID=[Tenancy_OCID]&UserID=[User_OCID]&OracleServices=[Oracle_Services]&PEMFilePath=[PEM_File_Path]&Fingerprint=[Finger_print]&RegionsToMonitor=[Regions_To_Monitor]&stopdiscovery=[Stop_Discovery_Option]&ActionOnTerminatedResources=[Action]&advancedsettings=[Advanced_Settings]&servicesToNotDiscover=[Services_To_Not_Discover]

Request Parameters

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

Field Description
displayname Name of the Oracle Cloud monitor
type Type of monitor to be added. Value should be OracleCloud.
TenancyOCID Oracle Cloud Identifier for the tenancy.
UserID Oracle Cloud Identifier for the user.
OracleServices Type of service to be monitored. Available services are Compute, Database, and Storage.
PEMFilePath File path in which the file contains the private key.
Fingerprint Obtained by uploading public key to the Oracle Cloud console.
Regions to monitor List of regions to be monitored.
stopdiscovery Prevents discovery of resources under a particular service.
ActionOnTerminatedResources Actions to be performed on terminated resources.
advancedsettings Enables additional settings, when checked.
servicesToNotDiscover Services for which discovery should not be enabled. Available services are Compute, Database, and Storage.

Sample Request

http://localhost:9600/AppManager/xml/AddMonitor? apikey=1d9d98ce3273afd265400c3ef7b78678&type=OracleCloud&displayname=oraclecloudrest&TenancyOCID=ocid1.tenancy.oc1..aaaaaaaagltesttesttesttest26h5ksdo6fgbvbcmj377dnoka73rq&UserID=ocid1.user.oc1..aaaaaaaabz2skyed3j3kwxsgqtesttesttesttestoczno4ew2ov7rr57wnuza&OracleServices=Compute,Storage,Database&PEMFilePath=C:\Users\karthik-8095\.oci\oci_api_key.pem&Fingerprint=ea;e1:f8:68:a1:7f:ds:df:as:sd:d7:62:9e:53:f0:1f&RegionsToMonitor=eu-frankfurt-1,us-ashburn-1&stopdiscovery=False&ActionOnTerminatedResources=Unmanage&advancedsettings=False&servicesToNotDiscover=Compute

Google Cloud Platform

Syntax

http://[HOST]:[PORT]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=GoogleCloudPlatform&displayname=[DISPLAY_NAME]&GCPServices=[GCP_Services]&ProjectID=[Project_ID]&provider=[OAuth_Provider_Name]&advancedsettings=[True/False]&deletedresourceaction=[Alert/Stop/Unmanage/Delete]&stopdiscovery=[True/False]&servicestostopdiscovery=[False/GCP_Services]

Request Parameters

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

Field Description
displayname Display name of the monitor.
type Type of monitor to be added. The value should be GoogleCloudPlatform.
GCPServices Google Cloud Services like Compute, Storage, Filestore, etc. Available services are ComputeEngine, CloudStorage, CloudFilestore and KubernetesEngine.
ProjectID Unique ID of the project to be monitored.
provider Name of the OAuth Provider created in AppManager.
advancedsettings Enables additional settings. Possible values are either True or False
deletedresourceaction Actions to be performed on the resources deleted in GCP console. If this parameter is not used, by default it is 'Alert'. Possible values - Alert/Stop/Unmanage/Delete
stopdiscovery Prevents discovery of resources under chosen service. Possible values are either True or False
servicestostopdiscovery Services for which resources should not be discovered. Available services are ComputeEngine, CloudStorage, CloudFilestore and KubernetesEngine. If this option is not used, then the value should be False.

Sample Request

http://localhost:9591/AppManager/xml/AddMonitor?apikey=0da3949052acdcda12fa00200ae1170e&type=GoogleCloudPlatform&displayname=GCP&GCPServices=ComputeEngine,CloudStorage,CloudFilestore,KubernetesEngine&ProjectID=black-agility-235006&provider=gcp&advancedsettings=True&deletedresourceaction=Stop&stopdiscovery=False&servicestostopdiscovery=False

Microsoft 365

Syntax

http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=[TYPE]&Office365TenantName=[OFFICE365TENANTNAME]&Office365Useremail=[ADMINEMAIL]&Office365Password=[PASSWORD]&Office365Services=[OFFICE365SERVICES]&displayname=[DISPLAYNAME]&Timeout=[TIMEOUT]&ServiceHealth=[SERVICEHEALTH]&TenantID=[TENANTID]&ClientID=[CLIENTID]&ClientSecret=[CLIENTSECRET]

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 Office365.
Office365TenantName The tenant name used by the Microsoft 365 subscription.
Office365Useremail The Microsoft 365 user email with admin privileges.
Office365Password The Microsoft 365 user account password.
Office365Services Required services to monitor. Supported services are "ExchangeOnline,SharepointOnline,SkypeForBusinessOnline,MicrosoftTeams"
Timeout The Timeout interval in seconds.
ServiceHealth Option to enable Service Health monitoring. (True or False)
TenantID Tenant ID of the tenant in which the application is created.
ClientID Client ID/Application ID of the application created
ClientSecret Client Secret created in the application created.

Sample Request

http://prod-server2:9098/AppManager/xml/AddMonitor?apikey=4c362569ccc528be78fafdcc2317bc5c&type=Office365&Office365TenantName=appmanager&Office365Useremail=apm@appmanager.onmicrcosoft.com&Office365Password=test123&Office365Services=ExchangeOnline,SharepointOnline,SkypeForBusinessOnline,MicrosoftTeams&displayname=officemonitor&Timeout=600&ServiceHealth=True&TenantID=lasnfklasf&ClientID=aknlasldald&ClientSecret=jkansdnasjndlasn