summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2009-12-22 11:00:09 -0500
committerJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2009-12-22 11:00:09 -0500
commit83963cef28ca42055d5becbf0b697ee1f4bd5d4a (patch)
treedf291f016d8489648444545a3bef2ce033b56aa5 /manifests
parent6ec1a7278b66826b2e64589ab5336243b27cffdb (diff)
adjust mysql commands & service
Diffstat (limited to 'manifests')
-rw-r--r--manifests/defaults/commands.pp6
-rw-r--r--manifests/service/mysql.pp16
2 files changed, 8 insertions, 14 deletions
diff --git a/manifests/defaults/commands.pp b/manifests/defaults/commands.pp
index 342fed1..795c526 100644
--- a/manifests/defaults/commands.pp
+++ b/manifests/defaults/commands.pp
@@ -36,11 +36,11 @@ class nagios::defaults::commands {
check_https_url_regex:
command_line => '$USER1$/check_http --ssl -H $ARG1$ -u $ARG2$ -e $ARG3$';
check_mysql:
- command_line => '$USER1$/check_mysql -u $ARG1$ -p $ARG2$ -d $ARG3$ ';
+ command_line => '$USER1$/check_mysql -u $ARG1$ -p $ARG2$';
check_mysql_socket:
- command_line => '$USER1$/check_mysql -s $ARG1$ -u $ARG2$ -p $ARG3$ -d $ARG4$ ';
+ command_line => '$USER1$/check_mysql -s $ARG1$ -u $ARG2$ -p $ARG3$';
check_mysql_tcp:
- command_line => '$USER1$/check_mysql -H $ARG1$ -u $ARG2$ -p $ARG3$ -d $ARG4$';
+ command_line => '$USER1$/check_mysql -H $ARG1$ -u $ARG2$ -p $ARG3$';
check_ntp_time:
command_line => '$USER1$/check_ntp_time -H $HOSTADDRESS$ -w 0.5 -c 1';
check_silc:
diff --git a/manifests/service/mysql.pp b/manifests/service/mysql.pp
index d09f335..9d99d09 100644
--- a/manifests/service/mysql.pp
+++ b/manifests/service/mysql.pp
@@ -4,30 +4,24 @@ define nagios::service::mysql(
$check_socket = 'absent',
$check_username = 'nagios',
$check_password = '',
- $check_database = '',
- $check_mode = 'absent'
+ $check_mode = 'tcp'
){
- $real_check_mode = $check_mode ? {
- 'absent' => 'tcp',
- default => 'socket',
- }
-
- case $real_check_mode {
+ case $check_mode {
# Check MySQL using TCP
'tcp': {
nagios::service { 'mysql_tcp':
ensure => $ensure,
- check_command => "check_mysql_tcp!${check_hostname}!${check_username}!${check_password}!${check_database}",
+ check_command => "check_mysql_tcp!${check_hostname}!${check_username}!${check_password}",
}
}
# Check MySQL using local socket
- 'socket': {
+ default: {
nagios::service { 'mysql_socket':
ensure => $ensure,
check_command => $check_socket ? {
'absent' => "check_mysql!${check_username}!${check_password}!${check_database}",
- default => "check_mysql_socket!${check_socket}!${check_username}!${check_password}!${check_database}",
+ default => "check_mysql_socket!${check_socket}!${check_username}!${check_password}",
},
}
}