-
Notifications
You must be signed in to change notification settings - Fork 14
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
using the cassandra output fails #1
Comments
Ok...found the issue. The driver was missing after all from the jruby installation. Plus also checkout the git from ruby-driver and building using build gem.. Now the output is loaded correctly but I still don't see any inserts into the db... |
Hello Valentin, It's possible that cassandra output waits payload from event[message](source =) and configured ignore bad message ( ignore_bad_messages => true), but the payload itself is located somewhere else. BTW During debugging i ran logstash as:
in most cases it reveals all problems immediately, at least for me also my test conf can give you a clue:
If you provide an info on your cassandra schema and logstash conf and i have enough time i will tru to reproduce the issue under ubuntu Oleg |
Hi Oleg,
So you are pretty right on the idea that there is nothing there to be taken and inserted into cassandra. My configuration is the following
The messages that I need to insert into cassandra look like this ( I make them into fields)
The original message looks like this:
My cassandra table that I want to insert in, is the following:
Sorry for the long comment, could you help me with the inserting of the data please? I'm not sure how to structure it to be sent correctly. Thank you! PS: I'm also going to try your configuration to get more info. |
Hi Valentin, I have emulated redis input by echoing the message you provided to "input {stdin {}}".
1/ remove source="command" from the config, because it seems that a payload resides immediately in event not in event[command] About:
I feel awkward to show such things to users for sure :) and will change it for something more human readable soon. Thank you! Oleg |
master updated with tiny fixes related to the issue.. if something goes dramatically weird, just rollback to tag 0.1.0 |
Hi Oleg, I've made the configuration changes that you suggested and I'm now able to insert the values into cassandra! :) I have only one issue left, that is looking kind of strange.The timestamp that I'm using is not being inserted correctly into the db for some reason. If I look into the logs, logstash is complaining about it in the following way:
My data looks like this:
The timestamp gets converted from "2015-08-27T13:03:50.400Z" to "1970-01-01T00:00:00.000+01:00". I've tried a manual insert into cqlsh and it works without any problem. Any hits on why is this failing ? Thank you! PS: I've pulled and rebuilt your latest commits, so using the latest code. |
Ok, after looking at the code a little, I found the following line responsible for the parsing of the timestamp:
Not sure why it's failing yet, but still investigating... |
I've made some changes to the code, more exactly removing the ::Parse function from the timestamp and just inserting it plain and now my timestamp is being inserted correctly. |
Hi Valentin, Cassandra::Types::Timestamp.new() seems refuses string as input
or did you remove whole "Cassandra::Types::Timestamp.new(Time::parse(" and left a date string only? Could you please provide a snippet of your changes here? |
Hi Oleg,
The issue was related to the timestamp being converted from a form like 20150807.074434.78 to a form that is accepted by cassandra, ex 2015-01-01T01:01:01.400Z. So I ended up changing the following lines of code:
So now my data is coming in cassandra how I need it and it looks like this
Or no miliseconds...
|
Gentlemen , I have the file below as a source of example : name: Gabriel My configuration file is as follows: input { filter { output { cassandra { stdout { codec => rubydebug } } However not get success in cassandra insertion log follows below: [root@dbfaz01p bin]# cat /var/log/teste.txt | ./logstash -f cassandra3.conf plugin is using the 'milestone' method to declare the version of the plugin this method is deprecated in favor of declaring the version inside the gemspec. {:level=>:warn} Logstash startup completed If anyone can help me I am very grateful. |
I got success ! |
Hi there,
I build the gem file on a debian and when using it in logstash it fails with the following message:
/usr/bin/java -Djava.io.tmpdir=/var/lib/logstash -Xmx2G -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Djava.awt.headless=true -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -jar /opt/logstash/vendor/jar/jruby-complete-1.7.17.jar -I/opt/logstash/lib /opt/logstash/lib/logstash/runner.rb agent -f /etc/logstash/conf.8 -l /var/log/logstash/logstash8.log --debug --verbose
Sending logstash logs to /var/log/logstash/logstash8.log.
Using milestone 2 input plugin 'redis'. This plugin should be stable, but if you see strange behavior, please let us know! For more information on plugin milestones, see http://logstash.net/docs/1.4.4/plugin-milestones {:level=>:warn}
Using milestone 1 output plugin 'cassandra'. This plugin should work, but would benefit from use by folks like you. Please let us know if you find bugs or have suggestions on how to improve this plugin. For more information on plugin milestones, see http://logstash.net/docs/1.4.4/plugin-milestones {:level=>:warn}
LoadError: no such file to load -- cassandra_murmur3
require at org/jruby/RubyKernel.java:1071
require at /opt/logstash/vendor/jar/jruby-complete-1.7.17.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55
require at /opt/logstash/vendor/jar/jruby-complete-1.7.17.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53
require at /opt/logstash/vendor/bundle/jruby/1.9/gems/polyglot-0.3.4/lib/polyglot.rb:65
(root) at /opt/logstash/vendor/bundle/jruby/1.9/gems/cassandra-driver-2.1.4/lib/cassandra.rb:565
require at org/jruby/RubyKernel.java:1071
require at /opt/logstash/vendor/jar/jruby-complete-1.7.17.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:73
require at /opt/logstash/vendor/jar/jruby-complete-1.7.17.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:71
require at /opt/logstash/vendor/bundle/jruby/1.9/gems/polyglot-0.3.4/lib/polyglot.rb:65
(root) at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-cassandra-0.1.0/lib/logstash/outputs/cassandra.rb:1
each at org/jruby/RubyArray.java:1613
register at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-cassandra-0.1.0/lib/logstash/outputs/cassandra.rb:60
outputworker at /opt/logstash/lib/logstash/pipeline.rb:220
Any ideas why? The cassandra-drive is installed.
The text was updated successfully, but these errors were encountered: