Class: Nagios::MkLiveStatus::Wait::Trigger
- Inherits:
-
Nagios::MkLiveStatus::Wait
- Object
- Nagios::MkLiveStatus::Wait
- Nagios::MkLiveStatus::Wait::Trigger
- Includes:
- Nagios::MkLiveStatus, QueryHelper::Trigger
- Defined in:
- lib/nagios_mklivestatus/wait/trigger.rb
Overview
This class is used to make a wait trigger.
- Author
-
Esco-lan Team ([email protected])
- Copyright
-
Copyright © 2012 GIP RECIA
- License
-
General Public Licence
Constant Summary
Constants included from QueryHelper::Trigger
QueryHelper::Trigger::ALL, QueryHelper::Trigger::CHECK, QueryHelper::Trigger::COMMAND, QueryHelper::Trigger::COMMENT, QueryHelper::Trigger::DOWNTIME, QueryHelper::Trigger::LOG, QueryHelper::Trigger::STATE
Instance Method Summary collapse
-
#initialize(trigger = ALL) ⇒ Trigger
constructor
Create a new wait trigger expression.
-
#to_s ⇒ Object
Convert the current trigger expression into a nagios query string.
Methods included from QueryHelper::Trigger
Methods included from Nagios::MkLiveStatus
Constructor Details
#initialize(trigger = ALL) ⇒ Trigger
Create a new wait trigger expression.
14 15 16 17 18 19 20 21 22 |
# File 'lib/nagios_mklivestatus/wait/trigger.rb', line 14 def initialize(trigger=ALL) list_triggers = get_all_triggers if not list_triggers.include? trigger raise QueryException.new("The trigger value must be one of #{list_triggers.join(', ')}") end @trigger = trigger end |
Instance Method Details
#to_s ⇒ Object
Convert the current trigger expression into a nagios query string.
WaitTrigger: ...
28 29 30 |
# File 'lib/nagios_mklivestatus/wait/trigger.rb', line 28 def to_s return "WaitTrigger: "+@trigger end |