1

I am trying to take data that have auth and args from Websocket server to Logstash using Websocket input plugin.

My Logstash conf file

input {
  websocket {
    mode => client
    url => "wss://0.0.0.0/api"
  }
}
output {
    stdout {codec => rubydebug}
    elasticsearch {
        hosts => ["0.0.0.0:9200"]
        index => "ws_cdrs"
    }
}

But to get the data at the first I have to add

{
   "command":"auth",
   "command_ref":"command reference",
   "args":{
      "token":"9118ce123456db123456b268e0135e3"
   }
}

{
   "command":"get_calls",
   "command_ref":"command reference",
   "args":{
      "start_time":"2018-07-06T12:13:17Z",
      "end_time":"2022-07-21T12:13:17Z"
   }
}

the second one is to get the data.

FAYIS
  • 21
  • 3

0 Answers0