AIX IBM MQ
AIX IBM MQ input 通过 dspmq 和 runmqsc 采集 Queue Manager、队列、通道、监听器和高级对象。
配置¶
[inputs]
# 中间件 input 总开关。
enabled = true
[[inputs.ibm_mq]]
# 实例名,会作为 instance tag。
name = "QM1"
# 是否启用该 IBM MQ 实例采集。
enabled = true
# 采集间隔。
interval = "60s"
# 可选,采集前加载实例环境变量。
env_file = ""
# 是否采集 cluster/topic/subscription 等高级对象。
collect_advanced = false
# 可选,自定义指标命令,输出 key=value 行。
deep_metrics_command = ""
# Queue Manager 名称。
queue_manager = "QM1"
# 队列过滤规则。
queue_include = []
queue_exclude = ["SYSTEM.*"]
dead_letter_queue = "SYSTEM.DEAD.LETTER.QUEUE"
# IBM MQ 命令路径。
dspmq = "dspmq"
runmqsc = "runmqsc"
命令依赖¶
| 命令 | 说明 |
|---|---|
dspmq -m <QM> |
采集 Queue Manager 状态。 |
runmqsc <QM> |
采集 QMSTATUS、QLOCAL、CHSTATUS、LSSTATUS。 |
runmqsc <QM> 高级命令 |
collect_advanced = true 时采集 CLUSQMGR、TOPIC、SUB。 |
deep_metrics_command |
自定义命令,输出 key=value 行,采集自定义指标。 |
指标¶
所有指标都会追加 host、input=ibm_mq、instance=<name> 标签。
ibm_mq_qmgr¶
| Tags & Fields | Description |
|---|---|
| queue_manager ( tag) |
Queue Manager 名称。 |
| status ( tag) |
Queue Manager 状态。 |
| up | Queue Manager 是否 Running。 Type: int | (gauge) |
ibm_mq_queue¶
| Tags & Fields | Description |
|---|---|
| queue_manager ( tag) |
Queue Manager 名称。 |
| queue ( tag) |
队列名。 |
| curdepth | 当前队列深度。 Type: int | (gauge) Unit: count |
| open_input | 输入打开数。 Type: int | (gauge) Unit: count |
| open_output | 输出打开数。 Type: int | (gauge) Unit: count |
| maxdepth | 最大队列深度。 Type: int | (gauge) Unit: count |
| dead_letter_depth | 死信队列深度。 Type: int | (gauge) Unit: count |
ibm_mq_channel¶
| Tags & Fields | Description |
|---|---|
| channel ( tag) |
通道名。 |
| status ( tag) |
通道状态。 |
| substate ( tag) |
通道 substate。 |
| running | 通道是否 RUNNING。 Type: int | (gauge) |
| current_sharing_conversations | 当前共享会话数。 Type: int | (gauge) Unit: count |
| bytes_sent | 已发送字节数。 Type: int | (count) Unit: digital,B |
| bytes_received | 已接收字节数。 Type: int | (count) Unit: digital,B |
| messages | 消息数。 Type: int | (count) Unit: count |
ibm_mq_listener¶
| Tags & Fields | Description |
|---|---|
| listener ( tag) |
Listener 名称。 |
| status ( tag) |
Listener 状态。 |
| running | Listener 是否 RUNNING。 Type: int | (gauge) |
ibm_mq_cluster_qmgr¶
| Tags & Fields | Description |
|---|---|
| queue_manager ( tag) |
Queue Manager 名称。 |
| cluster_qmgr ( tag) |
Cluster Queue Manager 名称。 |
| status ( tag) |
Cluster Queue Manager 状态。 |
| channel ( tag) |
Cluster Queue Manager 关联通道。 |
| running | Cluster Queue Manager 是否 RUNNING。 Type: int | (gauge) |
ibm_mq_topic¶
| Tags & Fields | Description |
|---|---|
| queue_manager ( tag) |
Queue Manager 名称。 |
| topic ( tag) |
Topic 名称。 |
| publishers | publisher 数量。 Type: int | (gauge) Unit: count |
| subscribers | subscriber 数量。 Type: int | (gauge) Unit: count |
ibm_mq_subscription_summary¶
| Tags & Fields | Description |
|---|---|
| queue_manager ( tag) |
Queue Manager 名称。 |
| subscriptions | subscription 总数。 Type: int | (gauge) Unit: count |
| durable_subscriptions | durable subscription 数量。 Type: int | (gauge) Unit: count |
| admin_subscriptions | admin subscription 数量。 Type: int | (gauge) Unit: count |
自定义指标¶
自定义指标字段由 deep_metrics_command 输出决定。表中列出的字段会作为 tag;其他 key=value 中数字会作为 float | (gauge) field 上报,非数字会作为 tag。如果没有数字 field,会补充 count=1,单位为 count。
| Measurement | Tags | Description |
|---|---|---|
ibm_mq_authority |
object, object_type, principal |
自定义权限指标。 |
ibm_mq_event |
event_type, reason, object |
自定义事件指标。 |
ibm_mq_cluster |
cluster, status |
自定义集群指标。 |
ibm_mq_deep_metric |
metric, unit |
通用 IBM MQ 自定义指标。 |