There are three monitoring interfaces for Message QueueTM information: log files, interactive commands, and a client API that can obtain metrics. Each has its advantages and disadvantages, as follows:
Log files provide a long-term record of metrics data, but cannot easily be parsed.
Commands enable you to quickly sample information tailored to your needs, but do not enable you to look at historical information or manipulate the data programmatically.
The client API lets you extract information, process it, manipulate the data, present graphs or send alerts. However, to use it, you must write a custom application to capture and analyze the data.
Table 10–1 compares the different tools.
Table 10–1 Benefits and Limitations of Metrics Monitoring Tools
Metrics Monitoring Tool |
Benefits |
Limitations |
---|---|---|
imqcmd metrics |
Remote monitoring Convenient for spot checking Reporting interval set in command option; can be changed on the fly Easy to select specific data of interest Data presented in easy tabular format |
No single command gets all data Difficult to analyze data programmatically Doesn’t create historical record Difficult to see historical trends |
Log files |
Regular sampling Creates a historical record |
Need to configure broker properties; must shut down and restart broker to take effect Local monitoring only Data format very difficult to read or parse; no parsing tools Reporting interval cannot be changed on the fly; the same for all metrics data Does not provide flexibility in selection of data Broker metrics only; destination and connection service metrics not included Possible performance hit if interval set too short |
Client API |
Remote monitoring Easy to select specific data of interest Data can be analyzed programmatically and presented in any format |
Need to configure broker properties; must shut down and restart broker to take effect You need to write your own metrics monitoring client Reporting interval cannot be changed on the fly; the same for all metrics data |
In addition to the differences shown in the table, each tool gathers a somewhat different subset of the metrics information generated by the broker. For information on which metrics data is gathered by each monitoring tool, see Chapter 18, Metrics Reference.