跳转至

AIX WebSphere

AIX WebSphere input 通过 serverStatus.sh 采集 server 状态,并支持 metrics_command 输出 JVM、线程池、HTTP session 等指标。

配置

[inputs]
# 中间件 input 总开关。
enabled = true

[[inputs.websphere]]
# 实例名,会作为 instance tag。
name = "AppSrv01"
# 是否启用该 WebSphere 实例采集。
enabled = true
# 采集间隔。
interval = "60s"
# 可选,采集前加载实例环境变量。
env_file = ""
# WebSphere profile 路径。
profile_path = "/opt/IBM/WebSphere/AppServer/profiles/AppSrv01"
server_status = "/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/serverStatus.sh"
server_name = "server1"
# 可选,自定义命令输出 JVM、线程池、session 指标。
metrics_command = ""
# 可选,自定义指标命令,输出 key=value 行。
deep_metrics_command = ""

命令依赖

命令 说明
serverStatus.sh -all 采集 WebSphere server 启停状态。
metrics_command 自定义命令,输出 JVM、线程池、session 指标。
deep_metrics_command 自定义命令,输出 key=value 行,采集自定义指标。

指标

所有指标都会追加 hostinput=websphereinstance=<name> 标签。

websphere

Tags & Fields Description
server
(tag)
server 名称。
up 是否存在 started server。
Type: int | (gauge)
started_servers STARTED server 数量。
Type: int | (gauge)
Unit: count
stopped_servers STOPPED server 数量。
Type: int | (gauge)
Unit: count
其他字段 metrics_command 输出的数值型 key=value 字段。
Type: float | (gauge)

websphere_jvm

Tags & Fields Description
server
(tag)
server 名称。
jvm
(tag)
JVM 名称。
heap_used_mb 已用 heap。
Type: float | (gauge)
Unit: digital,MB
heap_committed_mb committed heap。
Type: float | (gauge)
Unit: digital,MB
heap_max_mb 最大 heap。
Type: float | (gauge)
Unit: digital,MB
threads 线程数。
Type: float | (gauge)
Unit: count
gc_count GC 次数。
Type: float | (count)
Unit: count
gc_time_ms GC 时间。
Type: float | (count)
Unit: time,ms

websphere_thread_pool

Tags & Fields Description
thread_pool
(tag)
线程池名称。
active 活跃线程数。
Type: float | (gauge)
Unit: count
pool_size 线程池大小。
Type: float | (gauge)
Unit: count
hung hung 线程数。
Type: float | (gauge)
Unit: count
declared_thread_hung declared hung 数。
Type: float | (count)
Unit: count
cleared_thread_hung cleared hung 数。
Type: float | (count)
Unit: count

websphere_http_session

Tags & Fields Description
application
(tag)
应用名称。
live 当前 live session 数。
Type: float | (gauge)
Unit: count
created 创建 session 数。
Type: float | (count)
Unit: count
invalidated invalidated session 数。
Type: float | (count)
Unit: count
timeout_invalidated timeout invalidated session 数。
Type: float | (count)
Unit: count

自定义指标

自定义指标字段由 deep_metrics_command 输出决定。表中列出的字段会作为 tag;其他 key=value 中数字会作为 float | (gauge) field 上报,非数字会作为 tag。如果没有数字 field,会补充 count=1,单位为 count

Measurement Tags Description
websphere_pmi metric, module, unit 自定义 PMI 指标。
websphere_jmx mbean, attribute, unit 自定义 JMX 指标。
websphere_application application, module, status 自定义应用指标。
websphere_deep_metric metric, unit 通用 WebSphere 自定义指标。

文档评价

文档内容是否对您有帮助? ×