Sorry, the FileOutput doesn't support message field interpolation in the output 
filename like that. Doing so would be quite a departure from the current 
behaviour, since each message might conceivably have a different Logger value, 
the output would have to be constantly creating and writing to a possibly 
unbounded number of output files.

If you have a relatively small set of Logger values, and you know what they are 
ahead of time, you can configure a separate FileOutput for each one, statically 
setting both the message_matcher and the path values to match each other. 
Otherwise, yes, you'll have to write your own output. I'd probably use a 
SandboxOutput.

The mailing list can be searched using some of Google's advanced search 
features. Just prepend `site:mail.mozilla.org inurl:heka` to your search terms.

-r

On 09/21/2015 01:03 AM, Alan Chalmers wrote:
Apologies if this is straight forward but as a newbie here I can't quiet
figure this out.
I have hekad running on a client to sending to a central server also
running hekad

Client side logstreamer is like this

[myapp-logs]
type = "LogstreamerInput"
log_directory = "/opt/logs"
file_match = '(?P<LOGFILE>[^/]+).log.(?P<DATE>\d+)_(?P<HOUR>\d+)$'
differentiator = ["LOGFILE", ".log.", "DATE", "_" , "HOUR"]

Server side

[myapp-logs]
type = "FileOutput"
message_matcher = "Logger =~ /myapp/"
path = "/opt/log-data/myapp/heka.%{Logger}"
encoder = "PayloadEncoder"

What I am attempting to to is use the "Logger" as the dynamic name for
the file on the receiving end. For reasons outside my control I need to
make the destination file name the same as the source file name to allow
some third-party processing to continue using the expect naming scheme.

I end up with is the file called  heka.%{Logger}  rather than the logger
name I was expecting from differentiator.

Should I be able to use variables in the path?
Do I have the syntax correct?
or
Do I need to write my own Output plugin to do this?

And lastly is there an easy way to search the mailing list archives.




Thanks
alan


_______________________________________________
Heka mailing list
[email protected]
https://mail.mozilla.org/listinfo/heka


_______________________________________________
Heka mailing list
[email protected]
https://mail.mozilla.org/listinfo/heka

Reply via email to