diff options
author | Kuldip Rai <kuldip.rai@bell.ca> | 2021-08-31 14:13:58 +0000 |
---|---|---|
committer | kuldipr <kuldip.rai@amdocs.com> | 2021-09-01 19:13:33 -0400 |
commit | 5b68e8c85f9d9148b0d6a9a86cfa62125d25e88c (patch) | |
tree | 150b4685d08c80c272dc05c37844ec2ca19240fc /ms/command-executor/src/main/docker | |
parent | 35481027b3fdf251a3b520ab5b1ae89c7d2d0e34 (diff) |
CCSDK-3451 Prometheus Metrics for command-executor
Issue-ID: CCSDK-3451
Signed-off-by: Kuldip Rai <kuldip.rai@bell.ca>
Change-Id: Ibd11257037ec6f1941b5dee08cc97177b2c798c9
Diffstat (limited to 'ms/command-executor/src/main/docker')
-rw-r--r-- | ms/command-executor/src/main/docker/Dockerfile | 2 | ||||
-rwxr-xr-x | ms/command-executor/src/main/docker/start.sh | 15 |
2 files changed, 15 insertions, 2 deletions
diff --git a/ms/command-executor/src/main/docker/Dockerfile b/ms/command-executor/src/main/docker/Dockerfile index 3ac758f05..093a28e6e 100644 --- a/ms/command-executor/src/main/docker/Dockerfile +++ b/ms/command-executor/src/main/docker/Dockerfile @@ -18,7 +18,7 @@ RUN tar -xzf /source.tar.gz -C /tmp \ && chmod -R 755 /opt RUN python -m pip install --no-cache-dir --upgrade pip setuptools -RUN pip install --no-cache-dir grpcio==1.20.0 grpcio-tools==1.20.0 virtualenv==16.7.9 +RUN pip install --no-cache-dir grpcio==1.20.0 grpcio-tools==1.20.0 virtualenv==16.7.9 prometheus-client==0.11.0 USER onap ENTRYPOINT /opt/app/onap/command-executor/start.sh diff --git a/ms/command-executor/src/main/docker/start.sh b/ms/command-executor/src/main/docker/start.sh index 38357a091..d49adf7a5 100755 --- a/ms/command-executor/src/main/docker/start.sh +++ b/ms/command-executor/src/main/docker/start.sh @@ -22,6 +22,19 @@ then export APP_PORT=50051 fi +if [ -z "${PROMETHEUS_PORT}" ] +then + echo "PROMETHEUS_PORT environment variable is not set, using default(10005)." + export PROMETHEUS_PORT=10005 +fi + +if [ -z "${PROMETHEUS_METRICS_ENABLED}" ] +then + echo "PROMETHEUS_METRICS_ENABLED environment variable is not set, using default(false)." + #enable this feature via charts. + export PROMETHEUS_METRICS_ENABLED=false +fi + if [ -z "${BASIC_AUTH}" ] then echo "BASIC_AUTH environment variable is not set, using default." @@ -39,4 +52,4 @@ then fi cd /opt/app/onap/python/ -python server.py ${APP_PORT} ${BASIC_AUTH}
\ No newline at end of file +python server.py ${APP_PORT} ${BASIC_AUTH} |