Creating a monitoring policy using web services to configure filters
You can create a monitoring policy to configure filters to filter data or events coming from an agent. For example, you want to filter events coming from the agent for the NT_CACHE monitor.
URL to create a monitoring policy to configure filters
Input parameters to create a monitoring policy to configure filters
{
"monitoringPolicy": {
"id": "b613a477-1434-4ab9-b863-93c3ceb677fc",
"name": "filterconf11",
"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": false
}
}
The following table lists the parameters that you must provide with the URL.
List of required parameters that must be provided to configure filters
Attributes | Description |
---|---|
filteringConfiguration | List of attributes to configure filters for data or events |
configurations | Filters to identify monitors and solutions for which you want to create the policy |
solutionName | Name of the monitoring solution |
solutionVersion | Version of the specified monitoring solution |
monitors | 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. |
filter | Filter type. The supported values are as follows:
The default value for filter configuration is events. |
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 supported values are as follows:
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 |
shared | Supports two values:
|
associatedUserGroup | Name of the user group with which you want to associate the policy |
JSON response
A monitoring policy is created, and a sample response is as follows:
"response": [
{
"name": "filterconf11",
"statusCode": "200",
"statusMsg": "Successfully created policy",
"policyId": "700"
}
],
"statusCode": "200",
"statusMsg": "OK",
"responseTimeStamp": "2012-06-20T08:36:24",
}
Related topics
Creating-a-policy-using-web-services
Managing-policies-using-web-services
Performing-Central-Monitoring-Administration-functions-with-web-services