Skip to main content
Version: 0.8.x

Export to File

In order to export diagnosis data to a file, Lunar offers a straightforward setup process.

When a file exporter is configured and the export field of the diagnosis policy is set to "file," Lunar will write the output of a diagnosis plugin to a file.

Exporter Configuration

To begin, you will need to configure the file exporter. Here is an example configuration:

exporters:
file:
file_dir: "/var/log/lunar-proxy"
file_name: "output.log"

The following fields can be customized within the exporter configuration:

  • file_dir: Specifies the directory where the file will be created. It's important to ensure that the directory already exists.
  • file_name: Sets the name of the file to be generated. If a file with the same name already exists, it will be overwritten.
caution

To utilize the file exporter, you must configure a diagnosis plugin. For additional information, refer to the Diagnose & Export Plugins section.