Creating a monitoring policy to configure configuration variables
You can create a monitoring policy to configure configuration variables. For example, you want to apply PCONFIG variable-specific configuration on an agent. To achieve this, you can configure configuration variables using a monitoring policy.
URL to create a monitoring policy to configure configuration variables
Input parameters to create a monitoring policy to configure configuration variables
{
"monitoringPolicy": {
"id": "8d2629bd-be50-4031-89bb-80d54c32be96",
"name": "configvar11",
"type": "monitoring",
"description": "",
"tenant": {
"name": "tenant1",
"id": "tenant1"
},
"precedence": 12,
"agentSelectionCriteria": "agentOS CONTAINS \"linux\" ",
"associatedUserGroup": "BMCTenantAdmin",
"owner": "test3",
"rulesetConfiguration": {
"rulesets": [
{
"variable": "/AgentSetup/Identification/Tags/TAG",
"operation": "REPLACE",
"value": "linux:linux"
}
]
},
"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 |
---|---|
rulesetConfiguration | List of rules for the PCONFIG variables that you want to apply on the agent |
rulesets | List of rules for each PCONFIG variable |
variable | The PCONFIG variable to which you want to define the rule |
operation | Operation that you want to perform on the agent. The supported operations are as follows:
The default value is REPLACE. |
value | Value that you want to set for the variable |
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. |
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:
|
agentSelectionCriteria | Set of conditions based on which the agents are identified to apply the policy where,
|
enabled | Indicates 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 |
shared | Supports two values:
|
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": "configvar11",
"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