Self Monitoring for the Virtual Appliance
Use Self monitoring to view Virtual Appliance health in the AppDynamics Controller and receive alerts when a monitored component needs attention.
- View Virtual Appliance health in the same Controller that you use for application monitoring.
- Receive alerts for node, pod, database, messaging, ingress, and certificate problems.
- Manage notification actions through one alerting policy.
- Keep Health Rules aligned with changes to nodes and pods.
Enable Self Monitoring
Configure the Virtual Appliance to report its health metrics and manage Health Rules in the Controller.
/var/appd/config/:
-
globals.yaml.gotmpl: This file contains a primary switch to turn self-monitoring on or off.CODEvaSelfMonitoring: enabled: true -
monitoring.yaml.gotmpl: This file contains Health Rule thresholds, namespace lists, ingress lists, certificate inventories, controller connection settings.
Verify that the Cluster Agent is in the Running state. Check the health of cert-manager and the Virtual Appliance root certificate.
After you apply the Virtual Appliance configuration, Self monitoring reports metrics and creates its Health Rules. Allow a few minutes for the first Controller metric discovery.
Connect Self Monitoring to an external Controller
Send Virtual Appliance Self monitoring metrics and Health Rules to a Controller outside the Kubernetes cluster.
Self monitoring uses the external Controller URL and account.
Customize Self Monitoring alerts and notifications
Adjust Health Rule thresholds, monitored resources, and notification actions for your Virtual Appliance.
Self Monitoring manages 14 health rule families. Because four families apply one rule per entity, the Controller typically runs 40 to 60 rules, depending on the pod count. All rules are critical-only (no warning conditions) and use the va-hr- prefix.
healthRules.defaults:
defaults:
useDataFromLastNMinutes: 5 # evaluation window
waitTimeAfterViolation: 5 # minutes before re-alerting
Self Monitoring manages 14 Health Rule families. All rules create critical violations only. By default, each rule evaluates the last five minutes of data and waits five minutes before sending another alert.
| Rule | Creates a violation when | Default threshold | Scope |
|---|---|---|---|
clusterAgent |
Cluster Agent availability drops. | < 1 |
Cluster Agent node |
infraviz |
Machine Agent availability drops. | < 1 |
All nodes |
nodeCpu |
Node CPU usage is high. | > 80% |
All nodes |
nodeMemory |
Node memory usage is high. | > 80% |
All nodes |
nodeDisk |
Disk volume usage is high. | > 80% |
Each configured volume on every node |
pgReplLag |
PostgreSQL replication lag is high. | > 100 MB |
Monitoring node |
redisMemory |
Total Redis memory usage is high. | > 1500 MB |
Monitoring node |
ingress5xx |
An ingress reports too many HTTP 5xx errors. | > 10 per minute |
Each configured ingress |
kafkaUnderRepl |
Kafka has an under-replicated partition. | > 0 |
Monitoring node |
mysqlMembers |
A main MySQL cluster member is not ONLINE. |
> 0 |
Monitoring node |
mysqlAuthMembers |
An authentication MySQL cluster member is not ONLINE. |
> 0 |
Monitoring node |
schemaRegistry |
Schema Registry reports too many errors. | > 5 per minute |
Monitoring node |
podMemory |
A monitored pod stops reporting memory. | < 1 MB |
Each eligible pod |
certExpiry |
A monitored TLS certificate approaches expiry. | < 30 days |
Each configured certificate |
Edit Health Rules
You can customize Health Rule names, thresholds, and other parameters in monitoring.yaml.gotmpl. Self Monitoring uses the following naming pattern:
<prefix><rule-identifier>[-<entity>]
The default prefix is va-hr-. You can change the prefix or use hrIdentifier to change a rule identifier. The prefix can contain no more than 30 characters.
Rules that monitor the cluster or a single node do not include an entity suffix. Fan-out rules include the name of the monitored entity.
For example, you can increase the nodeCpu threshold from 80 percent to 90 percent and specify a custom rule identifier:
vaSelfMonitoring:
healthRules:
rules:
nodeCpu:
enabled: true
hrIdentifier: "<custom-rule-identifier>"
compareValue: 90
With this configuration, the rule creates a violation when node CPU usage exceeds 90 percent.
Policy behavior
You can create a policy that includes one or more Health Rules. The agent manages the policy membership. During reconciliation, it removes any Health Rules that you added manually.
Every reconciliation replaces the named policy's Health Rule list with enabled, prefix-matching self-monitoring rules. Unrelated rules added to that policy are removed. Reconciliation runs every 300 seconds by default.
healthRules.reconcileInterval. Enter the interval in seconds.
Monitor Java-Based Applications
The Virtual Appliance includes Java services such as authn, authz, cisco-eum, cisco-events, cisco-aiops, cisco-uil, cisco-synthetic, and cisco-metric.
To monitor these services with Java Agent, set javaInstrumentationOfServices to true. This setting injects the Java Agent into the Java services.
To stop health rule reconciliation, set healthRules.enabled to false. Existing health rules remain in the Controller and continue to evaluate until you remove them manually or turn reconciliation back on.
During an upgrade or restore, your settings in monitoring.yaml.gotmpl override the new release defaults, so your customization remain. Custom lists replace the default lists and do not receive new entries added by the release, so review them after each upgrade. Keep vaSelfMonitoring as a valid mapping because commenting it out or replacing it with another value causes the restore to fail.
Turn off Self Monitoring and Health Rules
Stop the Virtual Appliance from collecting Self monitoring metrics and managing its Health Rules.
Stop the Virtual Appliance from collecting Self monitoring metrics and managing its Health Rules.
Turn off Health Rules
Use the appropriate setting based on whether you want to remove individual Health Rules or stop Self Monitoring management.
| Setting | Result |
|---|---|
rules.<name>.enabled: false |
Deletes the Health Rules for that rule during the next reconciliation. |
healthRules.enabled: false |
Stops Health Rule reconciliation. Existing Health Rules remain in the Controller and continue to evaluate. |
vaSelfMonitoring.enabled: false |
Turns off Self Monitoring and prevents the monitoring agent from running. Existing Health Rules remain in the Controller. |
policySyncEnabled: false |
Stops the agent from managing policy membership. It does not turn off or delete Health Rules. |
The Virtual Appliance stops the Self monitoring collection and alerting pipeline. Existing Health Rules remain in the Controller.