Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The plugin doesn't work as expected #3

Open
killerfish16 opened this issue Jun 17, 2018 · 2 comments
Open

The plugin doesn't work as expected #3

killerfish16 opened this issue Jun 17, 2018 · 2 comments

Comments

@killerfish16
Copy link

Dear Arun,
I tried to use your plugin, installation is successful no issues.

I used the following config:

@type tail path C:/Users/welcome/Desktop/bpost/sample1.txt pos_file C:/Users/welcome/Desktop/bpost/pos1.txt tag test format pair_delimiter " " key_value_seperator "=" format keyvalue

And Fluentd started with the following warning

2018-06-17 22:00:38 +0530 [warn]: parameter 'key_value_seperator' in
@type tail
path "C:/Users/welcome/Desktop/bpost/sample1.txt"
pos_file "C:/Users/welcome/Desktop/bpost/pos1.txt"
tag "test"
format keyvalue
key_value_seperator =

@type keyvalue

is not used. 2018-06-17 22:00:38 +0530 [info]: #0 starting fluentd worker pid=7004 ppid=4468 worker=0 2018-06-17 22:00:38 +0530 [info]: #0 following tail of C:/Users/welcome/Desktop/ bpost/sample1.txt 2018-06-17 22:00:38 +0530 [info]: #0 fluentd worker is now running worker=0

Testing:
Log sample:
timestamp="2018-05-25 13:36:38.802" application="xyz" category="MessagingEvent" messagingEventType="MessageReceived" messageType="Demand" barcode="323200023884776648484"

I'm getting the following warn in log and its not working:

2018-06-17 22:03:54 +0530 [warn]: #0 "timestamp="2018-05-25 13:36:38.802" appl
ication="xyz" category="MessagingEvent" messagingEventType="MessageReceived
" messageType="Demand" barcode="323200023884776648484"" error="undefined m
ethod `<<' for nil:NilClass"

Could you please help to resolve the issue.

Regards,
Raj

@nom3ad
Copy link
Owner

nom3ad commented Jun 27, 2018

hi, raj, which version of fluentd are you using?. can you try key_vlaue plugin in a filter as shown in below

<filter tag>
 type parser
 format keyvalue
 pair_delimiter  ","
 key_value_seperator "="
 key_name keyToParse
</filter>

Also please try the following,

<source>
    @type tail
    path "C:/Users/welcome/Desktop/bpost/sample1.txt"
    pos_file "C:/Users/welcome/Desktop/bpost/pos1.txt"
    tag "test"
    <parse>
          @type keyvalue
           key_value_seperator  "="
    </parse>
</source>

@killerfish16
Copy link
Author

Dear Arun,

Thanks for replying back. I like to use it Source only, will try the second option and get back to you.

@type tail path "C:/Users/welcome/Desktop/bpost/sample1.txt" pos_file "C:/Users/welcome/Desktop/bpost/pos1.txt" tag "test" @type keyvalue key_value_seperator "="

But to specify the pair_delimiter the pair delimiter in the above config.

Regards,
Raj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants