Class: Cloud66::Commands::Vitals
- Inherits:
-
Object
- Object
- Cloud66::Commands::Vitals
- Defined in:
- lib/cloud66_agent/commands/vitals.rb
Class Method Summary collapse
Class Method Details
.perform ⇒ Object
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. } end Utils::Server.send_vitals(data) if !data.nil? && !data.empty? exit 0 rescue => exc $logger.error "Command \"vitals\" failed: #{exc.}" exit -1 end |