fluentd config file

22 views
Skip to first unread message

Arpit Dubey

unread,
Jan 7, 2021, 1:31:04 PM1/7/21
to Fluentd Google Group
Hi Guys,
 I need send some key values eg service_id = "ajkfuqrg" along with the logs  from fluentd config to http . I am not finding a way to add these custom key value.?

I wanted to send a custom(dummy) service id as well to the destination through match directive. below is my code.

 
 <source>
    @type tail
    format none
    path "/var/log/httpd/*error_log*"
    pos_file "/var/lib/google-fluentd/pos/apache-error.pos"
    read_from_head true
    tag "apache-error"
    <parse>
      @type none
      unmatched_lines
    </parse>
  </source>
  <source>
    @type tail
    format none
    path "/var/log/httpd/*access_log*"
    pos_file "/var/lib/google-fluentd/pos/apache-access.pos"
    read_from_head true
    tag "apache-access"
    <parse>
      @type none
      unmatched_lines
    </parse>
  </source>
  <filter apache-access>
    @type grep
    <exclude>
      key "payload"
      pattern 127.0.0.1|/health
    </exclude>
  </filter>
  <source>
    @type tail
    format none
    path "/var/log/httpd/*dispatcher*"
    pos_file "/pache-dispatchervar/lib/google-fluentd/pos/apache-dispatcher.pos"
    read_from_head true
    tag "apache-dispatcher"
    <parse>
      @type none
      unmatched_lines
    </parse>
  </source>
  <match apache-*>
    @type http
  </match>

Kentaro Hayashi

unread,
Jan 11, 2021, 10:29:45 PM1/11/21
to Fluentd Google Group
Hi,

For adding custom key value to record,
It may be able to use record_transformer. [1]



2021年1月8日金曜日 3:31:04 UTC+9 dubey1...@gmail.com:

Arpit Dubey

unread,
Jan 11, 2021, 10:38:33 PM1/11/21
to flu...@googlegroups.com
I have tried it but not working .. services hung to restart.

--
You received this message because you are subscribed to a topic in the Google Groups "Fluentd Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/fluentd/b6OdHV09MDQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to fluentd+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fluentd/d62bd147-5f66-4ec1-90fc-5ac002a10753n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages