URL
POST https://{api-url}/api/v2/tenants/{tenantId}/policies/discovery
Sample URLs
https://{api-url}/api/v2/tenants/client_105261/policies/discovery
https://{api-url}/api/v2/tenants/msp_52/policies/discovery
Parameters
Field | Data Type | Description |
---|---|---|
name | String | Discovery profile name. |
credentialSet | String | Credential set (received in the response during the cloud integration installation through the API) to be assigned to the discovery profile. |
1. policy rules 1. filterType | String | (Optional) 1. Set of functions formed together as a policy and attached with the discovery profile. Rules to filter the resources to which the discovery profile is attached: 1. Filtered resource type. |
2. schedule
| String | (Optional) 2. Define the discovery time of resources:
|
Status code
200 OK
Filter criteria for Discovery profiles
Filter resources to attach to discovery profiles.
All Resources
To attach a Discovery profile to all resources, provide the ANY_CLOUD_RESOURCE filter type:
[
{
"filterType": "ANY_CLOUD_RESOURCE"
}
]
Specific resources
To attach AWS discovery profile to specific resources, provide the following type of resource:
"rules": [{
"filterType": "AUTO_SCALING"
},
{
"filterType": "CLOUDFRONT"
},
{
"filterType": "DYNAMO_DB"
},
{
"filterType": "ANY_DEVICE"
},
{
"filterType": "ELASTICACHE"
},
{
"filterType": "ELASTICMAPREDUCE"
},
{
"filterType": "KINESIS"
},
{
"filterType": "LAMBDA"
},
{
"filterType": "LOAD_BALANCER"
},
{
"filterType": "MACHINE_LEARNING"
},
{
"filterType": "RDS"
},
{
"filterType": "REDSHIFT"
},
{
"filterType": "ROUTE_53"
},
{
"filterType": "SNS"
},
{
"filterType": "SQS"
},
{
"filterType": "STORAGE_GATEWAY"
},
{
"filterType": "EBS"
}
]
To attach Azure discovery profile to specific resources, provide the following type of resource:
"rules": [{
"filterType": "ANY_DEVICE"
},
{
"filterType": "EBS"
},
{
"filterType": "WEBSITE"
},
{
"filterType": "SQL_SERVER"
},
{
"filterType": "SQL_DATABASE"
},
{
"filterType": "RESOURCE_GROUP"
},
{
"filterType": "REDIS_CACHE"
},
{
"filterType": "DOCUMENT_DB"
},
{
"filterType": "TRAFFIC_PROFILE"
},
{
"filterType": "CDN_PROFILE"
},
{
"filterType": "ROUTE_TABLE"
},
{
"filterType": "LOAD_BALANCER"
},
{
"filterType": "AVAILABILITY_SET"
},
{
"filterType": "AUTO_SCALING"
},
{
"filterType": "CDN_ENDPOINT"
},
{
"filterType": "EXPRESS_ROUTE"
},
{
"filterType": "BIZTALK_SERVICE"
}
]
To attach Google discovery profile to specific resources, provide the following type of resource:
"rules": [{
"filterType": "ANY_DEVICE"
},
{
"filterType": "EBS"
},
{
"filterType": "GCE_CLUSTER"
},
{
"filterType": "SQL_SERVER"
},
{
"filterType": "SQL_DATABASE"
},
{
"filterType": "GCE_TOPIC"
},
{
"filterType": "GCE_SUBSCRIPTION"
},
{
"filterType": "GCE_ROUTER"
},
{
"filterType": "VPN"
}
]
Resource Filters
To filter resources with unique attributes and attach to the AWS discovery profile, provide the following unique attributes of these resources:
"rules": [{
"key": "Name",
"operator": "Contains",
"value": "Windows",
"entityType": "DEVICE"
},
{
"key": "Region Name",
"operator": "Not Contains",
"value": "WEST_1",
"entityType": "RDS"
},
{
"key": "Zone Name",
"operator": "Equals",
"value": "US-EAST",
"entityType": "Redshift"
}
]
To filter resources with unique attributes and attach to the Azure discovery profile, provide the following unique attributes of these resources:
"rules": [{
"key": "Name",
"operator": "Contains",
"value": "Windows",
"resourceType": "DEVICE"
},
{
"key": "Name",
"operator": "Not Contains",
"value": "Storge",
"resourceType": "LOAD_BALANCER"
},
{
"key": "Region Name",
"operator": "Contains",
"value": "US_WEST",
"resourceType": "REDIS_CACHE"
},
{
"key": "Zone Name",
"operator": "Equals",
"value": "US-EAST",
"resourceType": "ROUTE_TABLE"
}
]
To filter resources with unique attributes and attach to the Google discovery profile, provide the following unique attributes of these resources:
"rules": [{
"key": "Name",
"operator": "Contains",
"value": "Linux",
"resourceType": "DEVICE"
},
{
"key": "Region Name",
"operator": "Not Contains",
"value": "ASIA",
"resourceType": "GCE_ROUTER"
},
{
"key": "Name",
"operator": "Regex",
"value": "^Cluster",
"resourceType": "GCE_TOPIC"
},
{
"key": "Name",
"operator": "Contains",
"value": "Network",
"resourceType": "GCE_SUBSCRIPTION"
}
]
Supported actions in discovery profile
For AWS, these actions are supported and performed on the discovered resources:
Action | Description |
---|---|
Manage Device | Managed resource collects metrics, creates jobs, scripts, Creates anti-virus and launches consoles. |
Stream Cloud Trial | Provide SQS URL to consume events. CloudTrail generates events whenever there is a change (example: instance launch, terminate) and OpsRamp would capture them through the CloudTrail SQS URL. This is benefited over periodic discovery as the cloud changes are immediately notified to OpsRamp. Learn how to configure CloudTrail. |
Collect Cost Analytics | Projects cost details of the services and resources utilized. |
Assign Gateway Management profile | Assign Gateway management profile to the discovered resources. Learn about Gateway Management profile. |
Install OpsRamp Agent | Install OpsRamp Agent on Linux resources. |
Install OpsRamp Agent through Gateway | Each Agent connects to cloud via HTTP proxy embedded within the OpsRamp Gateway. This is applicable only for Linux resources. |
Install Windows Agent | Install Agent on Windows resources. |
Stream AWS Alerts | Provide SQS URL to consume alarms. CloudWatch is monitored by cloud and alarms are collected generated by it in OpsRamp through the Stream Alarm in SQS URL. Learn to configure CloudWatch alarms. |
Accept Non-Existent Resource | Process alarms generated from unmanaged resource. |
Stream AWS Alerts are mandatory to perform accept non-existent resource action.
Provide the following action items:
"actions": [{
"action": "MANAGE DEVICE"
},
{
"action": "STREAM CLOUDTRAIL",
"items": [{
"item": "https://sqs.us-east-1.amazonaws.com/290642135901/opsramp-cloudtrail-sqs"
}]
},
{
"action": "COLLECT COST ANALYTICS",
"items": [{
"item": "testing"
}]
},
{
"action": "ASSIGN GATEWAY MANAGEMENT PROFILE",
"items": [{
"item": "1"
}]
},
{
"action": "INSTALL OPSRAMP AGENT",
"items": [{
"item": "11"
}]
},
{
"action": "SELECT GATEWAY",
"items": [{
"item": "1"
}]
},
{
"action": "INSTALL WINDOWS AGENT",
"items": [{
"item": "10"
}]
},
{
"action": "STREAM AWS ALERTS",
"items": [{
"item": "https://sqs.us-east-1.amazonaws.com/290642135901/SQS-460"
}]
},
{
"action": "ACCEPT NON-EXISTENT RESOURCE"
}
]
For Azure, these actions are supported and performed on the discovered resources:
Action | Description |
---|---|
Manage Device | Managed resource collects metrics, creates jobs, scripts, Creates anti-virus and launches consoles. |
Assign Gateway Management profile | Assign Gateway management profile to the discovered resources. Learn about Gateway Management profile. |
Install OpsRamp Agent | Install OpsRamp Agent on Linux resources. |
Install Windows Agent | Install Agent on Windows resources. |
Install OpsRamp Agent through Gateway | Each Agent connects to cloud via HTTP proxy embedded within the OpsRamp Gateway. This is applicable only for Linux resources. |
Provide the following action items:
"actions": [{
"action": "MANAGE DEVICE"
},
{
"action": "ASSIGN GATEWAY MANAGEMENT PROFILE",
"items": [{
"item": "24422"
}]
},
{
"action": "INSTALL OPSRAMP AGENT",
"items": [{
"item": "169743"
}]
},
{
"action": "INSTALL OPSRAMP AGENT",
"items": [{
"item": "234543"
}]
},
{
"action": "SELECT GATEWAY",
"items": [{
"item": "24422"
}]
}
]
For Google, these actions are supported and performed on the discovered resources:
Action | Description |
---|---|
Manage Device | Managed resource collects metrics, creates jobs, scripts, Creates anti-virus and launches consoles. |
Provide the following action items:
"actions": [{
"action": "MANAGE DEVICE"
}]
Discovery Schedule
Schedule the discovery with a specific pattern of hourly, daily, weekly and monthly basis. This example demonstrates HOURLY and pattern 2:
Schedule | Fields | Description |
---|---|---|
Minutes |
|
|
Hourly |
|
|
Daily |
|
|
Weekly |
|
|
MonthlyDay of every month |
|
|
MonthlyWeekday of every month |
|
|
To schedule discovery, provide one of these patterns and pattern types:
To use a minutes pattern:
"schedule": {
"patternType": "MINUTES",
"pattern": "20"
}
To use an hourly pattern:
"schedule": {
"patternType": "HOURLY",
"pattern": "2"
}
To use a daily pattern:
"schedule": {
"patternType": "DAILY",
"pattern": "3",
"startTime": "02"
}
To use a weekly pattern:
"schedule": {
"patternType": "WEEKLY",
"pattern": "SUN,MON,TUE,WED,THU,FRI,SAT",
"startTime": "02"
}
To use a monthly pattern on a specific day of every month:
"schedule": {
"patternType": "MONTHLY",
"pattern": "5,10,15",
"startTime": "02"
}
To use a monthly pattern on a specific weekday of every month:
"schedule": {
"patternType": "MONTHLY",
"pattern": "FIRST,SUN",
"startTime": "02"
}
AWS basic discovery profile
Create a basic AWS discovery profile with credentials to administer the management of discovered resources:
Sample request
[{
"name": "AWS Basic Discovery profile",
"credentialSet": "AWS AWS Integration"
}]
Sample response
[
{
"id": 61,
"name": "AWS Basic Discovery Profile",
"installedIntegrationId": "INTG-5de40426-6edb-4f40-9274-d8827b683e40",
"credentialSet": "AWS AWS Integration",
"credential": {
"credentialName": "AWS AWS Integration",
"accountId": "************"
},
"policy": {
"id": 1622,
"uid": "POLICY-c3702a44-caf0-47cf-b774-09fa806bc093",
"name": "AWS Basic Discovery Profile",
"matchType": "ANY",
"rules": [
{
"id": 2062,
"filterType": "ANY_CLOUD_RESOURCE"
}
],
"actions": [],
"entityType": "ALL"
}
}
]
The returned sample response can be posted again with any modification.
AWS discovery profile with delivery schedule
Create an AWS discovery profile with a schedule to define the discovery time of resources:
Sample request
[{
"name": "AWS discovery profile with schedule",
"credentialSet": "AWS_Integration",
"schedule": {
"patternType": "HOURLY",
"pattern": "2",
"startTime": "02:00:00"
}
}]
Sample response
[{
"id": 120,
"name": "AWS discovery profile with schedule",
"credentialSet": "AWS_Integration",
"credential": {
"credentialName": "AWS_Integration",
"accountId": "*********"
},
"schedule": {
"patternType": "HOURLY",
"pattern": "2",
"startTime": "02:00:00"
}
}]
AWS discovery profile with policy
Create an AWS discovery profile with a policy to define specific actions performed on the discovered resources:
Sample request
[{
"name": "AWS Discovery profile",
"credentialSet": "AWS AWS Integration",
"policy": {
"name": "AWS Discovery profile",
"entityType": "ALL",
"matchType": "ANY",
"rules": [{
"filterType": "ANY_CLOUD_RESOURCE"
}]
}]
Sample response
[{
"id": 103918,
"name": "AWS Discovery profile",
"installedIntegrationId": "INTG-5de40426-6edb-4f40-9274-d8827b683e40",
"credentialSet": "AWS AWS Integration",
"credential": {
"credentialName": "AWS AWS Integration",
"accountId": "*********"
},
"policy": {
"id": 51288,
"uid": "POLICY-c3702a44-caf0-47cf-b774-09fa806bc093",
"name": "AWS Discovery profile",
"matchType": "ANY",
"rules": [{
"filterType": "ANY_CLOUD_RESOURCE"
}],
"actions": [],
"entityType": "All"
}]
AWS discovery profile with credentials, schedule, and policy
Create an AWS discovery profile with credentials, schedule, and policy to administer the management of resources, schedule discovery of resources, and define specific actions performed on the discovered resources:
Sample request
[{
"name": "AWS_profile",
"credential": {
"credentialType": "AWS",
"AccountNumber": "************",
"AccessKey": "*******************",
"SecurityKey": "************************"
},
"policy": {
"name": "AWS_profile",
"entityType": "ALL",
"matchType": "ANY",
"rules": [{
"filterType": "ANY_CLOUD_RESOURCE"
}],
"actions": [{
"action": "MANAGE DEVICE",
"items": []
}],
"executionOrder": 0
},
"schedule": {
"patternType": "MINUTES",
"pattern": "30",
"startTime": "00:30:00"
}
}]
Sample response
[{
"id": 29,
"name": "AWS_profile",
"credentialSet": "AWS_AWSIntegration",
"credential": {
"credentialName": "AWS_AWSIntegration",
"accountId": "***********"
},
"policy": {
"id": 879,
"name": "AWS_profile",
"entityType": "ALL",
"matchType": "ANY",
"rules": [{
"id": 26834,
"filterType": "ANY_CLOUD_RESOURCE"
}],
"actions": [{
"action": "MANAGE DEVICE",
"items": []
}]
},
"schedule": {
"patternType": "MINUTES",
"pattern": "30",
"startTime": "00:30:00"
}
}]
Azure basic discovery profile
Create a basic Azure discovery profile with credentials to administer the management of discovered resources:
Sample request
[{
"name": "Azure Basic Discovery profile",
"credentialSet": "Azure Credentials"
}]
Sample response
[{
"id": 962,
"name": "Azure Basic Discovery profile",
"credentialSet": "Azure Credentials",
"credential": {
"credentialName": "Azure Credentials",
"accountId": "9ee6993f-a036-4118-9eab-c66d9fda1ef3"
}
}]
Azure discovery profile with discovery schedule
Create an Azure discovery profile with a schedule to define the discovery time of resources:
Sample request
[{
"name": "Azure discovery profile with schedule",
"credentialSet": "Azure Credentials",
"schedule": {
"patternType": "HOURLY",
"pattern": "2",
"startTime": "02:00:00"
}
}]
Sample response
[{
"id": 963,
"name": "Azure discovery profile with schedule",
"credentialSet": "Azure Credentials",
"credential": {
"credentialName": "Azure Credentials",
"accountId": "9ee6993f-a036-4118-9eab-c66d9fda1ef3"
},
"schedule": {
"patternType": "HOURLY",
"pattern": "2",
"startTime": "02:00:00"
}
}]
Azure discovery profile with schedule and policy
Create Azure discovery profile with schedule and policy to schedule discovery of resources and define actions performed on the discovered devices:
Sample request
[{
"name": "Azure",
"credentialSet": "Azure_policy",
"policy": {
"name": "Azure",
"resourceType": "ALL",
"matchType": "ANY",
"rules": [{
"filterType": "ANY_CLOUD_RESOURCE"
}],
"actions": [{
"action": "MANAGE DEVICE",
"items": []
}],
"executionOrder": 0
},
"schedule": {
"patternType": "MINUTES",
"pattern": "30",
"startTime": "00:30:00"
}
}]
Sample response
[{
"id": 510,
"name": "Azure",
"credentialSet": "Azure_policy",
"credential": {
"credentialName": "Azure_policy",
"accountId": "9ee6993f-a036-418-9eab-c66f34fae1gf7"
},
"policy": {
"id": 736,
"name": "Azure",
"resourceType": "ALL",
"matchType": "ANY",
"rules": [{
"filterType": "ANY_CLOUD_RESOURCE"
}],
"actions": [{
"action": "MANAGE DEVICE",
"items": []
}],
"executionOrder": 0
},
"schedule": {
"patternType": "MINUTES",
"pattern": "30",
"startTime": "00:30:00"
}
}]
Azure discovery profile with credentials, schedule, and policy
Create an Azure discovery profile with credentials, schedule, and policy to administer the management of resources, schedule discovery of resources, and define specific actions performed on the discovered resources:
Sample request
[{
"name": "Azure_Profile",
"credential": {
"credentialType": "Azure",
"AzureType": "ARM",
"SubscriptionId": "*******",
"TenantId": "********",
"ClientID": "*********",
"SecretKey": "*******"
},
"policy": {
"name": "Azure",
"resourceType": "ALL",
"matchType": "ANY",
"rules": [{
"filterType": "ANY_DEVICE"
},
{
"filterType": "EBS"
},
{
"filterType": "WEBSITE"
},
{
"filterType": "SQL_SERVER"
},
{
"filterType": "SQL_DATABASE"
},
{
"filterType": "RESOURCE_GROUP"
},
{
"filterType": "REDIS_CACHE"
},
{
"filterType": "DOCUMENT_DB"
}
],
"actions": [{
"action": "MANAGE DEVICE"
},
{
"action": "ASSIGN GATEWAY MANAGEMENT PROFILE",
"items": [{
"item": "24422"
}]
},
{
"action": "INSTALL OPSRAMP AGENT",
"items": [{
"item": "169743"
}]
},
{
"action": "SELECT GATEWAY",
"items": [{
"item": "24422"
}]
}
],
"executionOrder": 0
},
"schedule": {
"patternType": "MINUTES",
"pattern": "30",
"startTime": "00:30:00"
}
}]
Sample response
[{
"id": 102183,
"name": "Azure_Profile",
"credentialSet": "Azure",
"credential": {
"credentialName": "Azure",
"accountId": "9ee6993f-a036-4118-9eab-c66d9fda1ef2"
},
"policy": {
"id": 39733,
"name": "Azure",
"resourceType": "ALL",
"matchType": "ANY",
"rules": [{
"filterType": "ANY_DEVICE"
},
{
"filterType": "EBS"
},
{
"filterType": "WEBSITE"
},
{
"filterType": "SQL_SERVER"
},
{
"filterType": "SQL_DATABASE"
},
{
"filterType": "RESOURCE_GROUP"
},
{
"filterType": "REDIS_CACHE"
},
{
"filterType": "DOCUMENT_DB"
}
],
"actions": [{
"action": "MANAGE DEVICE",
"items": []
},
{
"action": "ASSIGN GATEWAY MANAGEMENT PROFILE",
"items": [{
"item": "24422",
"parameters": {},
"instances": {}
}]
},
{
"action": "INSTALL OPSRAMP AGENT",
"items": [{
"item": "169743",
"parameters": {},
"instances": {}
}]
},
{
"action": "SELECT GATEWAY",
"items": [{
"item": "24422",
"parameters": {},
"instances": {}
}]
}
],
"executionOrder": 0
},
"schedule": {
"patternType": "MINUTES",
"pattern": "30",
"startTime": "00:30:00"
}
}]
Google basic discovery profile
Create a basic Google discovery profile with credentials to administer the management of discovered resources:
Sample request
[{
"name": "Google Basic Discovery profile",
"credentialSet": "Google GOOGLE_Integration"
}]
Sample response
[{
"id": 962,
"name": "Google Basic Discovery profile",
"credentialSet": "Google GOOGLE_Integration",
"credential": {
"credentialName": "Google GOOGLE_Integration",
"accountId": "GCE-integration"
}
}]
Google discovery profile with credentials, schedule, and policy
Create a Google discovery profile with credentials, schedule, and policy to administer the management of resources, schedule discovery of resources, and define specific actions performed on the discovered resources:
Certificate attachment must be encoded with base64 and can be provided in ServiceAccountManagementCertificate.
Sample request
[{
"name": "Google",
"credential": {
"credentialType": "Google",
"ServiceAccountEmail": "**********",
"ProjectId": "*********",
"ServiceAccountManagementCertificate": "MIIJqAIBAzCCCWIGCSqGSIb3DQEHAaCCCVMEgglPMIIJSzCCBXAGCSqGSIb3DQEHAaCCBWEEggVdjqWWqTFyUbIAM/EKB3HLK3AgIEAA==",
"ManagementCertificatePassPhrase": "*******"
},
"policy": {
"name": "GOOGLE",
"resourceType": "ALL",
"matchType": "ANY",
"rules": [{
"filterType": "ANY_CLOUD_RESOURCE"
}],
"actions": [{
"action": "MANAGE DEVICE",
"items": []
}],
"executionOrder": 0
},
"schedule": {
"patternType": "MINUTES",
"pattern": "30",
"startTime": "00:30:00"
}
}]
Sample response
{
"id": 28,
"name": "Google",
"installedIntegrationId": "INTG-8abf482f-1423-18b7-4578-be47080aaa72",
"credentialSet": "Google GOOGLEIntegration",
"credential": {
"credentialName": "Google GOOGLEIntegration",
"accountId": "gce-integration"
},
"policy": {
"id": 822,
"name": "GOOGLE",
"resourceType": "ALL",
"matchType": "ANY",
"rules": [{
"id": 18821,
"filterType": "ANY_CLOUD_RESOURCE"
}],
"actions": [{
"action": "MANAGE DEVICE",
"items": []
}]
},
"schedule": {
"patternType": "HOURLY",
"pattern": "2",
"startTime": "02:00:00"
}
}