Page tree

You can create a monitoring policy for the agent to communicate with BMC TrueSight Infrastructure Management Server. For example, you want to configure an agent to connect with an integration service for load balancing.

URL to create a monitoring policy for the agent to communicate with BMC TrueSight Infrastructure Management Server

http:// <TSPShostname:port#>/tsws/10.0/api/unifiedadmin/MonitoringPolicy/<id>/update?idType=id

Input parameters to create a monitoring policy for the agent to communicate with BMC TrueSight Infrastructure Management Server

{
            "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
            }
        }

The following table lists the parameters that you must provide with the URL.

List of required parameters that must be provided to access the create API

AttributesDescription
agentConfigurationLists the details for the agent
agentDefaultAccountCredentials

Default account credentials for the agent. You must provide the credentials in the following format:
userName/password

The password must be encoded in the Base64 format.

integrationServiceIntegration service through which the agent communicates with Infrastructure Management
nameName of the integration service or the name of the integration service cluster through which the agent communicates with Infrastructure Management
type

Type of integration service. The supported types are as follows:

  • IS
  • IS cluster
eventConfigurationList of attributes to configure event for the agent
eventsFormatContainer

String that will be appended to the name of the events coming from the agents. If theforwardEvents attribute is set to false, the eventsFormatContainer attribute becomes invalid.

The default value is BPPM.

forwardEvents

Specifies whether the event must be forwarded to the destination. The supported values are as follows:

  • true
  • false

The default value is true.

destinationType

Type of destination to which you want to forward the event. The supported values are as follows:

  • INTEGRATIONSERVICE—events are forwarded to the integration service configured for the agent
  • CELL—events are forwarded to the specified cell

The default value is IS.

destinationCellsCells to which you want the events to be forwarded
destinationCellsSharedkey

Shared key for communication with the destination cell

The default value is mc.

restartAgent

Specifies whether to restart the agent after applying the configuration. The supported values are as follows:

  • true
  • false

The default value is false.

pollConfigurationConfiguration details for the polling interval
solutionsDetails about the monitoring solution
solutionVersionVersion of the specified monitoring solution
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.

parametersList of parameters for which you want to configure the polling interval
pollInterval

Polling interval duration

The syntax is hh:mm:ss, where hh refers to hours, mm refers to minutes, and ssrefers to seconds.

nameName of the parameter for which you want to configure the polling interval
tagDetails about the tags for the agent
agentTagTag name for the agent
agentSelectionCriteria

Set of conditions based on which the agents are identified to apply the policy

The syntax is  "agentIdentifier operator \"value\""

where,

  • agentIdentifier refers to the agent attributes, based on which the agent is identified. The supported identifiers are as follows:
    • agentName—Host name of the computer on which the BMC PATROL Agent is installed
    • agentPort—Port number through which the Integration Service connects with the agent
    • agentVersion—Version of the BMC PATROL Agent
    • agentOS—Operating system of the computer on which the BMC PATROL Agent is installed
    • agentIP—IP address of the computer on which the BMC PATROL Agent is installed
    • agentTag—Tag name of the BMC PATROL Agent
    • integrationService—Display name of the Integration Service
    • childServer—Host name of the Child Server that is registered with Central Monitoring Administration
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

Specifies 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

JSON response

A monitoring policy is created, and a sample response is as follows:

{
    "response": [
        {
            "name": "policy123", 
            "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