Class: Sensu::Extension::Json

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

Instance Method Summary collapse

Instance Method Details

#descriptionObject



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

def description
  "returns JSON formatted event data"
end

#nameObject



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

def name
  "json"
end

#run(event) {|Sensu::JSON.dump(event), 0| ... } ⇒ Object

Yields:

  • (Sensu::JSON.dump(event), 0)


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

def run(event)
  yield Sensu::JSON.dump(event), 0
end