Class: UptrendsExtended::Probe

Inherits:
Base
  • Object
show all
Defined in:
lib/uptrends_extended/probe.rb

Instance Attribute Summary

Attributes inherited from Base

#attributes

Instance Method Summary collapse

Methods inherited from Base

check_error!, #create!, #delete!, #initialize, parse, #statistics, #to_s, #update!, #uptime_last_12_months, #uptime_this_year

Constructor Details

This class inherits a constructor from UptrendsExtended::Base

Instance Method Details

#disableObject



11
12
13
14
# File 'lib/uptrends_extended/probe.rb', line 11

def disable
  self.is_active = false
  self.update!
end

#disable_alertsObject



21
22
23
24
# File 'lib/uptrends_extended/probe.rb', line 21

def disable_alerts
  self.generate_alert = false
  self.update!
end

#enableObject



6
7
8
9
# File 'lib/uptrends_extended/probe.rb', line 6

def enable
  self.is_active = true
  self.update!
end

#enable_alertsObject



16
17
18
19
# File 'lib/uptrends_extended/probe.rb', line 16

def enable_alerts
  self.generate_alert = true
  self.update!
end