mesos / logstash

Logstash on Mesos
Apache License 2.0
67 stars 25 forks source link

Allow use of ENV vars in configuration parameters #107

Open philwinder opened 8 years ago

philwinder commented 8 years ago

Automatically expand any CLI/Env var config options if they contain env vars. For example, many installations don't install the mesos sandbox and /tmp/mesos. They use /var/lib/mesos. So to make the default logstash example more universal this should be allowed:

    "EXECUTOR_FILE_PATH": "$MESOS_WORK_DIR/slaves/*/frameworks/*/executors/*/runs/*/stdout, $MESOS_WORK_DIR/slaves/*/frameworks/*/executors/*/runs/*/stderr, $MESOS_LOG_DIR/*.INFO, $MESOS_LOG_DIR/*.WARNING"

Note the use of valid Mesos Env vars to define the work directory and the log directory. But this doesn't work. It passes the $VAR straight through to logstash.

jhftrifork commented 8 years ago

This is one case where it would be more natural to use an actual Logstash config file instead of CLI params or environment variables. The config file could have a $MESOS_WORK_DIR free variable. See #109