]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/monitoring/plugins/check_ovh_sms
Squash changes containing private information
[perso/Immae/Config/Nix.git] / modules / private / monitoring / plugins / check_ovh_sms
diff --git a/modules/private/monitoring/plugins/check_ovh_sms b/modules/private/monitoring/plugins/check_ovh_sms
deleted file mode 100755 (executable)
index caf279c..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env python
-
-import sys
-try:
-    import ovh
-
-    [endpoint, application_key, application_secret, consumer_key, account] = sys.argv[1].split(",")
-    client = ovh.Client(
-        endpoint=endpoint,
-        application_key=application_key,
-        application_secret=application_secret,
-        consumer_key=consumer_key,
-    )
-
-    result = client.get('/sms/{}'.format(account))["creditsLeft"]
-
-    if result < 20:
-        print("SMS OVH Critical - Not enough sms left ({})|SMS={};;;;".format(result, result))
-        sys.exit(2)
-    else:
-        print("SMS OVH Ok - Enough sms left ({})|SMS={};;;;".format(result, result))
-        sys.exit(0)
-except Exception:
-    print("SMS OVH UNKNOWN - Error during script")
-    sys.exit(3)