yokawasa / fluent-plugin-azure-loganalytics

Azure Log Analytics output plugin for Fluentd
https://rubygems.org/gems/fluent-plugin-azure-loganalytics
Apache License 2.0
53 stars 9 forks source link

Does this plugin support json format log_type jsonABT #6

Closed parthivjoshi closed 5 years ago

parthivjoshi commented 5 years ago

I am trying to forward k8 logs to azure log analytics with following settings and it's not working. Can you help?

@type tail                         # input plugin
path /tmp/access.log   # monitoring file
pos_file /tmp/fluentd_pos_file     # position file
format json                      # format
tag azure-loganalytics.access      # tag

<match azure-loganalytics.**> @type azure-loganalytics customer_id foobar # Customer ID aka WorkspaceID String shared_key foobar # The primary or the secondary Connected Sources client authentication key log_type jsonON # The name of the event type. ex) ApacheAccessLog add_tag_field true tag_field_name json_ON_tag

yokawasa commented 5 years ago

@parthivjoshi Looks like @type tail in fluentd support JSON format. The following is fluentd's tail plugin's doc:

Also I found an example of reading JSON data and push them into elasticsearch. This is not for log analytics but might help you to understand how you configure tail plugin in reading JSON data.

One more example is this (reading CSV data and push them into log analytics):

Hope this would help

yokawasa commented 5 years ago

@parthivjoshi I'm closing the issue but please feel free to re-open if you need further discussions. thanks