Use case scenarios to create a shared policy
A shared policy is one that can be shared among users of specific user group. This topic lists a few use case scenarios to create a shared policy. It can help you effectively use the create API. Each scenario is explained using an example URL and its subsequent response details.
URL to create a shared policy
Input parameters to create a shared policy
"monitoringPolicy": {
"id": "1c53638c-d47d-4e6d-937e-61f691a95969",
"name": "filterconf00",
"type": "monitoring",
"description": "",
"tenant": {
"name": "tenant1",
"id": "tenant1"
},
"precedence": 75,
"agentSelectionCriteria": "agentOS CONTAINS \"windows\" ",
"associatedUserGroup": "BMCTenantAdmin",
"owner": "test3",
"filteringConfiguration": {
"scope": "monitors",
"configurations": [
{
"solutionName": "psx_epd",
"solutionVersion": "4.8.00",
"monitors": [
{
"monitorType": "NT_SERVICES",
"attributes": [
{
"attributeName": "__ANYPARAM__",
"filter": "data&events",
"regEx": false
}
]
}
]
}
]
},
"enabled": true,
"shared": true
}
}
For information about the input parameters, see List of input parameters for the create API.
JSON response
A shared policy is created, and a sample response is as follows:
"response": [
{
"name": "filterconf00",
"statusCode": "200",
"statusMsg": "Successfully created policy",
"policyId": "id_1"
}
],
"statusCode": "200",
"statusMsg": "OK",
"responseTimeStamp": "2012-06-20T08:36:24",
}
List of required parameters that must be provided to access the create API
Attributes | Description |
---|---|
agentSelectionCriteria | Set of conditions based on which the agents are identified to apply the policy where,
|
precedence | Priority for the policy. The supported values are numbers between 0 and 999 with 999 being the lowest priority and 0 being the top priority. |
tenant | Details of the tenant who owns the policy. You can either provide name or the id of the tenant. |
name | Name of the tenant who owns the policy. The supported values are as follows:
|
enabled | Indicates whether the policy is enabled. The default value is true. |
name | Name of the policy |
type | Type of the policy. The supported types are as follows:
|
description | Brief description about the policy |
timeframe | Details of the time frame. The time frame specifies the time period for the blackout policy to be active. |
name | Name of the time frame |
scope | Scope of the blackout policy. The supported scopes are as follows:
|
blackoutTypes | Type of the blackout policy. The supported types are as follows:
|
monitorConfigList | List of monitors for which you want to create the blackout policy |
monitorTypeSpecification | Specifies the details about the monitors |
monitorType | Type of the monitor You can use the solutions API to know the supported monitor types. For information about the solutions API, see Listing-the-available-monitor-solutions. |
solutionName | Name of the monitoring solutions |
solutionVersion | Version of the specified monitoring solutions |
scope | Scope of the policy based on the monitor type. The supported options are as follows:
|
monitorInstances | Specifies the details about the monitor instances for which you want to create the policy |
monitorInstance | Specifies the details about a monitor instance |
shared | Supports two values:
|
associatedUserGroup | Name of the user group with which you want to associate the policy |
Related topics
Creating-a-policy-using-web-services
Managing-policies-using-web-services
Performing-Central-Monitoring-Administration-functions-with-web-services