From 1a64deeb894dc95e2645a75771732c6cc53a79ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Wed, 4 Oct 2023 01:35:06 +0200 Subject: Squash changes containing private information There were a lot of changes since the previous commit, but a lot of them contained personnal information about users. All thos changes got stashed into a single commit (history is kept in a different place) and private information was moved in a separate private repository --- modules/private/monitoring/plugins/send_nrdp.sh | 57 ------------------------- 1 file changed, 57 deletions(-) delete mode 100755 modules/private/monitoring/plugins/send_nrdp.sh (limited to 'modules/private/monitoring/plugins/send_nrdp.sh') diff --git a/modules/private/monitoring/plugins/send_nrdp.sh b/modules/private/monitoring/plugins/send_nrdp.sh deleted file mode 100755 index c83c8cb..0000000 --- a/modules/private/monitoring/plugins/send_nrdp.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash - -TEMPLATE='{ - "cmd": "submitcheck", - "token": $token, - "checkresult": [{ - "hostname": $hostname, - "state": $state, - "output": $output, - "type": $type, - "servicename": $servicename - }] -}' - -while getopts "u:t:H:s:S:o:" option -do - case $option in - u) url=$OPTARG ;; - t) token=$OPTARG ;; - H) hostname=$OPTARG ;; - s) servicename=$OPTARG ;; - S) state=$OPTARG ;; - o) output=$OPTARG ;; - esac -done - -if [ -n "$servicename" ]; then - checktype="service" -else - checktype="host" -fi - -payload=$(jq -n \ - --arg type "$checktype" \ - --arg hostname "$hostname" \ - --arg servicename "$servicename" \ - --arg output "$output" \ - --arg token "$token" \ - --arg state "$state" \ - "$TEMPLATE") - -rslt=$(curl -f --silent --insecure -d "$payload" -H "Content-Type: application/json" "$url") -ret=$? - -if [ $ret != 0 ];then - echo "ERROR: could not connect to NRDP server at $url" - exit 1 -fi - -status=$(echo "$rslt" | jq -r .status) -message=$(echo "$rslt" | jq -r .message) - -if [ "$status" != "ok" ];then - echo "ERROR: The NRDP Server said $message" - exit 2 -fi -echo "Sent 1 checks to $url" -- cgit v1.2.3