Path : /proc/3/cwd/var/lib/zabbix/ |
Current File : //proc/3/cwd/var/lib/zabbix/pdns_back_check.sh |
#!/bin/bash host=$1 port=$2 apikey=$3 backend=$4 metric=$5 first=1 IFS=$'\n' check=$(curl "$host:$port/api/v1/servers/localhost" --header "X-API-Key: $apikey" 2>/dev/null | jq '.servers[]| select (.name=="'$backend'").'$metric'') echo "$check"