From 4b8a93426ff37698fecb9f11560f5b7d5add56c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Sun, 3 Dec 2017 11:50:15 -0800 Subject: [PATCH] Add docs on passing config file path to unsee --- docs/CONFIGURATION.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md index af2e60da6..faffca932 100644 --- a/docs/CONFIGURATION.md +++ b/docs/CONFIGURATION.md @@ -2,6 +2,35 @@ ## Config file +By default unsee will try to read configuration file named `unsee.yaml` from +current directory. Configuration file uses [YAML](http://yaml.org/) format and +it needs to have `.yaml` extention. +Custom filename and directory can be passed via command line flags or +environment variables: + +* `--config.file` flag or `CONFIG_FILE` env variable - name of the config file + to load (without extention). +* `--config.dir` flag or `CONFIG_DIR` env variable - directory where config file + can be found. + +Example with flags: + +``` +$ unsee --config.file example --config.dir ./docs/ +``` + +Example with environment variables: + +``` +$ CONFIG_FILE="example" CONFIG_DIR="./docs/" unsee +``` + +Example using both: + +``` +$ CONFIG_FILE="example" unsee --config.dir ./docs/ +``` + ### Alertmanagers `alertmanager` section allows setting Alertmanager servers that should be