Create Health Rule
appd_create_health_ruleCreate health rules for AppDynamics applications by defining metric thresholds, conditions, and entity scopes for APM or SIM monitoring.
Instructions
Create a new health rule for an application.
Supports APM and SIM (Server & Infrastructure Monitoring) entity types. At least one critical condition is required.
Args:
application (string|number): App name or ID
name (string): Health rule name
enabled (boolean, default true)
affectedEntityType: BUSINESS_TRANSACTION_PERFORMANCE | APPLICATION_PERFORMANCE | TIER_NODE_HEALTH | TIER_NODE_TRANSACTION_PERFORMANCE | BACKEND_CALL_PERFORMANCE | SERVICE_ENDPOINT_PERFORMANCE | CUSTOM
affectedTier (string, optional): Scope to a specific tier (TIER_NODE_HEALTH / TIER_NODE_TRANSACTION_PERFORMANCE only)
affectedNode (string, optional): Scope to a specific node (takes precedence over affectedTier)
customEntityType (string, optional): Entity type for CUSTOM rules — use "SERVER" for SIM nodes
customEntityName (string, optional): Entity name for CUSTOM rules — use the server/node hostname
criticalConditions (array): at least one condition with metricPath, threshold, operator
warningConditions (array, optional): same structure
conditionAggregationType (ALL|ANY, default ALL)
useDataFromLastNMinutes (default 30)
waitTimeAfterViolation (default 30)
APM custom metrics (machine agent on APM app): use affectedEntityType=TIER_NODE_HEALTH with affectedTier or affectedNode. metricPath must be RELATIVE to the entity (e.g. "Custom Metrics|MyMetric").
SIM / URL Monitor metrics: use affectedEntityType=CUSTOM, customEntityType="SERVER", customEntityName=. metricPath must be the FULL absolute path starting with "Application Infrastructure Performance|...". Operators supported: GREATER_THAN, LESS_THAN, GREATER_THAN_EQUALS, LESS_THAN_EQUALS, EQUALS, NOT_EQUALS. Example: { metricPath: "Application Infrastructure Performance|Root|Individual Nodes|myhost|Custom Metrics|URL Monitor|SvcA|Status", threshold: 4, operator: "NOT_EQUALS" }
Returns: Created health rule object with assigned ID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Health rule name. | |
| enabled | No | Whether the rule is enabled. | |
| application | Yes | Application name or numeric ID. | |
| affectedNode | No | Scope to a specific node (TIER_NODE_HEALTH / TIER_NODE_TRANSACTION_PERFORMANCE only). Takes precedence over affectedTier when both are provided. | |
| affectedTier | No | Scope to a specific tier (TIER_NODE_HEALTH / TIER_NODE_TRANSACTION_PERFORMANCE only). Use when custom metrics only exist on nodes in a particular tier. | |
| customEntityName | No | Entity name for CUSTOM (SIM) rules. Use the server hostname (e.g. ip-10-0-1-163.eu-west-1.compute.internal). | |
| customEntityType | No | Entity type for CUSTOM (SIM) rules. Use "SERVER" for Server & Infrastructure Monitoring nodes. | |
| warningConditions | No | Warning threshold conditions. | |
| affectedEntityType | Yes | Entity type the health rule applies to. | |
| criticalConditions | Yes | Critical threshold conditions (at least one required). | |
| waitTimeAfterViolation | No | Wait time in minutes before re-alerting. | |
| useDataFromLastNMinutes | No | Evaluation window in minutes. | |
| conditionAggregationType | No | ALL = all conditions must be met; ANY = any condition triggers. | ALL |