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
Constructor Details
#initialize(model, &block) ⇒ Zabbix
Returns a new instance of Zabbix.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/backup/notifier/zabbix.rb', line 14 def initialize(model, &block) super instance_eval(&block) if block_given? @zabbix_host ||= Config.hostname @zabbix_port ||= 10_051 @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.
12 13 14 |
# File 'lib/backup/notifier/zabbix.rb', line 12 def item_key @item_key end |
#service_host ⇒ Object
Returns the value of attribute service_host.
10 11 12 |
# File 'lib/backup/notifier/zabbix.rb', line 10 def service_host @service_host end |
#service_name ⇒ Object
Returns the value of attribute service_name.
8 9 10 |
# File 'lib/backup/notifier/zabbix.rb', line 8 def service_name @service_name end |
#zabbix_host ⇒ Object
Returns the value of attribute zabbix_host.
4 5 6 |
# File 'lib/backup/notifier/zabbix.rb', line 4 def zabbix_host @zabbix_host end |
#zabbix_port ⇒ Object
Returns the value of attribute zabbix_port.
6 7 8 |
# File 'lib/backup/notifier/zabbix.rb', line 6 def zabbix_port @zabbix_port end |