summaryrefslogtreecommitdiff
path: root/src/collector/healthcheck.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/collector/healthcheck.sh')
-rwxr-xr-xsrc/collector/healthcheck.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/collector/healthcheck.sh b/src/collector/healthcheck.sh
new file mode 100755
index 0000000..3c5e042
--- /dev/null
+++ b/src/collector/healthcheck.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+# If mongodb container
+if [ $1 = "MONGODB" ]
+then
+ /usr/bin/mongosh --eval 'disableTelemetry()' -u $MONGODB_USERNAME -p $MONGODB_PASSWORD localhost:27017/production /healthcheck-mongodb.js
+ exit $?
+fi
+
+# If collector
+/usr/bin/python3 ./src/collector/healthcheck.py $1 || exit 1