Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. input {
  2. jdbc {
  3. jdbc_connection_string => "jdbc:mysql://localhost:3306/elements"
  4. jdbc_user => "user"
  5. jdbc_password => "admin"
  6. jdbc_validate_connection => true
  7. jdbc_driver_library => "C:/work/Wildfly/wildfly-9.0.2.Final/modules/com/mysql/main/mysql-connector-java-5.1.36.jar"
  8. jdbc_driver_class => "com.mysql.jdbc.Driver"
  9. statement_filepath => "query.sql"
  10. use_column_value => true
  11. tracking_column => id
  12. #schedule => "*/3 * * * *"
  13. clean_run => true
  14.  
  15. }
  16. }
  17.  
  18. output {
  19. elasticsearch {
  20. index => "emptytest"
  21. document_type => "history"
  22. document_id => "%{id}"
  23. hosts => "localhost"
  24. }
  25. }
  26.  
  27. if [sourcecell_id] == "NULL" {
  28.  
  29. mutate {
  30.  
  31. }
  32. }
  33.  
  34. filter {
  35. ruby {
  36. code => "
  37. hash = event.to_hash
  38. hash.each do |k,v|
  39. if v == nil
  40. event.remove(k)
  41. end
  42. end
  43. "
  44. }
  45.  
  46. }
  47.  
  48. filter {
  49. ruby {
  50. code => "
  51. hash = event.to_hash
  52. hash.each do |k,v|
  53. if v == nil
  54. event[k] = 0
  55. end
  56. end
  57. "
  58. }
  59.  
  60. }
  61.  
  62. ERROR logstash.filters.ruby - Ruby exception occurred: Direct event field references (i.e. event['field'] = 'value') have been disabled in favor of using event get and set methods (e.g. event.set('field', 'value')). Please consult the Logstash 5.0 breaking changes documentation for more details
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement