Class: Sensu::Extension::Json

Inherits:
Mutator
  • Object
show all
Defined in:
lib/sensu/extensions/mutators/json.rb

Instance Method Summary collapse

Instance Method Details

#descriptionObject



11
12
13
# File 'lib/sensu/extensions/mutators/json.rb', line 11

def description
  "returns JSON formatted event data"
end

#nameObject



7
8
9
# File 'lib/sensu/extensions/mutators/json.rb', line 7

def name
  "json"
end

#run(event) {|MultiJson.dump(event), 0| ... } ⇒ Object

Yields:

  • (MultiJson.dump(event), 0)


15
16
17
# File 'lib/sensu/extensions/mutators/json.rb', line 15

def run(event)
  yield MultiJson.dump(event), 0
end