From d09f347afc0a99481673f227f83864d06206add6 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 18 Sep 2015 14:17:05 -0300 Subject: Adds nodo::subsystem::monitor::interface --- manifests/subsystem/monitor.pp | 7 +++++++ manifests/subsystem/monitor/interface.pp | 14 ++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 manifests/subsystem/monitor/interface.pp (limited to 'manifests/subsystem') diff --git a/manifests/subsystem/monitor.pp b/manifests/subsystem/monitor.pp index 981bf19..ebb99e5 100644 --- a/manifests/subsystem/monitor.pp +++ b/manifests/subsystem/monitor.pp @@ -6,6 +6,13 @@ class nodo::subsystem::monitor( $check_ssh = hiera('nodo::subsystem::monitor::check_ssh', absent), $ping_rate = hiera('nodo::subsystem::monitor::ping_rate', '!100.0,20%!500.0,60%') ) { + file { '/usr/local/sbin/ifcheck' : + ensure => present, + owner => 'root', + group => 'root', + mode => '0755', + source => 'puppet:///modules/nodo/bin/ifcheck', + } if $use_nagios != false { diff --git a/manifests/subsystem/monitor/interface.pp b/manifests/subsystem/monitor/interface.pp new file mode 100644 index 0000000..102f5b2 --- /dev/null +++ b/manifests/subsystem/monitor/interface.pp @@ -0,0 +1,14 @@ +define nodo::subsystem::monitor::interface( + $ensure = 'present' + $hour = "*", + $minute = "*", +) +{ + cron { "ifcheck-${name}": + command => "/usr/local/sbin/ifcheck ${name}", + user => 'root', + hour => $hour, + minute => $minute, + ensure => $ensure, + } +} -- cgit v1.2.3