From bdc901170a9752dc736d94b56280181333ab7cf4 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 6 May 2008 23:43:52 +0000 Subject: added wrapper for restart and fixed command --- manifests/init.pp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'manifests') diff --git a/manifests/init.pp b/manifests/init.pp index f9939df..da6aa8a 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -102,7 +102,7 @@ class nagios::base { mode => 0755, owner => root, group => 0; } - nagios_command{ + nagios::command{ ssh_port: command_line => '$USER1$/check_ssh -p $ARG1$ $HOSTADDRESS$'; # from apache2.pp @@ -112,7 +112,7 @@ class nagios::base { check_dig2: command_line => '$USER1$/check_dig -H $HOSTADDRESS$ -l $ARG1$ --record_type=$ARG2$'; check_ntp: - command_line => '$USER1/check_ntp -H $HOSTADDRESS$ -w 0.5 -c 1'; + command_line => '$USER1$/check_ntp -H $HOSTADDRESS$ -w 0.5 -c 1'; } Nagios_command <<||>> @@ -243,6 +243,14 @@ define nagios::extra_host($ip, $nagios_alias, $host_use = 'generic-host', $paren } } +# just a wrapper to make the notify more easy +define nagios::comand( $command_line ){ + nagios_command{$name + command_line => $command, + notify => Service[nagios], + } +} + define nagios::service( $check_command, $host_name = $fqdn, -- cgit v1.2.3