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

jdbc_parameters are picking nil values #1

Open
utkarsh17 opened this issue Dec 6, 2015 · 1 comment
Open

jdbc_parameters are picking nil values #1

utkarsh17 opened this issue Dec 6, 2015 · 1 comment

Comments

@utkarsh17
Copy link

Parameters to be used to query database were always taking nil values for the set values.
:parameters=>{:name=>nil, :id=>nil}

Using hash[k] = event.sprintf(v); instead of hash[k] = event[event.sprintf(v)]; in line: https://github.com/wiibaa/logstash-filter-jdbc/blob/master/lib/logstash/filters/jdbc.rb#L53
did the job for me.

Actually I am new to logstash/ruby. Do not know if I am doing right.

@wiibaa
Copy link
Owner

wiibaa commented Dec 7, 2015

Hello,
your solution is valid but it is not equivalent to the one in place.
My initial idea is to let the field name be itself dynamic.

Would you mind sharing your logstash config and additional details for me to understand why it is failing in your case

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