Page tree

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

http://<TSPShostname:port#>/tsws/10.0/api/unifiedadmin/MonitoringPolicy/create

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 

AttributesDescription
filteringConfigurationList of attributes to configure filters for data or events
configurationsFilters to identify monitors and solutions for which you want to create the policy
solutionNameName of the monitoring solution
solutionVersionVersion of the specified monitoring solution
monitorsDetails 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:

  • none—sends both events and data
  • data—sends only events, not data
  • events—sends only data, not events

The default value for filter configuration is events.

precedencePriority for the policy. The supported values are numbers between 0 and 999 with 999 being the lowest priority and 0 being the top priority. 

The default value is 999.
tenantDetails 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:

  • <nameOfTenant>—Indicates that the policy is applicable to the specified tenant
  • GLOBAL—Indicates that the policy is applicable to all agents
  • PROVIDER—Indicates that the policy is applicable to the cloud service provider and also to the agents that do not have any tenants
enabled

Indicates whether the policy is enabled. The supported values are as follows:

  • true
  • false

The default value is true.

nameName of the policy
type

Type of the policy. The supported types are as follows:

  • blackout
  • monitoring
descriptionBrief description about the policy
shared

Supports two values:

  • true - the policy can be shared among users of specific user group
  • false - the policy cannot be shared with anybody
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