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

AttributesDescription
solutionVersionVersion of the specified monitoring solution.
solutionNameName of the monitoring solution.
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 900.
tenantDetails 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:

  • <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
ownerThe user who is creating the policy.
enabled

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

  • true
  • false

The default value is true.

shared

Specifies whether the policy is shared with a user group. The supported values are as follows:

  • true
  • false

The default value is false.

associatedUserGroupThe user groups associated with the logged in user.
monitorConfigurationThe monitoring configuration details associated with the policy.
monitoringProfileDetails 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.

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:

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

Was this page helpful? Yes No Submitting... Thank you

Comments

  1. Victor Chan

    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.

    Dec 08, 2020 04:30
    1. Shreya Gurukiran

      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

      Jun 01, 2021 02:49