Giuseppe Lavagetto has submitted this change and it was merged.
Change subject: docker::registry: add monitoring
......................................................................
docker::registry: add monitoring
Change-Id: I8959cca71eec4658275e9193b3c6cfd43a83b118
---
M modules/nagios_common/files/checkcommands.cfg
M modules/profile/manifests/docker/registry.pp
2 files changed, 20 insertions(+), 0 deletions(-)
Approvals:
Giuseppe Lavagetto: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/nagios_common/files/checkcommands.cfg
b/modules/nagios_common/files/checkcommands.cfg
index a60989c..a08dcf4 100644
--- a/modules/nagios_common/files/checkcommands.cfg
+++ b/modules/nagios_common/files/checkcommands.cfg
@@ -107,6 +107,11 @@
command_line $USER1$/check_http -I $HOSTADDRESS$ -h $ARG1$ -u $ARG2$ -e
"HTTP/1.1 401 "
}
+define command {
+ command_name check_http_port_status
+ command_line $USER1$/check_http -I $HOSTADDRESS$ -p $ARG1$ -e "HTTP/1.1
$ARG2$ "
+ }
+
# 'check_local_disk' command definition
define command {
command_name check_local_disk
diff --git a/modules/profile/manifests/docker/registry.pp
b/modules/profile/manifests/docker/registry.pp
index 7e76441..15c6ee1 100644
--- a/modules/profile/manifests/docker/registry.pp
+++ b/modules/profile/manifests/docker/registry.pp
@@ -75,4 +75,19 @@
port => '81',
srange => '$DOMAIN_NETWORKS',
}
+
+ # Monitoring
+ # HTTP should return 403 forbidden
+ monitoring::service { 'check_docker_registry_http':
+ description => 'Docker registry HTTP interface',
+ check_command => 'check_http_port_status!81!403',
+ }
+ # This will test both nginx and the docker registry application
+ monitoring::service { 'check_docker_registry_https':
+ description => 'Docker registry HTTP interface',
+ check_command =>
"check_https_url_for_string!${::fqdn}!/v2/wikimedia-jessie/manifests/latest!schemaVersion",
+ }
+
+ nrpe::monitor_systemd_unit_state{ 'docker-registry': }
+
}
--
To view, visit https://gerrit.wikimedia.org/r/320206
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8959cca71eec4658275e9193b3c6cfd43a83b118
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits