Slo exporter itself is configured using one base YAML file.
Path to this file is configured using the --config-file
flag.
Additional configuration files might be needed by some modules
depending on their needs and if they are used in the pipeline at all.
Every configuration option in the base YAML file can be overridden (the configuration MUST be present in the yaml config for the ENV to be loaded, it can be even empty string) by using ENV variable.
The schema of ENV variable naming is SLO_EXPORTER_
prefix and than in uppercase any key of the YAML
structure in uppercase without any underscores. Underscores are used for separating nested structures.
Example: SLO_EXPORTER_WEBSERVERLISTENADDRESS=0.0.0.0:8080
or for module configuration SLO_EXPORTER_TAILER_TAILEDFILE=access.log
$ ./slo_exporter --help-long
usage: slo_exporter --config-file=CONFIG-FILE [<flags>]
Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
--config-file=CONFIG-FILE SLO exporter configuration file.
--log-level="info" Log level (error, warn, info, debug,trace).
--log-format="text" Log format (text, json).
--check-config Only check config file and exit with 0 if ok and other status code if not.
Slo-exporter allows to dynamically compose the pipeline structure, but there is few basic rules it needs to follow:
ingester
module cannot be at the beginning of pipeline.ingester
module can only be linked to precedingproducer
module.- Type of produced event by the preceding module must match the ingested type of the following one.
# Address where the web interface should listen on.
webServerListenAddress: "0.0.0.0:8080"
# Maximum time to wait for all events to be processed after receiving SIGTERM or SIGINT.
maximumGracefulShutdownDuration: "10s"
# How long to wait after processing pipeline has been shutdown before stopping http server w metric serving.
# Useful to make sure metrics are scraped by Prometheus. Ideally set it to Prometheus scrape interval + 1s or more.
# Should be less or equal to afterPipelineShutdownDelay
afterPipelineShutdownDelay: "1s"
# Defines architecture of the pipeline how the event will be processed by the modules.
pipeline: [<moduleType>]
# Contains configuration for distinct pipeline module.
modules:
<moduleType>: <moduleConfig>
Only produces new events from the specified data source.
Reads input events, does some processing based in the module type and produces modified event.
eventKeyGenerator
metadataClassifier
relabel
dynamicClassifier
statisticalClassifier
sloEventProducer
Only reads input events but does not produce any.
Details how they work and their moduleConfig
can be found in their own
linked documentation in the docs/modules folder.
Actual examples of usage with full configuration can be found in the examples/
directory.
If you want to verify that your configuration is valid, use the --check-config
flag.
Slo-exporter then just verifies if the configuration is valid and exits with status 0 if ok and 1 if not.