summaryrefslogtreecommitdiff
path: root/src/soc_collector/healthcheck.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc_collector/healthcheck.sh')
-rwxr-xr-xsrc/soc_collector/healthcheck.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/soc_collector/healthcheck.sh b/src/soc_collector/healthcheck.sh
new file mode 100755
index 0000000..10d599c
--- /dev/null
+++ b/src/soc_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/soc_collector/healthcheck.py "$1" || exit 1