Open johlym opened 8 years ago
I think this would typically be handled by config management, like chef, puppet, etc., and would be outside the responsibility of remote_syslog2.
That being said, it's possible to pass in a list of log files on the command line as additional arguments, so that env vars would be expanded, like:
remote_syslog -D -d a.example.com -f local0 "${MYVAR}/path/to/logfile.log" "${MYVAR}/path/to/second.log"
That makes sense, though would get a bit unwieldy beyond a handful of log files.
Johnathan
On Mon, Sep 26, 2016 at 12:46 PM Mark Martin
< mailto:Mark Martin notifications@github.com
wrote:
a, pre, code, a:link, body { word-wrap: break-word !important; }
I think this would typically be handled by config management, like chef, puppet, etc., and would be outside the responsibility of remote_syslog2.
That being said, it's possible to pass in a list of log files on the command line as additional arguments, so that env vars would be expanded, like:
remote_syslog -D -d a.example.com -f local0 "${MYVAR}/path/to/logfile.log" "${MYVAR}/path/to/second.log"
—
You are receiving this because you authored the thread.
Reply to this email directly, https://github.com/papertrail/remote_syslog2/issues/172#issuecomment-249676746 , or https://github.com/notifications/unsubscribe-auth/AFbD05_A3DzrouSKrSiiARdEvPC47FsFks5quCEwgaJpZM4KG5Sx .
I took the log_files.yml
from this template, which is referenced by Papertrail's Cloud 66 instruction.
While parsing of ENV variables in log_files.yml
would be cool, there's an easier solution - if that instruction page explained that you need to replace the variables manually I wouldn't have had a problem.
Submitting this on behalf of a user. When deploying remote_syslog2 in an automated fashion, it helps to be able to use environment variables to automatically point remote_syslog2 in the right direction toward the log files of the application.
Example
Note: the tags are ERB but we could possibly come up with a standard implementation of this.