You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the Docker monitoring template , I added indicators for the collection container mapping port and data volume, but only one port mapping and one data volume were collected, how can I collect information from containers with multiple port mappings and data volumes?
My Docker monitoring template:
fields:
- field: privateport
i18n:
zh-CN: 私有端口
en-US: privateport
type: 1
- field: publicport
i18n:
zh-CN: 公有端口
en-US: publicport
type: 1
- field: mountssource
i18n:
zh-CN: 挂载源
en-US: mountssource
type: 1
- field: mountsdestination
i18n:
zh-CN: 挂载目标
en-US: mountsdestination
type: 1
- field: volumename
i18n:
zh-CN: 数据卷名
en-US: volumename
type: 1
aliasFields:
- Id
- $.Names[0]
- Image
- Command
- $.HostConfig.NetworkMode
- $.NetworkSettings.Networks..IPAddress
- $.Ports[0].PrivatePort
- $.Ports[0].PublicPort
- $.Mounts[0].Type
- $.Mounts[0].Source
- $.Mounts[0].Destination
- $.Mounts[0].Name
- State
- Status
calculates:
- id = Id
- name=#$.Names[0]
- image = Image
- command = Command
- networkmode = $.HostConfig.NetworkMode
- ipaddress = $.NetworkSettings.Networks..IPAddress
- privateport = $.Ports[0].PrivatePort
- publicport = $.Ports[0].PublicPort
- mountstype = $.Mounts[0].Type
- mountssource = $.Mounts[0].Source
- mountsdestination = $.Mounts[0].Destination
- volumename = $.Mounts[0].Name
- state = State
- status = Status
# Protocols used for monitoring and collection eg: sql, ssh, http, telnet, wmi, snmp, sdk
# 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk
protocol: http
# When the protocol is the http protocol, the specific collection configuration
# 当protocol为http协议时具体的采集配置
http:
# Host host: ipv4 ipv6 domain name
# 主机host: ipv4 ipv6 域名
host: ^^host^^
# port
# 端口
port: ^^port^^
# url request interface path
# url请求接口路径
url: /containers/json?all=true
# # request method GET POST PUT DELETE PATCH
# 请求方式 GET POST PUT DELETE PATCH
method: GET
# Whether to enable ssl/tls, that is, http or https, the default is false
# 是否启用ssl/tls,即是http还是https,默认false
ssl: ^^ssl^^
# Response data analysis method: default-system rules, jsonPath-jsonPath script, website-api usability metric monitoring
# 响应数据解析方式: default-系统规则,jsonPath-jsonPath脚本,website-api可用性指标监控
parseType: jsonPath
parseScript: '$.*'
The text was updated successfully, but these errors were encountered:
Question
According to the Docker monitoring template , I added indicators for the collection container mapping port and data volume, but only one port mapping and one data volume were collected, how can I collect information from containers with multiple port mappings and data volumes?
My Docker monitoring template:
fields:
- field: privateport
i18n:
zh-CN: 私有端口
en-US: privateport
type: 1
- field: publicport
i18n:
zh-CN: 公有端口
en-US: publicport
type: 1
- field: mountssource
i18n:
zh-CN: 挂载源
en-US: mountssource
type: 1
- field: mountsdestination
i18n:
zh-CN: 挂载目标
en-US: mountsdestination
type: 1
- field: volumename
i18n:
zh-CN: 数据卷名
en-US: volumename
type: 1
aliasFields:
- Id
- $.Names[0]
- Image
- Command
- $.HostConfig.NetworkMode
- $.NetworkSettings.Networks..IPAddress
- $.Ports[0].PrivatePort
- $.Ports[0].PublicPort
- $.Mounts[0].Type
- $.Mounts[0].Source
- $.Mounts[0].Destination
- $.Mounts[0].Name
- State
- Status
calculates:
- id = Id
- name=#
$.Names[0]
- image = Image
- command = Command
- networkmode = $.HostConfig.NetworkMode
- ipaddress = $.NetworkSettings.Networks..IPAddress
- privateport = $.Ports[0].PrivatePort
- publicport = $.Ports[0].PublicPort
- mountstype = $.Mounts[0].Type
- mountssource = $.Mounts[0].Source
- mountsdestination = $.Mounts[0].Destination
- volumename = $.Mounts[0].Name
- state = State
- status = Status
# Protocols used for monitoring and collection eg: sql, ssh, http, telnet, wmi, snmp, sdk
# 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk
protocol: http
# When the protocol is the http protocol, the specific collection configuration
# 当protocol为http协议时具体的采集配置
http:
# Host host: ipv4 ipv6 domain name
# 主机host: ipv4 ipv6 域名
host: ^^host^^
# port
# 端口
port: ^^port^^
# url request interface path
# url请求接口路径
url: /containers/json?all=true
# # request method GET POST PUT DELETE PATCH
# 请求方式 GET POST PUT DELETE PATCH
method: GET
# Whether to enable ssl/tls, that is, http or https, the default is false
# 是否启用ssl/tls,即是http还是https,默认false
ssl: ^^ssl^^
# Response data analysis method: default-system rules, jsonPath-jsonPath script, website-api usability metric monitoring
# 响应数据解析方式: default-系统规则,jsonPath-jsonPath脚本,website-api可用性指标监控
parseType: jsonPath
parseScript: '$.*'
The text was updated successfully, but these errors were encountered: