Posts

Showing posts with the label logstash

Logstash aggregated error

Logstash aggregated error I'm trying to aggregated some results from my statement and i was following this example over here: https://www.javacodegeeks.com/2017/10/aggregate-index-data-elasticsearch-using-logstash-jdbc.html But I'm getting some error's Where's the logstash config # file: simple-out.conf input { jdbc { jdbc_connection_string => "jdbc:mysql://localhost:3306/mestradods" jdbc_user => "root" jdbc_password => "" jdbc_validate_connection => true jdbc_driver_library => "C:Program Files (x86)MySQLConnector.J 5.1mysql-connector-java-5.1.41-bin.jar" jdbc_driver_class => "com.mysql.jdbc.Driver" statement => "SELECT p.*, f.* FROM mestradods.projetos p join mestradods.fileuploaded f on p.projeto_id = f.projeto_id where p.projeto_id > :sql_last_value order by p.projeto_id;" use_column_value => true ...

Logstash use JSON field date instead of @timestamp

Logstash use JSON field date instead of @timestamp I'm facing this issue. I'm trying to use custom JSON log date as my "usable" date instead of the @timestamp date field. My JSON file to be processed by Logstash (comming from filebeat): { "start": { "timestamp": { "time": "Wed, 04 Apr 2018 09:36:39 GMT", "timesecs": 1522834599 } } } My logstash.yml file : input { beats { port => 1337 codec => "json_lines" } } filter { date { match => [ "time", "EEE, dd MM yyyy hh:mm:ss ZZZ" ] } } output { stdout { codec => rubydebug } elasticsearch { hosts => "localhost:9200" index => "testing" } } Also tried to : match => [ "[start][timestamp][time]", "EEE, dd MM yyyy hh:mm:ss ZZZ" ] Still no luck. Any help would be welcome. Cheers, ...