Class: NagiosConfig
Instance Attribute Summary
#config
Instance Method Summary
collapse
exit_on_failure?
#cs_routers, #load_template
Instance Method Details
#hosts ⇒ Object
8
9
10
11
12
13
14
|
# File 'lib/cloudstack-nagios/commands/nagios_config.rb', line 8
def hosts
host_template = load_template(options[:template])
puts host_template.result(
routers: cs_routers,
date: date_string
)
end
|
#services ⇒ Object
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/cloudstack-nagios/commands/nagios_config.rb', line 21
def services
bin_path = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', 'bin'))
config_file = options[:config]
service_template = load_template(options[:template])
puts service_template.result(
routers: cs_routers,
bin_path: bin_path,
config_file: config_file,
date: date_string
)
end
|