Class: Ansible::Ruby::Modules::Nagios
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Nagios
- Defined in:
- lib/ansible/ruby/modules/generated/monitoring/nagios.rb
Overview
The C(nagios) module has two basic functions: scheduling downtime and toggling alerts for services or hosts. All actions require the I(host) parameter to be given explicitly. In playbooks you can use the C({inventory_hostname}) variable to refer to the host the playbook is currently running on. You can specify multiple services at once by separating them with commas, .e.g., C(services=httpd,nfs,puppet). When specifying what service to handle there is a special service value, I(host), which will handle alerts/downtime for the I(host itself), e.g., C(service=host). This keyword may not be given with other services at the same time. I(Setting alerts/downtime for a host does not affect alerts/downtime for any of the services running on it.) To schedule downtime for all services on particular host use keyword “all”, e.g., C(service=all). When using the C(nagios) module you will need to specify your Nagios server using the C(delegate_to) parameter.
Instance Method Summary collapse
-
#action ⇒ :downtime, ...
Action to take.,servicegroup options were added in 2.0.,delete_downtime options were added in 2.2.
-
#author ⇒ String?
Author to leave downtime comments as.
-
#cmdfile ⇒ String?
Path to the nagios I(command file) (FIFO pipe).
-
#command ⇒ String
The raw command to send to nagios, which should not include the submitted time header or the line-feed B(Required) option when using the C(command) action.
-
#comment ⇒ String?
Comment for C(downtime) action.
-
#host ⇒ String?
Host to operate on in Nagios.
-
#minutes ⇒ Integer?
Minutes to schedule downtime for.,Only usable with the C(downtime) action.
-
#servicegroup ⇒ String?
The Servicegroup we want to set downtimes/alerts for.
-
#services ⇒ Array<String>, String
What to manage downtime/alerts for.
Methods inherited from Base
Methods inherited from Ansible::Ruby::Models::Base
attr_option, attr_options, attribute, #initialize, remove_existing_validations, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#action ⇒ :downtime, ...
Returns Action to take.,servicegroup options were added in 2.0.,delete_downtime options were added in 2.2.
16 |
# File 'lib/ansible/ruby/modules/generated/monitoring/nagios.rb', line 16 attribute :action |
#author ⇒ String?
Returns Author to leave downtime comments as. Only usable with the C(downtime) action.
28 |
# File 'lib/ansible/ruby/modules/generated/monitoring/nagios.rb', line 28 attribute :author |
#cmdfile ⇒ String?
Returns Path to the nagios I(command file) (FIFO pipe). Only required if auto-detection fails.
24 |
# File 'lib/ansible/ruby/modules/generated/monitoring/nagios.rb', line 24 attribute :cmdfile |
#command ⇒ String
Returns The raw command to send to nagios, which should not include the submitted time header or the line-feed B(Required) option when using the C(command) action.
48 |
# File 'lib/ansible/ruby/modules/generated/monitoring/nagios.rb', line 48 attribute :command |
#comment ⇒ String?
Returns Comment for C(downtime) action.
32 |
# File 'lib/ansible/ruby/modules/generated/monitoring/nagios.rb', line 32 attribute :comment |
#host ⇒ String?
Returns Host to operate on in Nagios.
20 |
# File 'lib/ansible/ruby/modules/generated/monitoring/nagios.rb', line 20 attribute :host |
#minutes ⇒ Integer?
Returns Minutes to schedule downtime for.,Only usable with the C(downtime) action.
36 |
# File 'lib/ansible/ruby/modules/generated/monitoring/nagios.rb', line 36 attribute :minutes |
#servicegroup ⇒ String?
Returns The Servicegroup we want to set downtimes/alerts for. B(Required) option when using the C(servicegroup_service_downtime) amd C(servicegroup_host_downtime).
44 |
# File 'lib/ansible/ruby/modules/generated/monitoring/nagios.rb', line 44 attribute :servicegroup |
#services ⇒ Array<String>, String
Returns What to manage downtime/alerts for. Separate multiple services with commas. C(service) is an alias for C(services). B(Required) option when using the C(downtime), C(enable_alerts), and C(disable_alerts) actions.
40 |
# File 'lib/ansible/ruby/modules/generated/monitoring/nagios.rb', line 40 attribute :services |