How to change host field

295 views
Skip to first unread message

m13....@gmail.com

unread,
Mar 27, 2015, 7:33:52 AM3/27/15
to flu...@googlegroups.com
Hi there,

I'm trying to modify the host field because several machines have the same name but not in the same dns zone.

I'm using the host_param directive as explain in http://docs.fluentd.org/articles/config-file but I suppose I did something wrong because it's not working.

I want to use the name returned by the command `hostname` and not the first part of my fqdn `hostname -f`.

In my td-agent.conf I wrote:

<system>
  host_param "#{Socket.gethostname}"
</system>
@include conf.d/*.conf

But the logs (I'm testing with syslog on debian 7) keep the first part of my fqdn in the host field.
I tried with a static value for the host_param but with the same result.

If someone know where fluent read the name or how to use the host_param, you're very welcome :).

thanks




Mr. Fiber

unread,
Apr 6, 2015, 12:57:33 PM4/6/15
to flu...@googlegroups.com
Sorry for the delay.


system directive is for global setting so it doesn't affect the field.
And system directive supports only listed parameters.

If you want to override the host_param field in the events,
using fluent-plugin-record-reformer in v0.10 or
record_transofrmer filter is better.



Masahiro

--
You received this message because you are subscribed to the Google Groups "Fluentd Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fluentd+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages