hello,
i need to use Websocket input plugin for indexing json data in to elasticsearch.
this my code in javascript.
<script>
var ws = new WebSocket(" wss://ws.blockchain.info/inv");
ws.onopen = function(){
ws.send(JSON.stringify({"op":"unconfirmed_sub"}))
console.log('mash')
};
ws.onmessage = function(msg){
var response = JSON.parse(msg.data);
console.log('response')
}
</script>
i am trying to implement the js code in Websocket input plugin, and below my Websocket input plugin config code.
input {
websocket {
mode => "client"
url => "wss://ws.blockchain.info/inv"
type => "string"
}
}
output {
elasticsearch {
hosts => [ "localhost:9200" ]
index => "calidog"
}
stdout { codec => rubydebug }
}
when i run the config file
[2019-04-13T18:15:16,387][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2019-04-13T18:15:21,190][INFO ][logstash.runner ] Logstash shut down.
Thanks