]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - flakes/private/monitoring/plugins/check_ftp_database
Squash changes containing private information
[perso/Immae/Config/Nix.git] / flakes / private / monitoring / plugins / check_ftp_database
diff --git a/flakes/private/monitoring/plugins/check_ftp_database b/flakes/private/monitoring/plugins/check_ftp_database
new file mode 100755 (executable)
index 0000000..f9cf579
--- /dev/null
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+OUT=$(echo "ls" | lftp -u test_ftp,test_ftp eldiron.immae.eu | grep it_works | wc -l)
+
+if [ "$OUT" -eq 1 ]; then
+  echo "ftp connection OK - access to ftp is working | ftp=1;;;;"
+  exit 0
+else
+  echo "ftp connection CRITICAL - no access to ftp | ftp=0;;;;"
+  exit 2
+fi