Telegraf Controller configuration options
Telegraf Controller accepts configuration through environment variables and,
in many cases, equivalent command-line flags. You can also load environment
variables from a .env file in the working directory where you start
Telegraf Controller.
Configure Telegraf Controller
Pass configuration options using command-line flags or environment variables. Command-line flags take precedence over environment variables.
Use a .env file
Telegraf Controller loads environment variables from a .env file in the
working directory where you start the application. Use a .env file to keep
sensitive values out of shell history and to share configuration across
processes.
# .env
APP_PORT=3000
HEARTBEAT_PORT=9000
DATABASE_URL=postgresql://user:password@localhost:5432/telegraf_controller
TELEGRAF_CONTROLLER_EULA=acceptExample: command flags
telegraf_controller \
--port=3000 \
--heartbeat-port=9000 \
--database="postgresql://user:password@localhost:5432/telegraf_controller" \
--eula-accept \
--no-interactiveExample: environment variables
export APP_PORT=3000
export HEARTBEAT_PORT=9000
export DATABASE_URL="postgresql://user:password@localhost:5432/telegraf_controller"
export TELEGRAF_CONTROLLER_EULA=accept
telegraf_controller --no-interactiveConfiguration options
- General
- TLS
- Database TLS
- Owner account
- Authentication and security
- Logging
- Audit logging
- EULA and setup
- Licensing
General
port
Web interface and API port.
Default: 8888
| Command flag | Environment variable |
|---|---|
--port | APP_PORT |
heartbeat-port
Agent heartbeat service port.
Default: 8000
| Command flag | Environment variable |
|---|---|
--heartbeat-port | HEARTBEAT_PORT |
database
Database connection URL or filesystem path. Telegraf Controller supports SQLite and PostgreSQL.
Default: file:./sqlite.db
# PostgreSQL
telegraf_controller --database="postgresql://user:password@localhost:5432/telegraf_controller"
# Custom SQLite path
telegraf_controller --database="/path/to/database.db"| Command flag | Environment variable |
|---|---|
--database | DATABASE_URL |
TLS
Provide both a certificate and a private key to serve the Telegraf Controller web interface, API, and the agent heartbeat service over HTTPS. The web interface, API, and heartbeat service share the same certificate and key.
For a full walkthrough that includes configuring agents to trust the certificate, see Secure Telegraf Controller with TLS.
Provide both the certificate and the key
The certificate and key are required together. If you set only one of
ssl-cert-path or ssl-key-path,
Telegraf Controller logs a warning and serves plain HTTP. When both are set,
the certificate and key must be valid PEM files. An invalid certificate or
key prevents the heartbeat service from starting.
ssl-cert-path
Path to a PEM-encoded SSL/TLS certificate. Set this together with
ssl-key-path to enable HTTPS.
| Command flag | Environment variable |
|---|---|
--ssl-cert | SSL_CERT_PATH |
ssl-key-path
Path to the PEM-encoded SSL/TLS private key that matches
ssl-cert-path. Set this together with the certificate to
enable HTTPS.
| Command flag | Environment variable |
|---|---|
--ssl-key | SSL_KEY_PATH |
Database TLS
When you connect Telegraf Controller to PostgreSQL, use the following options to encrypt the database connection and to control how Telegraf Controller verifies the PostgreSQL server’s certificate. These options apply only to PostgreSQL connections and have no effect when you use SQLite.
sslmode
Set sslmode as a query parameter in the PostgreSQL
database connection URL to control whether Telegraf Controller
uses TLS and whether it verifies the server certificate.
telegraf_controller \
--database="postgresql://user:password@localhost:5432/telegraf_controller?sslmode=verify-full&sslrootcert=/etc/ssl/certs/ca.pem"Telegraf Controller supports the following sslmode values:
sslmode | Connection behavior |
|---|---|
disable | Connect without TLS. |
allow | Use TLS if the server supports it. Equivalent to prefer. |
prefer | Use TLS if the server supports it, otherwise connect without it. |
require | Require TLS, but do not verify the server certificate unless you also provide a CA certificate. |
verify-ca | Require TLS and verify the server certificate against a CA certificate. Requires a CA certificate. |
verify-full | Require TLS and verify the server certificate against a CA certificate. Requires a CA certificate. |
To verify the server certificate, provide a CA certificate with
sslrootcert, database-ca-cert, or
PGSSLROOTCERT. If you request verification but do not provide a CA
certificate, Telegraf Controller falls back to the system trust store.
Client certificate authentication is not supported
Telegraf Controller does not support PostgreSQL client certificate
authentication. Telegraf Controller ignores the sslcert and sslkey
connection parameters and logs a warning if you set them.
sslrootcert
Path to a PEM-encoded CA certificate used to verify the PostgreSQL server’s
certificate. Set sslrootcert as a query parameter in the
database connection URL. This is equivalent to setting
database-ca-cert. When you provide a CA certificate,
Telegraf Controller verifies the server certificate even if
database-ssl-no-verify is set.
database-ca-cert
Path to a PEM-encoded CA certificate used to verify the PostgreSQL server’s
certificate. Use this environment variable as an alternative to the
sslrootcert connection parameter. Telegraf Controller also
accepts the standard PGSSLROOTCERT environment variable for the same purpose.
| Command flag | Environment variable |
|---|---|
| (none) | DATABASE_CA_CERT |
database-ssl-no-verify
When set to 1, true, or yes, Telegraf Controller encrypts the
PostgreSQL connection but does not verify the server certificate.
Use this only for development or troubleshooting. If you also provide a CA
certificate, Telegraf Controller verifies the server certificate and ignores
this setting.
Default: false
| Command flag | Environment variable |
|---|---|
| (none) | DATABASE_SSL_NO_VERIFY |
Owner account
Use the following options to bootstrap the owner account with non-default values on first startup of Telegraf Controller. The owner account has full administrative access to Telegraf Controller.
Bootstrap-only settings
On first startup, Telegraf Controller persists OWNER_EMAIL,
OWNER_USERNAME, OWNER_PASSWORD, OWNER_AUTH_PROVIDER, and
OWNER_EXTERNAL_ID in the database; the database is the authoritative
source thereafter. Changes to these environment variables or CLI flags
do not affect the stored values. To change owner account details after
bootstrap, use the Telegraf Controller UI or API.
owner-email
Email address for the bootstrap owner account.
| Command flag | Environment variable |
|---|---|
--owner-email | OWNER_EMAIL |
owner-username
Username for the bootstrap owner account.
| Command flag | Environment variable |
|---|---|
--owner-username | OWNER_USERNAME |
owner-password
Password for the bootstrap owner account. Also used as the new password when
RESET_OWNER_PASSWORD forces a password reset.
| Command flag | Environment variable |
|---|---|
--owner-password | OWNER_PASSWORD |
reset-owner-password
When set to true, forces an owner password reset on the next startup using
OWNER_PASSWORD as the new password.
Use RESET_OWNER_PASSWORD only to recover from a forgotten or compromised
owner password. Unset the variable after the password has been reset to
avoid resetting the password on subsequent restarts.
| Command flag | Environment variable |
|---|---|
| (none) | RESET_OWNER_PASSWORD |
owner-auth-provider
Primary authentication provider for the bootstrap owner account. Set this when you intend to disable local authentication after bootstrap. The owner can still sign in with the bootstrap password as a recovery credential.
Supported values: local, ldap, oidc
Default: local
| Command flag | Environment variable |
|---|---|
| (none) | OWNER_AUTH_PROVIDER |
owner-external-id
External identifier that links the bootstrap owner to its identity in an
external authentication provider. Required when
owner-auth-provider is ldap or oidc.
- For LDAP, set to the user’s distinguished name (DN), for example
uid=alice,ou=people,dc=example,dc=com. - For OIDC, set to the
subclaim from the ID token.
| Command flag | Environment variable |
|---|---|
| (none) | OWNER_EXTERNAL_ID |
Authentication and security
LDAP authentication (Telegraf Enterprise)
OIDC authentication (Telegraf Enterprise)
session-secret
Secret used to encrypt session cookies. Telegraf Controller generates a value automatically if you do not set one. Set an explicit value to keep existing sessions valid across restarts.
Default: Generated at startup
| Command flag | Environment variable |
|---|---|
--session-secret | SESSION_SECRET |
disable-auth-endpoints
Comma-separated list of API endpoint groups to skip authentication for.
Use "*" to disable authentication for all endpoint groups.
Valid endpoint groups:
agentsconfigslabelsreporting-rulesheartbeat
Telegraf Controller reads this value once at startup; the value is immutable at runtime. Anyone with network access to the listed endpoint groups can use them without an API token.
# Disable authentication on agents and heartbeat only
telegraf_controller --disable-auth-endpoints=agents,heartbeat
# Disable authentication on all endpoint groups
telegraf_controller --disable-auth-endpoints="*"| Command flag | Environment variable |
|---|---|
--disable-auth-endpoints | DISABLED_AUTH_ENDPOINTS |
Local authentication
Local authentication is enabled by default and is the only authentication
provider available without a
Telegraf Enterprise license.
The variables in this group apply only when
auth-local-enabled is true. LDAP and OIDC
providers enforce their own credential and lockout policies.
For setup details, see Configure local authentication.
auth-local-enabled
Enable username and password authentication using credentials stored in Telegraf Controller. Read once at startup; immutable at runtime.
Set this to false to require sign-in through an external provider
(LDAP or OIDC). When disabled, the owner must have been bootstrapped with
owner-auth-provider and
owner-external-id set to the external provider.
Default: true
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_LOCAL_ENABLED |
For setup details, see Configure local authentication.
Bootstrap-only login security settings
On first startup, Telegraf Controller persists LOGIN_LOCKOUT_ATTEMPTS,
LOGIN_LOCKOUT_MINUTES, and PASSWORD_COMPLEXITY in the database; the
database is the authoritative source thereafter. Changes to these
environment variables do not affect the stored values. To change these
settings after bootstrap, use the Telegraf Controller UI.
login-lockout-attempts
Number of failed login attempts allowed before an account is locked out.
Minimum: 1.
Default: 5
| Command flag | Environment variable |
|---|---|
| (none) | LOGIN_LOCKOUT_ATTEMPTS |
login-lockout-minutes
Number of minutes a locked-out account remains locked.
Minimum: 1.
Default: 15
| Command flag | Environment variable |
|---|---|
| (none) | LOGIN_LOCKOUT_MINUTES |
password-complexity
Password complexity level applied to all password operations, including initial setup, password changes, password resets, and invite completion.
| Level | Min length | Uppercase | Lowercase | Digits | Special characters |
|---|---|---|---|---|---|
low | 8 | No | No | No | No |
medium | 10 | Yes | Yes | Yes | No |
high | 12 | Yes | Yes | Yes | Yes |
Default: low
| Command flag | Environment variable |
|---|---|
| (none) | PASSWORD_COMPLEXITY |
LDAP authentication
LDAP authentication is a
Telegraf Enterprise feature.
If AUTH_LDAP_* variables are set on an unlicensed instance,
Telegraf Controller starts normally, logs a warning, and leaves LDAP
inactive until a license is applied and the application is restarted.
All AUTH_LDAP_* variables are read once at startup and are immutable at
runtime. Provisioning rules, default role, allowed domains, and
group-to-role mappings are runtime-editable from the Settings page.
For setup details, see Configure LDAP authentication.
auth-ldap-enabled
Enable LDAP authentication.
Default: false
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_LDAP_ENABLED |
auth-ldap-url
LDAP server URL. Must use the ldap:// or ldaps:// scheme.
Required when auth-ldap-enabled is true.
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_LDAP_URL |
auth-ldap-bind-dn
Distinguished name (DN) of the service account that
Telegraf Controller binds as to search for users.
Required when auth-ldap-enabled is true.
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_LDAP_BIND_DN |
auth-ldap-bind-password
Password for the service account specified by
auth-ldap-bind-dn.
Required when auth-ldap-enabled is true.
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_LDAP_BIND_PASSWORD |
auth-ldap-user-search-base
Base DN under which Telegraf Controller searches for user entries
(for example, ou=people,dc=example,dc=com).
Required when auth-ldap-enabled is true.
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_LDAP_USER_SEARCH_BASE |
auth-ldap-user-search-filter
LDAP filter used to locate a user. The literal token {{username}} is
replaced with the value the user types on the sign-in page.
Default: (uid={{username}})
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_LDAP_USER_SEARCH_FILTER |
auth-ldap-start-tls
When true, upgrade an unencrypted ldap:// connection to TLS using
StartTLS before binding. Ignored for ldaps:// connections.
Default: false
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_LDAP_START_TLS |
auth-ldap-ca-cert-path
Path to a PEM-encoded certificate authority used to verify the LDAP server’s TLS certificate. Use this when your LDAP server is signed by a private CA not in the system trust store.
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_LDAP_CA_CERT_PATH |
auth-ldap-reject-unauthorized
When false, accept any TLS certificate the LDAP server presents.
For development and troubleshooting only.
Default: true
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_LDAP_REJECT_UNAUTHORIZED |
auth-ldap-attr-username
LDAP attribute that supplies the Telegraf Controller username for an authenticated user.
Default: sAMAccountName
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_LDAP_ATTR_USERNAME |
auth-ldap-attr-email
LDAP attribute that supplies the user’s email address.
Default: mail
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_LDAP_ATTR_EMAIL |
auth-ldap-attr-display-name
LDAP attribute that supplies the user’s display name.
Default: displayName
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_LDAP_ATTR_DISPLAY_NAME |
auth-ldap-attr-groups
LDAP attribute that supplies the user’s group memberships. Telegraf Controller matches values from this attribute against the group-to-role mappings configured on the Settings page.
Default: memberOf
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_LDAP_ATTR_GROUPS |
OIDC authentication
OIDC authentication is a
Telegraf Enterprise feature.
If AUTH_OIDC_* variables are set on an unlicensed instance,
Telegraf Controller starts normally, logs a warning, and leaves OIDC
inactive until a license is applied and the application is restarted.
Telegraf Controller always uses authorization code flow with PKCE
(S256). All AUTH_OIDC_* variables are read once at startup and are
immutable at runtime. Provisioning rules, default role, allowed domains,
and group-to-role mappings are runtime-editable from the Settings
page.
For setup details, see Configure OIDC authentication.
auth-oidc-enabled
Enable OIDC authentication.
Default: false
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_OIDC_ENABLED |
auth-oidc-issuer
OIDC issuer URL.
Required when auth-oidc-enabled is true.
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_OIDC_ISSUER |
auth-oidc-client-id
OAuth2 client identifier registered with the OIDC provider.
Required when auth-oidc-enabled is true.
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_OIDC_CLIENT_ID |
auth-oidc-client-secret
OAuth2 client secret.
Required when auth-oidc-enabled is true.
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_OIDC_CLIENT_SECRET |
auth-oidc-redirect-uri
Full callback URL registered with the OIDC provider. Must end with
/api/auth/oidc/callback.
Required when auth-oidc-enabled is true.
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_OIDC_REDIRECT_URI |
auth-oidc-scopes
Space-separated list of OAuth2 scopes to request. openid is added
automatically if missing.
Default: openid profile email
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_OIDC_SCOPES |
auth-oidc-username-claim
Name of the ID-token claim used as the Telegraf Controller username.
Default: preferred_username
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_OIDC_USERNAME_CLAIM |
auth-oidc-groups-claim
Name of the ID-token claim that contains the user’s group memberships. Telegraf Controller matches values from this claim against the group-to-role mappings configured on the Settings page.
Default: groups
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_OIDC_GROUPS_CLAIM |
auth-oidc-display-name
Friendly name displayed on the Sign in with… button on the sign-in page. The Settings > OIDC Authentication panel can override this value at runtime.
Default: SSO
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_OIDC_DISPLAY_NAME |
auth-oidc-post-login-redirect
Path inside Telegraf Controller where users are sent after a successful OIDC callback.
Default: /
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_OIDC_POST_LOGIN_REDIRECT |
auth-oidc-allow-insecure
When true, allow http:// issuer URLs and callback URLs.
For development only. Telegraf Controller logs a warning at startup when
this is enabled.
Default: false
| Command flag | Environment variable |
|---|---|
| (none) | AUTH_OIDC_ALLOW_INSECURE |
Logging
rust-log
Tracing level for the Rust heartbeat server. Supports trace, debug,
info, warn, and error.
Default: info
| Command flag | Environment variable |
|---|---|
| (none) | RUST_LOG |
logs-dir
Absolute path for heartbeat agent logs.
Default: System temp directory
| Command flag | Environment variable |
|---|---|
--logs-dir | LOGS_DIR |
Audit logging
Audit logging is a Telegraf Enterprise feature. All of the following options are read at startup only; changes after startup require a restart. For a task-based walkthrough, see Enable and configure audit logging.
- audit-enabled
- audit-log-retention
- audit-syslog-host
- audit-syslog-port
- audit-syslog-protocol
- audit-webhook-url
- audit-webhook-auth-header
- audit-file-path
audit-enabled
Enable audit logging on startup. Audit logging requires a Telegraf Enterprise license to take effect.
Default: false
| Command flag | Environment variable |
|---|---|
--audit-enabled | AUDIT_LOGGING_ENABLED |
audit-log-retention
Sets the initial audit log retention period, in hours. Telegraf Controller persists this value to the database on first startup; later changes to the environment variable have no effect. Update retention after first startup from the Settings page.
Supported values: 720 (30 days), 2160 (90 days), 4320 (180 days),
8760 (1 year), 17520 (2 years), or 0 (infinite).
Default: 2160
| Command flag | Environment variable |
|---|---|
| (none) | AUDIT_LOG_RETENTION |
audit-syslog-host
Hostname or IP address of a syslog server.
When set together with audit-syslog-port and
audit-syslog-protocol,
Telegraf Controller forwards each audit event to the configured syslog
destination.
| Command flag | Environment variable |
|---|---|
--audit-syslog-host | AUDIT_SYSLOG_HOST |
audit-syslog-port
Port number of the syslog server. Required to enable syslog forwarding.
| Command flag | Environment variable |
|---|---|
--audit-syslog-port | AUDIT_SYSLOG_PORT |
audit-syslog-protocol
Transport protocol used to deliver audit events to the syslog server. Required to enable syslog forwarding.
Supported values: tcp, udp
| Command flag | Environment variable |
|---|---|
--audit-syslog-protocol | AUDIT_SYSLOG_PROTOCOL |
audit-webhook-url
URL that receives each audit event as a JSON-encoded HTTP POST request.
Telegraf Controller retries each delivery up to three times with backoff
and honors Retry-After response headers.
| Command flag | Environment variable |
|---|---|
--audit-webhook-url | AUDIT_WEBHOOK_URL |
audit-webhook-auth-header
Optional value sent as the Authorization HTTP header on webhook requests.
Use it to pass a bearer token, basic-auth credential, or other shared
secret your webhook endpoint requires.
| Command flag | Environment variable |
|---|---|
--audit-webhook-auth-header | AUDIT_WEBHOOK_AUTH_HEADER |
audit-file-path
Absolute path to a local file.
When set, Telegraf Controller appends each audit event as a single JSON
object on its own line (.jsonl format).
The path must be writable by the Telegraf Controller process.
Telegraf Controller does not rotate or trim this file. Pair it with a system log rotator if you keep the forwarder on long term.
| Command flag | Environment variable |
|---|---|
--audit-file-path | AUDIT_FILE_PATH |
EULA and setup
eula-accept
Accept the InfluxData End User License Agreement
non-interactively. The TELEGRAF_CONTROLLER_EULA environment variable accepts
the value accept to indicate acceptance.
| Command flag | Environment variable |
|---|---|
--eula-accept | TELEGRAF_CONTROLLER_EULA |
no-interactive
Skip interactive prompts at startup. When --no-interactive is set, you must
provide owner account values and EULA acceptance through other options.
| Command flag | Environment variable |
|---|---|
--no-interactive | (none) |
Licensing
license-file-path
Path to a Telegraf Enterprise license JWT file. Telegraf Controller reads this file on startup, validates the license, and stores it in the database. If the database already contains a license, this variable is ignored on subsequent restarts.
If the file is missing, unreadable, or contains an invalid license, Telegraf Controller starts in unlicensed mode and logs the validation error.
See Apply a license for full guidance, including systemd examples.
| Command flag | Environment variable |
|---|---|
| (none) | LICENSE_FILE_PATH |
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for Telegraf and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.