New to Logstash, ElasticSearch etc.
Created new LogStash configuration for pulling records from Postgres DB and push to elasticsearch, however seeing only only row is pushed to elasticsearch,
input {
jdbc {
# Postgres jdbc connection string to our database, nnm
jdbc_connection_string => "jdbc:postgresql://localhost:5432/nnm"
# The user we wish to execute our statement as
jdbc_user => "postgres"
jdbc_password => "nnmP0stgr3S"
jdbc_validate_connection => true
# The path to our downloaded jdbc driver
jdbc_driver_library => "/opt/OV/nmsas/server/nms/lib/postgresql.jar"
# The name of the driver class for Postgresql
jdbc_driver_class => "org.postgresql.Driver"
schedule => "30 * * * * *"
# our query
statement => "select NMS_NODE.name,nms_node_stat.cur_stat from nms_node,nms_node_stat where nms_node.id = nms_node_stat.id;"
}
}
output {
elasticsearch {
hosts => "localhost:9200"
index => "nms_node"
document_type => "nms_node"
document_id => "%{nms_node.id}"
}
stdout { codec => rubydebug { metadata => true } }
}
Please help.