Class: Cloud66::Commands::Vitals

Inherits:
Object
  • Object
show all
Defined in:
lib/cloud66_agent/commands/vitals.rb

Class Method Summary collapse

Class Method Details

.performObject



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/cloud66_agent/commands/vitals.rb', line 7

def self.perform
	begin
		data = Utils::VitalSigns.vitals_alerts
	rescue => exc
		data = { error: exc.message }
	end
	Utils::Server.send_vitals(data) if !data.nil? && !data.empty?
	exit 0
rescue => exc
	$logger.error "Command \"vitals\" failed: #{exc.message}"
	exit -1
end