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

Column Names keyword bug #61

Open
AbdulHaseebHussain opened this issue Jan 4, 2018 · 3 comments
Open

Column Names keyword bug #61

AbdulHaseebHussain opened this issue Jan 4, 2018 · 3 comments

Comments

@AbdulHaseebHussain
Copy link
Contributor

When columns names are the same as keywords unexpected things happen, e.g. when tags is used as a column name the value is added within the logstash tags array.

This is due to column name values being called using event.get so there is no difference is syntax. Needs to be rectified somehow.

@guyboertje
Copy link

Can you give examples?

@AbdulHaseebHussain
Copy link
Contributor Author

When "tags" is given as a column name event.get("tags") returns ["hello"] instead of "hello" as it expects tags such "_grokparsefailure" etc. which would be appended to the above array when they occur
which is not expected by users.

`let(:doc) { "big,bird,sesame street,hello" }
let(:config) do
{ "columns" => ["first", "last", "address", "tags" ] }
end

it "extract all the values" do
plugin.filter(event)
expect(event.get("first")).to eq("big")
expect(event.get("last")).to eq("bird")
expect(event.get("address")).to eq("sesame street")
expect(event.get("tags")).to eq("hello")
end`

@TheVastyDeep
Copy link

I think that is expected. logstash makes assumptions about the types of certain fields. [tags] has to be an array, [@timestamp] has to be a LogStash::Timestamp, or else things break. There may be others. It is not documented, it just is.

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

3 participants