influxdb
Use case
Write every result as one InfluxDB line-protocol line, for time-series dashboards/alerting (v1 or v2 write endpoint).
Configuration
token (if set) always wins over username/password, and is sent
verbatim as the Authorization header - no Bearer /Token prefix is
added for you. InfluxDB v1 and v2 authenticate differently, so pick the
block that matches your write endpoint:
# InfluxDB v1, auth enabled - /write?db=...
outputs:
- name: influx1
type: influxdb
url: http://influx.example.com:8086/write?db=cmt
username: cmt
password: xxxxxxx
single_measurement: false # true: one shared "cmt" measurement, module as a tag
send_tags: false # forward global.tags/conf.tags (tag_* items) as InfluxDB tags too
time_format: "" # msec|sec|nsec|"" (server-assigned, default)
http_code: 204 # expected status, 0 = don't check# InfluxDB v2 - /api/v2/write?org=...&bucket=...
outputs:
- name: influx1
type: influxdb
url: http://influx.example.com:8086/api/v2/write?org=myorg&bucket=cmt
token: "Token xxxxxxxxxxxxxxxx==" # the literal word "Token" is part of the value
single_measurement: false
send_tags: false
time_format: ""
http_code: 204No auth (open/local InfluxDB): omit both username/password and token.
Plus the fields common to every HTTP-based output (ssl_skipverify, http_proxy, timeout, prefix, fieldmap).
Output
- Measurement: the check’s module name (or a shared
cmtmeasurement withmoduleas a tag, ifsingle_measurement: true). - Tags:
group,env,node,check, every non-datapointCheckItem(module-specific tags likeurl, plustag_*items fromglobal.tags/conf.tagsonly whensend_tags: true),state,severity. - Fields: every datapoint
CheckItem, plusstate/severityagain (as fields too, so they’re queryable both ways). - Timestamp: only included per
time_format- left blank (server-assigned) by default.
Example
cmt --report --output influx1