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.
http:// <TSPShostname:port#>/tsws/10.0/api/unifiedadmin/MonitoringPolicy/<id>/update?idType=id
{ "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
Attributes | Description |
---|---|
agentConfiguration | Lists the details for the agent |
agentDefaultAccountCredentials | Default account credentials for the agent. You must provide the credentials in the following format: The password must be encoded in the Base64 format. |
integrationService | Integration service through which the agent communicates with Infrastructure Management |
name | Name 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:
|
eventConfiguration | List 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 the The default value is BPPM. |
forwardEvents | Specifies whether the event must be forwarded to the destination. The supported values are as follows:
The default value is true. |
destinationType | Type of destination to which you want to forward the event. The supported values are as follows:
The default value is IS. |
destinationCells | Cells 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:
The default value is false. |
pollConfiguration | Configuration details for the polling interval |
solutions | Details about the monitoring solution |
solutionVersion | Version of the specified monitoring solution |
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. |
parameters | List of parameters for which you want to configure the polling interval |
pollInterval | Polling interval duration The syntax is |
name | Name of the parameter for which you want to configure the polling interval |
tag | Details about the tags for the agent |
agentTag | Tag name for the agent |
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. The default value is 999. |
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 | Specifies 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 |
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", }
Creating a policy using web services
Managing policies using web services
Performing Central Monitoring Administration functions with web services