fluent / fluent-plugin-windows-eventlog

Fluentd plugin to collect windows event logs
Apache License 2.0
32 stars 19 forks source link

failed to read data from plugin storage file #13

Open ksandrmatveyev opened 5 years ago

ksandrmatveyev commented 5 years ago

Hello,

We are being facing a periodical issue with storage file:

2019-02-01 05:32:25 +0000 [error]: [windows_eventlog] failed to read data from plugin storage file path="./tmp/storage.json" error_class=Yajl::ParseError error="lexical error: invalid char in json text.\n                                                            (right here) ------^\n"
2019-02-01 05:32:25 +0000 [error]: config error file="C:/opt/td-agent/etc/td-agent/td-agent.conf" error_class=Fluent::ConfigError error="Unexpected error: failed to read data from plugin storage file: './tmp/storage.json'"

As workaround temp storage is removed and fluent is restarted then.

Config:

<source>
  @type windows_eventlog
  @id windows_eventlog
  channels application,system
  tag sys.raw
  read_interval 2
  <storage>
    @type local # @type local is the default.
    persistent true # default is true. Set to false to use in-memory storage.
    path ./tmp/storage.json # This is required when persistent is true.
    # Or, please consider using <system> section's `root_dir` parameter.
  </storage>
</source>

Is there any ideas? System: Windows Core 2016

ksandrmatveyev commented 5 years ago

any news? we are still facing this issue from time to time.

xud6 commented 5 years ago

I also have same problem

2019-09-12 16:56:19 +0800 [error]: [windows_eventlog] failed to read data from plugin storage file path="C:\\opt\\td-agent\\winevt.pos/worker0/storage.json" error_class=Yajl::ParseError error="lexical error: invalid char in json text.\n                                                            (right here) ------^\n"
2019-09-12 16:56:19 +0800 [error]: config error file="C:/opt/td-agent/etc/td-agent/td-agent.conf" error_class=Fluent::ConfigError error="Unexpected error: failed to read data from plugin storage file: 'C:\\opt\\td-agent\\winevt.pos/worker0/storage.json'"

My config:

<source>
  @type windows_eventlog
  @id windows_eventlog
  channels application,system
  tag log.winevt.local.raw
  <storage>
    @type local
    persistent true
    path C:\opt\td-agent\winevt.pos
  </storage>
</source>
qingling128 commented 4 years ago

We are also seeing similar issue:

2019-11-12 07:42:51 -0500 [error]: failed to read data from plugin storage file path="C:\\Program Files (x86)\\Stackdriver\\LoggingAgent\\Main\\pos\\winevtlog.pos/worker0/storage.json" error_class=Yajl::ParseError error="lexical error: invalid char in json text.\n (right here) ------^\n"

2019-11-12 07:42:51 -0500 [error]: config error file="C:\\Program Files (x86)\\Stackdriver\\LoggingAgent\\fluent.conf" error_class=Fluent::ConfigError error="Unexpected error: failed to read data from plugin storage file: 'C:\\Program Files (x86)\\Stackdriver\\LoggingAgent\\Main\\pos\\winevtlog.pos/worker0/storage.json'"

Config

<source>
  @type windows_eventlog
  # Watch the main event channels
  channels application,system,security
  <storage>
    @type local
    persistent true
    # The path is a place holder that should be updated
    # during the agent install process.
    path WIN_EVT_POS_FILE_PLACE_HOLDER
  </storage>
  # Read every 2 seconds.
  read_interval 2
  tag winevt.raw
</source>

Any update or workarounds on this issue?

tymfr commented 4 years ago

i have the same promblem too, but i give the creator full access of the application setup folder,the problem solved.