aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystems/monitor.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-20 16:35:53 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-20 16:35:53 -0200
commit345d45b406010c59ec8cfae99f177fbe9df10a78 (patch)
tree365982e13c1a7de45ae015f4d18b112189b39ea2 /manifests/subsystems/monitor.pp
parenteed6dead26492eaae8b13f66593406cd5a168285 (diff)
downloadpuppet-nodo-345d45b406010c59ec8cfae99f177fbe9df10a78.tar.gz
puppet-nodo-345d45b406010c59ec8cfae99f177fbe9df10a78.tar.bz2
Adding monitor class to wrap around nagios
Diffstat (limited to 'manifests/subsystems/monitor.pp')
-rw-r--r--manifests/subsystems/monitor.pp25
1 files changed, 25 insertions, 0 deletions
diff --git a/manifests/subsystems/monitor.pp b/manifests/subsystems/monitor.pp
new file mode 100644
index 0000000..5be3509
--- /dev/null
+++ b/manifests/subsystems/monitor.pp
@@ -0,0 +1,25 @@
+class monitor(
+ $type = 'vserver',
+ $use_nagios = true,
+) {
+
+ if $use_nagios != false {
+
+ if $type == 'vserver' {
+ include nagios::target::fqdn
+ nagios::service::ping { "$fqdn": }
+ }
+
+ if $type == 'host' or $type == 'personal' {
+ if extlookup('use_nagios_fqdn', false) == true {
+ include nagios::target::fqdn
+ }
+ else {
+ include nagios::target
+ }
+ nagios::service::ping { "$fqdn": }
+ }
+
+ }
+
+}