Health monitor sample output
Use the health monitor to determine if there are any potential health issues, such as HADR state. You can gather data for the health monitor by capturing snapshots through the command line.
The following examples show health snapshots taken using the CLP, and their corresponding output, and illustrate the nature of the health monitor:
- Before you begin, ensure that a database connection exists.
- Take the database manager snapshot, using the GET HEALTH SNAPSHOT command:
db2 get health snapshot for db on sampleAfter the GET HEALTH SNAPSHOT command is issued from the CLP, the snapshot output is directed to the screen:
Database Health Snapshot Snapshot timestamp = 09/30/2024 11:44:37.793184 Database name = SAMPLE Database path = E:\DB2\NODE0000\SQL00002\ Input database alias = SAMPLE Operating system running at database server= NT Location of the database = Local Database highest severity alert state = Attention Health Indicators: ... Indicator Name = db.hadr_delay Value = 1 Unit = Minutes Evaluation timestamp = 09/30/2024 11:44:37.793184 Alert state = Normal Indicator Name = db.hadr_op_status Value = 0 Evaluation timestamp = 09/30/2024 11:44:37.793184 Alert state = Normal - Analyze the output.
This health snapshot reveals that there are no alerts. HADR is operational (represented by the
db.hadr_op_statushealth indicator with a value of 0, representing "Connected"), and the HADR delay is minimal (represented by thedb.hadr_delayhealth indicator with a value of 1, representing a 1 minute delay between the primary and standby servers).