Creating a monitoring policy for the agent to communicate with Infrastructure Management
You can create a monitoring policy for the Agent to communicate with the Infrastructure Management server. For example, you want to monitor the operating system health of a PATROL Agent host.
URL to create a monitoring policy for the Agent to communicate with BMC TrueSight Infrastructure Management Server
https://<TSPShostname>:<port>/tsws/10.0/api/unifiedadmin/MonitoringPolicy/create
Input parameters to create a monitoring policy for the Agent to communicate with BMC TrueSight Infrastructure Management Server
{
"monitoringPolicy":{
"tenant":{
"name":"tenant1"
},
"owner":"admin",
"type":"monitoring",
"precedence":666,
"enabled":true,
"shared":false,
"agentSelectionCriteria":"agentOS CONTAINS \"Windows\"",
"associatedUserGroup":"BMCTenantAdmin",
"name":"SamplePolicy1",
"description":"Creating Sample policy",
"monitorConfiguration":{
"configurations":[
{
"solutionName":"psx_epd",
"solutionVersion":"5.1.10",
"monitoringProfile":"NT_BASIC_HEALTH",
"defaultMonitoring":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 |
---|---|
solutionVersion | Version of the specified monitoring solution. |
solutionName | Name of the monitoring solution. |
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 900. |
tenant | Details of the tenant to which the user belongs. You can either provide name or the id of the tenant. |
name | Name of the tenant. The supported values are as follows:
|
owner | The user who is creating the policy. |
enabled | Specifies whether the policy is enabled. The supported values are as follows:
The default value is true. |
shared | Specifies whether the policy is shared with a user group. The supported values are as follows:
The default value is false. |
associatedUserGroup | The user groups associated with the logged in user. |
monitorConfiguration | The monitoring configuration details associated with the policy. |
monitoringProfile | Details about the monitors. |
defaultMonitoring | 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. |
name | Name of the policy. |
type | Type of the policy. The supported types are as follows:
|
description | Brief description about the policy. |
JSON response
A monitoring policy is created, and a sample response is as follows:
{
"responseTimeStamp":"2021-04-16T15:54:05",
"statusCode":"200",
"statusMsg":"OK",
"response":[
{
"resourceId":"9844cd0a-cb22-4d7d-9d3d-2f94971afaf9",
"resourceName":"SamplePolicy1",
"resourceURI":null,
"statusCode":"200",
"statusMsg":"OK"
}
]
}
Related topics
Creating a policy using web services
Managing policies using web services
Performing infrastructure monitoring functions with web services
Comments
This example is not for integration service configure, this look like to configure the NT_SERVICES monitoring, and the Attributes Tables wasn't match with the example.
Hi Victor Chan,
Thanks for your feedback. We have now updated the example for creating a monitoring policy and synced the attributes in the table with the updated example. Hence, closing the comment.
Regards,
Shreya
Log in or register to comment.