ROOTPLOIT
Server: Apache
System: Linux node6122.myfcloud.com 6.14.3-x86_64-linode168 #1 SMP PREEMPT_DYNAMIC Mon Apr 21 19:47:55 EDT 2025 x86_64
User: bashacomputer (1004)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib64/nagios/plugins/check_a2_dnsdist_pools.sh
#!/bin/bash

UP=$(echo 'showServers()' | dnsdist -c | grep State -A 20 | awk '{print $4'} | grep up | wc -l)
DOWN=$(echo 'showServers()' | dnsdist -c | grep State -A 20 | awk '{print $4'} | grep down | wc -l)

if [[ "$UP" -lt 4 || "$DOWN" -gt 3 ]]; then
  echo "dnsdist_pools - CRIT - Servers Up: $UP Servers Down: $DOWN"
  exit 2
else
  echo "dnsdist_pools - OK - Servers Up: $UP Servers Down: $DOWN"
  exit 0
fi