Documentation

CEL variables

Telegraf Controller is in Public Beta

Telegraf Controller is in public beta and will be part of the future Telegraf Enterprise offering. While in beta, Telegraf Controller is not meant for production use. The Telegraf Controller documentation is a work in progress, and we are actively working to improve it. If you have any questions or suggestions, please submit an issue. We welcome any and all contributions.

Beta expectations

Provide beta feedback

CEL expressions for agent status evaluation have access to variables that represent data collected by Telegraf since the last successful heartbeat message (unless noted otherwise).

Top-level variables

VariableTypeDescription
metricsintNumber of metrics arriving at the heartbeat output plugin.
log_errorsintNumber of errors logged by the Telegraf instance.
log_warningsintNumber of warnings logged by the Telegraf instance.
last_updatetimeTimestamp of the last successful heartbeat message. Use with now() to calculate durations or rates.
agentmapAgent-level statistics. See Agent statistics.
inputsmapInput plugin statistics. See Input plugin statistics.
outputsmapOutput plugin statistics. See Output plugin statistics.

Agent statistics

The agent variable is a map containing aggregate statistics for the entire Telegraf instance. These fields correspond to the internal_agent metric from the Telegraf internal input plugin.

FieldTypeDescription
agent.metrics_writtenintTotal metrics written by all output plugins.
agent.metrics_rejectedintTotal metrics rejected by all output plugins.
agent.metrics_droppedintTotal metrics dropped by all output plugins.
agent.metrics_gatheredintTotal metrics collected by all input plugins.
agent.gather_errorsintTotal collection errors across all input plugins.
agent.gather_timeoutsintTotal collection timeouts across all input plugins.

Example

agent.gather_errors > 0

Input plugin statistics (inputs)

The inputs variable is a map where each key is a plugin type (for example, cpu for inputs.cpu) and the value is a list of plugin instances. Each entry in the list represents one configured instance of that plugin type.

These fields correspond to the internal_gather metric from the Telegraf internal input plugin.

FieldTypeDescription
idstringUnique plugin identifier.
aliasstringAlias set for the plugin. Only exists if an alias is defined in the plugin configuration.
errorsintCollection errors for this plugin instance.
metrics_gatheredintNumber of metrics collected by this instance.
gather_time_nsintTime spent gathering metrics, in nanoseconds.
gather_timeoutsintNumber of timeouts during metric collection.
startup_errorsintNumber of times the plugin failed to start.

Access patterns

Access a specific plugin type and iterate over its instances:

// Check if any cpu input instance has errors
inputs.cpu.exists(i, i.errors > 0)
// Access the first instance of the cpu input
inputs.cpu[0].metrics_gathered

Use has() to safely check if a plugin type exists before accessing it:

// Safe access — returns false if no cpu input is configured
has(inputs.cpu) && inputs.cpu.exists(i, i.errors > 0)

Output plugin statistics (outputs)

The outputs variable is a map with the same structure as inputs. Each key is a plugin type (for example, influxdb_v3 for outputs.influxdb_v3) and the value is a list of plugin instances.

These fields correspond to the internal_write metric from the Telegraf internal input plugin.

FieldTypeDescription
idstringUnique plugin identifier.
aliasstringAlias set for the plugin. Only exists if an alias is defined in the plugin configuration.
errorsintWrite errors for this plugin instance.
metrics_filteredintNumber of metrics filtered by the output.
write_time_nsintTime spent writing metrics, in nanoseconds.
startup_errorsintNumber of times the plugin failed to start.
metrics_addedintNumber of metrics added to the output buffer.
metrics_writtenintNumber of metrics written to the output destination.
metrics_rejectedintNumber of metrics rejected by the service or serialization.
metrics_droppedintNumber of metrics dropped (for example, due to buffer fullness).
buffer_sizeintCurrent number of metrics in the output buffer.
buffer_limitintCapacity of the output buffer. Irrelevant for disk-based buffers.
buffer_fullnessfloatRatio of metrics in the buffer to capacity. Can exceed 1.0 (greater than 100%) for disk-based buffers.

Access patterns

// Access the first instance of the InfluxDB v3 output plugin
outputs.influxdb_v3[0].metrics_written
// Check if any InfluxDB v3 output has write errors
outputs.influxdb_v3.exists(o, o.errors > 0)
// Check buffer fullness across all instances of an output
outputs.influxdb_v3.exists(o, o.buffer_fullness > 0.8)

Use has() to safely check if a plugin type exists before accessing it:

// Safe access — returns false if no cpu input is configured
has(outputs.influxdb_v3) && outputs.influxdb_v3.exists(o, o.errors > 0)

Accumulation behavior

Unless noted otherwise, all variable values are accumulated since the last successful heartbeat message. Use the last_update variable with now() to calculate rates — for example:

// True if the error rate exceeds 1 error per minute
log_errors > 0 && duration.getMinutes(now() - last_update) > 0
  && log_errors / duration.getMinutes(now() - last_update) > 1

Was this page helpful?

Thank you for your feedback!


Telegraf Enterprise now in public beta

Get early access to the Telegraf Controller and provide feedback to help shape the future of Telegraf Enterprise.

See the Blog Post

The upcoming Telegraf Enterprise offering is for organizations running Telegraf at scale and is comprised of two key components:

  • Telegraf Controller: A control plane (UI + API) that centralizes Telegraf configuration management and agent health visibility.
  • Telegraf Enterprise Support: Official support for Telegraf Controller and Telegraf plugins.

Join the Telegraf Enterprise beta to get early access to the Telegraf Controller and provide feedback to help shape the future of Telegraf Enterprise.

For more information:

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