From fe1c86b8f938283e9dd8196a8b11a9648f4b49e6 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 12 Apr 2013 17:09:03 -0300 Subject: Major refactor --- manifests/subsystem/monitor.pp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 manifests/subsystem/monitor.pp (limited to 'manifests/subsystem/monitor.pp') diff --git a/manifests/subsystem/monitor.pp b/manifests/subsystem/monitor.pp new file mode 100644 index 0000000..d7fa720 --- /dev/null +++ b/manifests/subsystem/monitor.pp @@ -0,0 +1,26 @@ +class nodo::subsystem::monitor( + $type = 'vserver', + $use_nagios = hiera('nodo::subsystem::monitor::use_nagios', True), + $use_fqdn = hiera('nodo::subsystem::monitor::use_nagios_fqdn', false) +) { + + if $use_nagios != false { + + if $type == 'vserver' { + include nagios::target::fqdn + nagios::service::ping { "${::fqdn}": } + } + + if $type == 'host' or $type == 'personal' { + if $use_fqdn == true { + include nagios::target::fqdn + } + else { + include nagios::target + } + nagios::service::ping { "${::fqdn}": } + } + + } + +} -- cgit v1.2.3