From da3e1bea7ed7f248c8fdb04a62b29aa8774199e3 Mon Sep 17 00:00:00 2001 From: Meg Heisler Date: Fri, 26 Jun 2020 11:25:51 -0500 Subject: [PATCH] Add a user to nagios to define a region This will add another user to the nagios start up script to allow a region to be defined based on a region environment variable. Change-Id: Ic067ef5052a684b918851a3b8fb1e4956225364c --- nagios/scripts/entrypoint.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nagios/scripts/entrypoint.sh b/nagios/scripts/entrypoint.sh index ba25c630..ef7eccc1 100755 --- a/nagios/scripts/entrypoint.sh +++ b/nagios/scripts/entrypoint.sh @@ -38,6 +38,9 @@ fi if [ -n "$CEPH_MGR_SERVICE" ]; then echo "\$USER10\$=${CEPH_MGR_SERVICE}" >> ${NAGIOS_HOME}/etc/resource.cfg fi +if [ -n "$REGION" ]; then + echo "\$USER11\$=${REGION}" >> ${NAGIOS_HOME}/etc/resource.cfg +fi touch ${NAGIOS_HOME}/etc/objects/prometheus_discovery_objects.cfg chown nagios ${NAGIOS_HOME}/etc/objects/prometheus_discovery_objects.cfg