Class: Backup::Notifier::Zabbix
- Defined in:
- lib/backup/notifier/zabbix.rb
Instance Attribute Summary collapse
-
#item_key ⇒ Object
Returns the value of attribute item_key.
-
#service_host ⇒ Object
Returns the value of attribute service_host.
-
#service_name ⇒ Object
Returns the value of attribute service_name.
-
#zabbix_host ⇒ Object
Returns the value of attribute zabbix_host.
-
#zabbix_port ⇒ Object
Returns the value of attribute zabbix_port.
Attributes inherited from Base
#max_retries, #message, #model, #on_failure, #on_success, #on_warning, #retry_waitsec
Instance Method Summary collapse
-
#initialize(model, &block) ⇒ Zabbix
constructor
A new instance of Zabbix.
Methods inherited from Base
Methods included from Config::Helpers
Methods included from Utilities::Helpers
Constructor Details
#initialize(model, &block) ⇒ Zabbix
Returns a new instance of Zabbix.
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/backup/notifier/zabbix.rb', line 17 def initialize(model, &block) super instance_eval(&block) if block_given? @zabbix_host ||= Config.hostname @zabbix_port ||= 10051 @service_name ||= "Backup #{ model.trigger }" @service_host ||= Config.hostname @item_key ||= 'backup_status' end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Backup::Config::Helpers
Instance Attribute Details
#item_key ⇒ Object
Returns the value of attribute item_key.
15 16 17 |
# File 'lib/backup/notifier/zabbix.rb', line 15 def item_key @item_key end |
#service_host ⇒ Object
Returns the value of attribute service_host.
13 14 15 |
# File 'lib/backup/notifier/zabbix.rb', line 13 def service_host @service_host end |
#service_name ⇒ Object
Returns the value of attribute service_name.
11 12 13 |
# File 'lib/backup/notifier/zabbix.rb', line 11 def service_name @service_name end |
#zabbix_host ⇒ Object
Returns the value of attribute zabbix_host.
7 8 9 |
# File 'lib/backup/notifier/zabbix.rb', line 7 def zabbix_host @zabbix_host end |
#zabbix_port ⇒ Object
Returns the value of attribute zabbix_port.
9 10 11 |
# File 'lib/backup/notifier/zabbix.rb', line 9 def zabbix_port @zabbix_port end |