Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/386258 )
Change subject: gerrit/icinga: fix check_ssh on a custom (service) IP ...................................................................... gerrit/icinga: fix check_ssh on a custom (service) IP The current check_ssh command definitions always use $HOSTADDRESS$ no matter what. But in some cases, like gerrit, we have a server AND a service IP and we don't want all services to listen on all IP addresses, just on the service IP. Idbc1654033fb075eded did this for SSH on port 29418. But that broke monitoring which was checking the wrong (server) IP. Add a new Icinga command that makes it possible to check for SSHd on a custom IP. Use it for gerrit-ssh. Change-Id: I528952be557cbc3d820824537cbcb371828cb280 --- M modules/nagios_common/files/check_commands/ssh.cfg M modules/profile/manifests/gerrit/server.pp 2 files changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/58/386258/1 diff --git a/modules/nagios_common/files/check_commands/ssh.cfg b/modules/nagios_common/files/check_commands/ssh.cfg index d641d13..a9838ea 100644 --- a/modules/nagios_common/files/check_commands/ssh.cfg +++ b/modules/nagios_common/files/check_commands/ssh.cfg @@ -25,3 +25,10 @@ command_name check_ssh_port_4 command_line /usr/lib/nagios/plugins/check_ssh -4 -p '$ARG1$' '$HOSTADDRESS$' } + +# check ssh port on custom IP (like a service IP) +define command{ + command_name check_ssh_port_ip + command_line /usr/lib/nagios/plugins/check_ssh -p '$ARG1$' '$ARG2$' +} + diff --git a/modules/profile/manifests/gerrit/server.pp b/modules/profile/manifests/gerrit/server.pp index d3a8736..9e69dfd 100644 --- a/modules/profile/manifests/gerrit/server.pp +++ b/modules/profile/manifests/gerrit/server.pp @@ -29,7 +29,7 @@ monitoring::service { 'gerrit_ssh': description => 'SSH access', - check_command => 'check_ssh_port!29418', + check_command => 'check_ssh_port_ip!29418!$ipv4', contact_group => 'admins,gerrit', } -- To view, visit https://gerrit.wikimedia.org/r/386258 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I528952be557cbc3d820824537cbcb371828cb280 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn <dz...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits