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>