summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2010-02-20 18:56:46 -0500
committerMicah Anderson <micah@riseup.net>2010-02-20 18:56:46 -0500
commite7f85f647e6f641bd85fbdfdb26982350f782370 (patch)
tree72cb9d27eaae00ed3a2e5749b3dc135fb0285dcf
parent50d7024becffc6919d3e5efa82545c7869ac0264 (diff)
the debian package nagios-plugins and nagios-plugins-basic defines a
number of the check_commands that were being defined by this module, this caused duplicate definition issues, so to solve this we don't define the subset of commands on debian/ubuntu systems that are handled by the package, but let other operatingsystems define them (as they were before)
-rw-r--r--manifests/defaults/commands.pp80
1 files changed, 56 insertions, 24 deletions
diff --git a/manifests/defaults/commands.pp b/manifests/defaults/commands.pp
index c3190af..4e6933a 100644
--- a/manifests/defaults/commands.pp
+++ b/manifests/defaults/commands.pp
@@ -2,54 +2,86 @@ class nagios::defaults::commands {
# common service commands
- nagios_command {
+ case $operatingsystem {
+ debian,ubuntu: {
+ check_dummy:
+ command_line => '$USER1$/check_dummy $ARG1$';
+ check-host-alive:
+ command_line => '$USER1$/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1';
+ check_ssh_port:
+ command_line => '$USER1$/check_ssh -p $ARG1$ $HOSTADDRESS$';
+ check_https_cert:
+ command_line => '$USER1$/check_http --ssl -C 20 -H $HOSTADDRESS$ -I $HOSTADDRESS$';
+ check_http_url:
+ command_line => '$USER1$/check_http -H $ARG1$ -u $ARG2$';
+ check_http_url_regex:
+ command_line => '$USER1$/check_http -H $ARG1$ -u $ARG2$ -e $ARG3$';
+ check_https_url:
+ command_line => '$USER1$/check_http --ssl -H $ARG1$ -u $ARG2$';
+ check_https_url_regex:
+ command_line => '$USER1$/check_http --ssl -H $ARG1$ -u $ARG2$ -e $ARG3$';
+ check_mysql_db:
+ command_line => '$USER1$/check_mysql -H $ARG1$ -P $ARG2$ -u $ARG3$ -p $ARG4$ -d $ARG5$';
+ check_ntp_time:
+ command_line => '$USER1$/check_ntp_time -H $HOSTADDRESS$ -w 0.5 -c 1';
+ check_silc:
+ command_line => '$USER1$/check_tcp -p 706 -H $ARG1$';
+ check_sobby:
+ command_line => '$USER1$/check_tcp -H $ARG1$ -p $ARG2$';
+ check_jabber:
+ command_line => '$USER1$/check_jabber -H $ARG1$';
+ }
+ default: {
+ nagios_command {
check_dummy:
- command_line => '$USER1$/check_dummy $ARG1$';
+ command_line => '$USER1$/check_dummy $ARG1$';
check_ping:
- command_line => '$USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$';
+ command_line => '$USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$';
check-host-alive:
- command_line => '$USER1$/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1';
+ command_line => '$USER1$/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1';
check_tcp:
- command_line => '$USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$';
+ command_line => '$USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$';
check_udp:
- command_line => '$USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$';
+ command_line => '$USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$';
check_load:
- command_line => '$USER1$/check_load --warning=$ARG1$,$ARG2$,$ARG3$ --critical=$ARG4$,$ARG5$,$ARG6$';
+ command_line => '$USER1$/check_load --warning=$ARG1$,$ARG2$,$ARG3$ --critical=$ARG4$,$ARG5$,$ARG6$';
check_disk:
- command_line => '$USER1$/check_disk -w $ARG1$ -c $ARG2$ -e -p $ARG3$';
+ command_line => '$USER1$/check_disk -w $ARG1$ -c $ARG2$ -e -p $ARG3$';
check_all_disks:
- command_line => '$USER1$/check_disk -w $ARG1$ -c $ARG2$ -e';
+ command_line => '$USER1$/check_disk -w $ARG1$ -c $ARG2$ -e';
check_ssh:
- command_line => '$USER1$/check_ssh $HOSTADDRESS$';
+ command_line => '$USER1$/check_ssh $HOSTADDRESS$';
check_ssh_port:
- command_line => '$USER1$/check_ssh -p $ARG1$ $HOSTADDRESS$';
+ command_line => '$USER1$/check_ssh -p $ARG1$ $HOSTADDRESS$';
check_http:
- command_line => '$USER1$/check_http -H $HOSTADDRESS$ -I $HOSTADDRESS$';
+ command_line => '$USER1$/check_http -H $HOSTADDRESS$ -I $HOSTADDRESS$';
check_https:
- command_line => '$USER1$/check_http --ssl -H $HOSTADDRESS$ -I $HOSTADDRESS$';
+ command_line => '$USER1$/check_http --ssl -H $HOSTADDRESS$ -I $HOSTADDRESS$';
check_https_cert:
- command_line => '$USER1$/check_http --ssl -C 20 -H $HOSTADDRESS$ -I $HOSTADDRESS$';
+ command_line => '$USER1$/check_http --ssl -C 20 -H $HOSTADDRESS$ -I $HOSTADDRESS$';
check_http_url:
- command_line => '$USER1$/check_http -H $ARG1$ -u $ARG2$';
+ command_line => '$USER1$/check_http -H $ARG1$ -u $ARG2$';
check_http_url_regex:
- command_line => '$USER1$/check_http -H $ARG1$ -u $ARG2$ -e $ARG3$';
+ command_line => '$USER1$/check_http -H $ARG1$ -u $ARG2$ -e $ARG3$';
check_https_url:
- command_line => '$USER1$/check_http --ssl -H $ARG1$ -u $ARG2$';
+ command_line => '$USER1$/check_http --ssl -H $ARG1$ -u $ARG2$';
check_https_url_regex:
- command_line => '$USER1$/check_http --ssl -H $ARG1$ -u $ARG2$ -e $ARG3$';
+ command_line => '$USER1$/check_http --ssl -H $ARG1$ -u $ARG2$ -e $ARG3$';
check_mysql:
- command_line => '$USER1$/check_mysql -H $ARG1$ -P $ARG2$ -u $ARG3$ -p $ARG4$';
+ command_line => '$USER1$/check_mysql -H $ARG1$ -P $ARG2$ -u $ARG3$ -p $ARG4$';
check_mysql_db:
- command_line => '$USER1$/check_mysql -H $ARG1$ -P $ARG2$ -u $ARG3$ -p $ARG4$ -d $ARG5$';
+ command_line => '$USER1$/check_mysql -H $ARG1$ -P $ARG2$ -u $ARG3$ -p $ARG4$ -d $ARG5$';
check_ntp_time:
- command_line => '$USER1$/check_ntp_time -H $HOSTADDRESS$ -w 0.5 -c 1';
+ command_line => '$USER1$/check_ntp_time -H $HOSTADDRESS$ -w 0.5 -c 1';
check_silc:
- command_line => '$USER1$/check_tcp -p 706 -H $ARG1$';
+ command_line => '$USER1$/check_tcp -p 706 -H $ARG1$';
check_sobby:
- command_line => '$USER1$/check_tcp -H $ARG1$ -p $ARG2$';
+ command_line => '$USER1$/check_tcp -H $ARG1$ -p $ARG2$';
check_jabber:
- command_line => '$USER1$/check_jabber -H $ARG1$';
+ command_line => '$USER1$/check_jabber -H $ARG1$';
+ }
}
+ }
# commands for services defined by other modules