Method: LogStash::Outputs::Stride#receive

Defined in:
lib/logstash/outputs/stride.rb

#receive(event) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/logstash/outputs/stride.rb', line 23

def receive(event)
  access_token = event.sprintf(@access_token)
  cloud_id = event.sprintf(@cloud_id)
  conversation_id = event.sprintf(@conversation_id)
  host = event.sprintf(@host)
  type = event.sprintf(@type)
  message = event.sprintf(@message)

  post_message(access_token,cloud_id,conversation_id,host,type,message)
rescue Exception => e
  puts e.message
end