module CommonKafka2
Public Instance Methods
print_hash(hash, path = '')
click to toggle source
# File lib/sensu-plugins-kafka2/common_kafka.rb, line 9 def print_hash(hash, path = '') hash.each do |key, value| next if %w[unit event_type type].include?(key) new_path = "#{path}.#{key}" if value.is_a? Hash print_hash(value, new_path) else output metric_name: "#{config[:scheme]}#{new_path}", value: value end end false end
request()
click to toggle source
# File lib/sensu-plugins-kafka2/common_kafka.rb, line 2 def request RestClient::Request.execute( method: :get, url: config[:endpoint] ) end