Documentation

Set agent statuses

Agent statuses reflect the health of a Telegraf instance based on runtime data. The Telegraf heartbeat output plugin evaluates Common Expression Language (CEL) expressions against agent metrics, error counts, and plugin statistics to determine the status sent with each heartbeat.

Requires Telegraf v1.38.2+

Agent status evaluation in the Heartbeat output plugins requires Telegraf v1.38.2+.

Status values

Telegraf Controller displays the following agent statuses:

Status Source Description
Ok Heartbeat plugin The agent is healthy. Set when the ok CEL expression evaluates to true.
Warn Heartbeat plugin The agent has a potential issue. Set when the warn CEL expression evaluates to true.
Fail Heartbeat plugin The agent has a critical problem. Set when the fail CEL expression evaluates to true.
Undefined Heartbeat plugin No expression matched and the default is set to undefined, or the initial status is undefined.
Not Reporting Telegraf Controller The agent has not sent a heartbeat within the reporting rule threshold. Telegraf Controller applies this status automatically.

How status evaluation works

You define CEL expressions for ok, warn, and fail in the [outputs.heartbeat.status] section of your heartbeat plugin configuration. Telegraf evaluates expressions in a configurable order and assigns the status of the first expression that evaluates to true.

For full details on evaluation flow, configuration options, and available variables and functions, see the Agent status evaluation reference.

Configure agent statuses

To configure status evaluation, add "status" to the include list in your heartbeat plugin configuration and define CEL expressions in the [outputs.heartbeat.status] section.

Example: Basic health check

Report ok when metrics are flowing. If no metrics arrive, fall back to the fail status.

[[outputs.heartbeat]]
  url = "http://telegraf_controller.example.com/agents/heartbeat"
  instance_id = "&{agent_id}"
  token = "${INFLUX_TOKEN}"
  interval = "1m"
  include = ["hostname", "statistics", "configs", "logs", "status"]

  [outputs.heartbeat.status]
    ok = "metrics > 0"
    default = "fail"

Example: Error-based status

Warn when errors are logged, fail when the error count is high.

[[outputs.heartbeat]]
  url = "http://telegraf_controller.example.com/agents/heartbeat"
  instance_id = "&{agent_id}"
  token = "${INFLUX_TOKEN}"
  interval = "1m"
  include = ["hostname", "statistics", "configs", "logs", "status"]

  [outputs.heartbeat.status]
    ok = "log_errors == 0 && log_warnings == 0"
    warn = "log_errors > 0"
    fail = "log_errors > 10"
    order = ["fail", "warn", "ok"]
    default = "ok"

Example: Composite condition

Combine error count and buffer pressure signals.

[[outputs.heartbeat]]
  url = "http://telegraf_controller.example.com/agents/heartbeat"
  instance_id = "&{agent_id}"
  token = "${INFLUX_TOKEN}"
  interval = "1m"
  include = ["hostname", "statistics", "configs", "logs", "status"]

  [outputs.heartbeat.status]
    ok = "metrics > 0 && log_errors == 0"
    warn = "log_errors > 0 || (has(outputs.influxdb_v2) && outputs.influxdb_v2.exists(o, o.buffer_fullness > 0.8))"
    fail = "log_errors > 5 && has(outputs.influxdb_v2) && outputs.influxdb_v2.exists(o, o.buffer_fullness > 0.9)"
    order = ["fail", "warn", "ok"]
    default = "ok"

For more examples including buffer health, plugin-specific checks, and time-based expressions, see CEL expression examples.

View an agent’s status

  1. In Telegraf Controller, go to Agents.
  2. Check the Status column for each agent.
  3. To see more details, click the More button () and select View Details.
  4. The details page shows the reported status, reporting rule assignment, and the time of the last heartbeat.

Was this page helpful?

Thank you for your feedback!


New in InfluxDB 3.8

Key enhancements in InfluxDB 3.8 and the InfluxDB 3 Explorer 1.6.

See the Blog Post

InfluxDB 3.8 is now available for both Core and Enterprise, alongside the 1.6 release of the InfluxDB 3 Explorer UI. This release is focused on operational maturity and making InfluxDB easier to deploy, manage, and run reliably in production.

For more information, check out:

InfluxDB Docker latest tag changing to InfluxDB 3 Core

On May 27, 2026, the latest tag for InfluxDB Docker images will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments.

If using Docker to install and run InfluxDB, the latest tag will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments. For example, if using Docker to run InfluxDB v2, replace the latest version tag with a specific version tag in your Docker pull command–for example:

docker pull influxdb:2