-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
I am running the Fluentd agent on Windows Server 2016.
I also installed the plug-in "fluent-plugin-grafana-loki" to allow me to output messages to loki.
I'm attempting to add the hostname as a label to my messages.
I found that when type=file or type=loki, the ruby code in the filter statements below don't work (don't even seem to run):
<match myfile>
@type file
path /var/log/td-agent/access
<label>
host
</label>
</match>
<filter myfile>
@type record_modifier
<record>
host "#{Socket.gethostname}"
</record>
</filter>
<filter myfile>
@type record_modifier
prepare_value require 'socket'; @name = Socket.gethostname
<record>
host ${@name.downcase}
</record>
</filter>
Any suggestions?
Metadata
Metadata
Assignees
Labels
No labels