From 1159fd799dcf85bedbe0bb9ce44971263250ee46 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 10 Feb 2012 14:42:16 +0100 Subject: use trocla for that password --- manifests/service/mysql.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'manifests/service/mysql.pp') diff --git a/manifests/service/mysql.pp b/manifests/service/mysql.pp index 2fde402..53f1461 100644 --- a/manifests/service/mysql.pp +++ b/manifests/service/mysql.pp @@ -1,11 +1,11 @@ -# Checks a mysql instance via tcp or socket +# Checks a mysql instance via tcp or socket define nagios::service::mysql( $ensure = present, $check_host = 'absent', $check_port = '3306', $check_username = 'nagios', - $check_password = $nagios_mysql_password, + $check_password = trocla("mysql_nagios_${::fqdn}",'plain','length: 32'), $check_database = 'information_schema', $check_warning = undef, $check_critical = undef, @@ -51,7 +51,7 @@ define nagios::service::mysql( } } } - + nagios::service { "mysql_health_${name}": ensure => $ensure, check_command => "check_mysql_health!${real_check_host}!${check_port}!${check_username}!${check_password}!${check_health_mode}!${check_database}${real_check_name}${real_check_warning}${real_check_critical}", -- cgit v1.2.3 From 1eef6f70c0b3096be24954bfd23306cf82a0d316 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Wed, 18 Apr 2012 14:41:13 -0400 Subject: put single quotes around the password to guard against exclamation points in passwords --- manifests/service/mysql.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/service/mysql.pp') diff --git a/manifests/service/mysql.pp b/manifests/service/mysql.pp index 53f1461..4a9c81a 100644 --- a/manifests/service/mysql.pp +++ b/manifests/service/mysql.pp @@ -54,6 +54,6 @@ define nagios::service::mysql( nagios::service { "mysql_health_${name}": ensure => $ensure, - check_command => "check_mysql_health!${real_check_host}!${check_port}!${check_username}!${check_password}!${check_health_mode}!${check_database}${real_check_name}${real_check_warning}${real_check_critical}", + check_command => "check_mysql_health!${real_check_host}!${check_port}!${check_username}!'${check_password}'!${check_health_mode}!${check_database}${real_check_name}${real_check_warning}${real_check_critical}", } } -- cgit v1.2.3 From 1aa9016a39968e812baf1b176eeaf0f2542c89e3 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 2 Jan 2013 18:29:51 +0100 Subject: trocla should be optional --- manifests/service/mysql.pp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'manifests/service/mysql.pp') diff --git a/manifests/service/mysql.pp b/manifests/service/mysql.pp index 4a9c81a..2c74717 100644 --- a/manifests/service/mysql.pp +++ b/manifests/service/mysql.pp @@ -1,11 +1,10 @@ # Checks a mysql instance via tcp or socket - define nagios::service::mysql( $ensure = present, $check_host = 'absent', $check_port = '3306', $check_username = 'nagios', - $check_password = trocla("mysql_nagios_${::fqdn}",'plain','length: 32'), + $check_password, $check_database = 'information_schema', $check_warning = undef, $check_critical = undef, -- cgit v1.2.3