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

Logstash 2.3.1 ... NoMethodError: undefined methodto_iso8601 #6

Open
d3ei opened this issue Apr 29, 2016 · 2 comments
Open

Logstash 2.3.1 ... NoMethodError: undefined methodto_iso8601 #6

d3ei opened this issue Apr 29, 2016 · 2 comments

Comments

@d3ei
Copy link

d3ei commented Apr 29, 2016

Hi Oleg!!
Many thanks for your connector.
I try to import csv data into cassandra using logstash 2.3.1.
Csv files look like this :

APPC001os;20160301050325;71.3944;
APPC001os;20160301050325;71.3944;

Having compatibility problem, first with logstash 2.3.1, and then with cassandra-driver, I modified the logstash-output-cassandra.gemspec

# s.add_runtime_dependency "logstash-core", '>= 1.4.0', '< 2.0.0'
s.add_runtime_dependency "logstash-core", '>= 1.4.0', '<= 2.3.1'
# s.add_runtime_dependency 'cassandra-driver'
s.add_runtime_dependency 'cassandra-driver', '~> 3.0.0.rc.2'

and finally succeed in bin/plugin-install --no-verify.

My pipeline is starting, but I have still the error : "NoMethodError: undefined methodto_iso8601' for nil:NilClass`".
I found lot of problems with convertion to date, so now my datetime is in text format, but after trying many many conf, the error is still there.

My cassandra table is now very simple :

tag_id text,
tag_datetime text,
tag_value double,
PRIMARY KEY ((tag_id), tag_datetime)

If you have an idea.
I'm not sure what I'm doing - no more what I'm saying, but it's another topic :| -, just starting with logstash and cassandra few days ago :$.
And I'm not really sure to understand the source parameter in the output cassandra entry.
Thanks if You can help.

J

Just for information my logStash.conf

  1 input {
  2     file {
  3         path => "xData/src/data/2016-03-02_0000_to_0059_D_20160303003001.txt"
  4         start_position => "beginning"
  5         codec => plain {
  6             charset => "UTF-8"
  7         }
  8     }
  9 }
 10 filter {
 11     csv {
 12         separator => ";"
 13         columns => [ "tag_id", "tag_datetime", "tag_value" ]
 14         remove_field => ["column4"]
 15     }
 16 #   grok {
 17 #       match => { "message" => "%{WORD:tag_id};%{WORD:tag_datetime};%{NUMBER:tag_value}" }
 18 #       overwrite => [ "message" ]
 19 #   }
 20     date {
 21         match => [ "tag_datetime", "yyyyMMddHHmmss" ]
 22         timezone => "Europe/Paris"
 23         target => "tag_datetime"
 24     }
 25 }
 26 output {
 27     file {
 28         path => "/home/j/xData/src/data/logStash.txt"
 29     }
 30     cassandra {
 31         username => "cassandra"
 32         password => "cassandra"
 33         hosts => ["10.102.0.156", "10.102.0.182", "10.102.0.154"]
 34         keyspace => "imagindata"
 35         table => "dwsensor"
 36
 37         # Options: "any", "one", "two", "three", "quorum", "all",
 38         #    "local_quorum", "each_quorum", "serial", "local_serial",
 39         #    "local_one"
 40         # Default: "one"
 41         consistency => "all"
 42
 43         # Where from the event hash to take a message
 44         # source => "message"
 45
 46         hints => {
 47             tag_id => "text"
 48             tag_datetime => "text"
 49             tag_value => "double"
 50         }
 51
 52         ignore_bad_messages => true
 53         ignore_bad_values => false
 54
 55         # Datastax cassandra driver supports batch insert.
 56         # By default it is 1.
 57         batch_size => 100
 58
 59         # Every batch_processor_thread_period sec. a special thread
 60         # pushes all collected messages to Cassandra. By default it is 1 (sec.)
 61         batch_processor_thread_period => 1
 62
 63         # max max_retries times the plugin will push failed batches
 64         # to Cassandra before give up. By defult it is 3.
 65         max_retries => 3
 66
 67         # retry_delay secs. between two sequential tries to push a failed batch
 68         # to Cassandra. By default it is 3 (secs.)
 69         retry_delay => 3
 70     }
 71     stdout{}
 72 }
@otokarev
Copy link
Owner

Hi!!!

Sorry, right now i cannot help you, BUT there is a fork that is maintained much better https://github.com/eladamitpxi/logstash-output-cassandra/

Could you please address them your question, im sure they will help.

Thank you,
Oleg

@d3ei
Copy link
Author

d3ei commented Apr 30, 2016

Thanks Oleg!
Will have a look this fork.
J

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