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

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

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
accessKey The Access Key Id of the AWS for accessing the AWS through the API.
SecretAccessKey The secret access key of the AWS.
AccountType The account type. Possible Values are
  • AwsGlobal
  • AwsChina

Sample Request

http://localhost:9090/AppManager/xml/AddMonitor?apikey=897cc23e5ca9b0f9a0c3838343517734&accessKey=AKIAIPQGJCIKOQK6KRGQ&type=Amazon&SecretAccessKey=szBeG8HdVwce/SUnfUM4o86WhSESF90bb4eJsz6o&displayname=test&AccountType=AwsGlobal

Windows Azure

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=f664b86118740af22c6ac7af7f86c06f&type=WindowsAzure&displayname=azure&SubscriptionID=deepak-1470&AccountName=1888&AccountKey=deepak&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]&isProxyRequired=[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 AppManager > 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 Project Name associated with User of OpenStack account
username Username of OpenStack account
password Password of OpenStack account
IsProxyRequired 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&isProxyRequired=false

Error Handling:

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

Amazon SNS

Syntax

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

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.
accesskey The Amazon Access Key Id of the AWS for accessing the AWS.
secretaccesskey The Secret Access Key of the AWS. The secret key should be 40 alpha-numeric characters long.
displayname The display name of the Amazon server monitor.

Microsoft Azure SQL Database

To add Microsoft Azure monitor using Mode 1 (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
Provide the values as comma separated
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=e820f56394ac554ec4efebc3fa9dd4f0&type=MicrosoftAzure&displayname=AzureRestAPI&SubscriptionID=78da1f5f-c756-481b-aeff-0471c6fbb262&AzureServices=VirtualMachines,StorageAccounts,SQLDatabases&DiscoveryMode=AzureOrgAccount&AzureOrgUserName=apmou@apmoutlook.onmicrosoft.com&AzureOrgPassword=Abc123

To add Microsoft Azure monitor using Mode 2 (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
Provide the values as comma separated
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=e820f56394ac554ec4efebc3fa9dd4f0&type=MicrosoftAzure&displayname=AzureRestAPI&SubscriptionID=790a1f5f-c756-481b-ae8d-0471c6fbb678&AzureServices=VirtualMachines,StorageAccounts,SQLDatabases&DiscoveryMode=AzureSPApp&ClientID=66e1857a-aea5-466a-9007-b0c6cf23e866&TenantID=322392c9-4095-4ad7-9571-b131b85cf2b0&AppKey=856uwpSpCF6/PXTdqYREo8TJt3NrcxOLChBIO2eHHJo=

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 Services like Compute, Storage, Filestore, etc. Available services are ComputeEngine, CloudStorage, and CloudFilestore.
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, and CloudFilestore. 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&ProjectID=black-agility-235006&provider=gcp&advancedsettings=True&deletedresourceaction=Stop&stopdiscovery=False&servicestostopdiscovery=False

Office 365

Syntax

http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=[TYPE]&Office365TenantName=[OFFICE365TENANTNAME]&Office365Useremail=[ADMINEMAIL]&Office365Password=[PASSWORD]&Office365Services=[OFFICE365SERVICES]&displayname=[DISPLAYNAME]&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.
Office365TenantName The tenant name used by the Office 365 subscription.
Office365Useremail The Office 365 user email with admin privileges.
Office365Password The Office 365 user account password.
Office365Services Required services to monitor. Supported services are "ExchangeOnline,SharepointOnline,SkypeForBusinessOnline"
Timeout The Timeout interval in seconds.

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&displayname=officemonitor&Timeout=600