crm_mon
crm_mon is a command-line monitoring tool that provides a real-time view of the status of a Pacemaker-based high-availability cluster. It is part of the crmsh (Cluster Resource Manager Shell) suite and is widely used to quickly assess cluster health, view resource statuses, and monitor node activity.
Purpose
Real-Time Monitoring:
crm_mondisplays the current state of the cluster, including information about nodes, resources, constraints, and fencing events. This helps administrators keep an eye on cluster health and detect issues promptly.Cluster Overview: The tool presents an aggregated view of cluster components—such as which nodes are online or offline, the status of individual resources, and any constraint or configuration problems—making it easier to diagnose potential issues.
Troubleshooting: By providing a clear snapshot of the cluster state,
crm_monis invaluable for troubleshooting and verifying that changes to cluster configuration have been successfully applied.
Basic Syntax
crm_mon [options]Without any options, crm_mon outputs a continuous display of cluster status in the terminal, updating at regular intervals.
Common Options
-1Exit after the first full status display.crm_mon -1-nDisplay node names rather than node IDs.crm_mon -n-AShow additional attribute information about nodes and resources.crm_mon -A-rInclude resource history information in the output.crm_mon -r-iInclude detailed information on resource failures and pending operations.crm_mon -i-dSet the display delay (in seconds) for each update (default is typically a few seconds).crm_mon -d 5-2Similar to-1but refreshes twice before exiting.crm_mon -2-VDisplay the version of crm_mon.crm_mon -V
Example Usage
One-Time Status Snapshot: To display the current cluster status once and then exit:
crm_mon -1This command is useful for scripting or for quickly checking the state of the cluster.
Continuous Monitoring: Running
crm_monwithout any options will provide a continuously updated view:crm_monThis displays an ongoing status screen that refreshes periodically, allowing you to watch for changes over time.
Detailed Output with Node Names and History: To get a more detailed report that shows node names and historical events:
crm_mon -n -rThis is helpful for in-depth troubleshooting and for understanding resource transitions.
Setting a Custom Refresh Interval: To refresh the display every 5 seconds:
crm_mon -d 5
Output Overview
The typical output of crm_mon includes:
Cluster Summary: Overall status of the cluster including quorum status, any errors, or pending actions.
Node Information: A list of cluster nodes showing their status (online, standby, or offline), IP addresses, and other attributes.
Resource Status: Status of each configured resource, including whether it is running, stopped, or in a failed state, along with its current location and any constraints affecting it.
Fencing and Constraint Details: Information about recent fencing events or resource ordering/colocation constraints that may affect resource placement.
Conclusion
crm_mon is an essential tool for administrators managing Pacemaker clusters. It offers a clear and concise real-time view of cluster status, making it easier to monitor health, diagnose issues, and verify the effects of configuration changes. Whether used in interactive mode or integrated into monitoring scripts, crm_mon provides vital insights into the operational state of high-availability clusters.
Last updated