lib/sensu/server/tessen.rb
def tessen_api_request(data)
        @logger.debug("sending data to the tessen call-home service", {
          :data => data,
          :options => @options
        })
        connection = {}
        connection[:proxy] = @options[:proxy] if @options[:proxy]
        post_options = {:body => Sensu::JSON.dump(data)}
        http = EM::HttpRequest.new("https://tessen.sensu.io/v1/data", connection).post(post_options)
        http.callback do
          @logger.debug("tessen call-home service response", :status => http.response_header.status)
          yield if block_given?
        end
        http.errback do
          @logger.debug("tessen call-home service error", :error => http.error)
          yield if block_given?
        end
      end
# Make a Tessen service API request.
#
# @param data [Hash]
Make a Tessen service API request.
Make a Tessen service API request .
def tessen_api_request(data)
        @logger.debug("sending data to the tessen call-home service", {
          :data => data,
          :options => @options
        })
        connection = {}
        connection[:proxy] = @options[:proxy] if @options[:proxy]
        post_options = {:body => Sensu::JSON.dump(data)}
        http = EM::HttpRequest.new("https://tessen.sensu.io/v1/data", connection).post(post_options)
        http.callback do
          @logger.debug("tessen call-home service response", :status => http.response_header.status)
          yield if block_given?
        end
        http.errback do
          @logger.debug("tessen call-home service error", :error => http.error)
          yield if block_given?
        end
      end
def tessen_api_request ( data ) @logger . debug ( "sending data to the tessen call-home service" , { :data => data , :options => @options } ) connection = { } connection [ :proxy ] = @options [ :proxy ] if @options [ :proxy ] post_options = { :body => Sensu :: JSON . dump ( data ) } http = EM :: HttpRequest . new ( "https://tessen.sensu.io/v1/data" , connection ) . post ( post_options ) http . callback do @logger . debug ( "tessen call-home service response" , :status => http . response_header . status ) yield if block_given? end http . errback do @logger . debug ( "tessen call-home service error" , :error => http . error ) yield if block_given? end end
Make a Tessen service API request.
Make a Tessen service API request .
data
None