Documentation

Logging in InfluxDB

This page documents an earlier version of InfluxDB. InfluxDB v2.6 is the latest stable version.

InfluxDB writes log output, by default, to stderr. Depending on your use case, this log information can be written to another location.

Running InfluxDB directly

If you run InfluxDB directly, using influxd, all logs will be written to stderr. You may redirect this log output as you would any output to stderr like so:

influxd 2>$HOME/my_log_file

Launched as a service

sysvinit

If InfluxDB was installed using a pre-built package, and then launched as a service, stderr is redirected to /var/log/influxdb/influxd.log, and all log data will be written to that file. You can override this location by setting the variable STDERR in the file /etc/default/influxdb.

Note: On macOS the logs, by default, are stored in the file /usr/local/var/log/influxdb.log

For example, if /etc/default/influxdb contains:

STDERR=/dev/null

all log data will be discarded. You can similarly direct output to stdout by setting STDOUT in the same file. Output to stdout is sent to /dev/null by default when InfluxDB is launched as a service.

InfluxDB must be restarted to pick up any changes to /etc/default/influxdb.

systemd

Starting with version 1.0, InfluxDB on systemd systems will no longer write files to /var/log/influxdb by default, and will now use the system configured default for logging (usually journald). On most systems, the logs will be directed to the systemd journal and can be accessed with the command:

sudo journalctl -u influxdb.service

Please consult the systemd journald documentation for configuring journald.

Using logrotate

You can use logrotate to rotate the log files generated by InfluxDB on systems where logs are written to flat files. If using the package install on a sysvinit system, the config file for logrotate is installed in /etc/logrotate.d. You can view the file here.


Was this page helpful?

Thank you for your feedback!


Set your InfluxDB URL

Linux Package Signing Key Rotation

All signed InfluxData Linux packages have been resigned with an updated key. If using Linux, you may need to update your package configuration to continue to download and verify InfluxData software packages.

For more information, see the Linux Package Signing Key Rotation blog post.

InfluxDB Cloud backed by InfluxDB IOx

All InfluxDB Cloud organizations created on or after January 31, 2023 are backed by the new InfluxDB IOx storage engine. Check the right column of your InfluxDB Cloud organization homepage to see which InfluxDB storage engine you’re using.

If powered by IOx, this is the correct documentation.

If powered by TSM, see the TSM-based InfluxDB Cloud documentation.

InfluxDB Cloud backed by InfluxDB TSM

All InfluxDB Cloud organizations created on or after January 31, 2023 are backed by the new InfluxDB IOx storage engine which enables nearly unlimited series cardinality and SQL query support. Check the right column of your InfluxDB Cloud organization homepage to see which InfluxDB storage engine you’re using.

If powered by TSM, this is the correct documentation.

If powered by IOx, see the IOx-based InfluxDB Cloud documentation.

State of the InfluxDB Cloud (IOx) documentation

The new documentation for InfluxDB Cloud backed by InfluxDB IOx is a work in progress. We are adding new information and content almost daily. Thank you for your patience!

If there is specific information you’re looking for, please submit a documentation issue.