we are using the check_compellent located here: https://exchange.nagios.org/directory/P ... nt/details
if i SNMPWALK
snmpwalk -v 2c -O vqe -c public x.x.x.x .1.3.6.1.4.1.674.11000.2000.500.1.2.27.1.4 to get server names.
and
snmpwalk -v 2c -O vqe -c public x.x.x.x .1.3.6.1.4.1.674.11000.2000.500.1.2.27.1.3 to get the status ( connected/disconnected/unknown/ok )
the odd thing is i seem to be pulling accurate info where the server list and the status of 2 downed servers seems correct
but
nagios displays the wrong server names as down.
these two are down and the snmpwalk agrees
server1 2
server2 2
nagios displays:
Down Servers: "server9" "server11" < these servers are up and OK.
any ideas would be appreciated.
help with plugin 'check_compellent"
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: help with plugin 'check_compellent"
I looked at the plugin and it does not seem to have any verbose option for printing out the logic.
I would add some echo statements in the sections where the logic is happening, for example:
Specifically:
and:
You need to follow the logic of the script to see what is happening and see if you can determine patterns.
I would add some echo statements in the sections where the logic is happening, for example:
Code: Select all
declare -a servercrit=($(snmpwalk -v 2c -O vqe -c ${community} ${host} .1.3.6.1.4.1.674.11000.2000.500.1.2.27.1.3 | grep -n "3" | awk -F : '{print $1}' | tr '\n' ' '))
c=0
for line in ${servercrit[@]}
do servercrit[$c]=`expr ${servercrit[$c]} - 1`
echo "$c"
echo "servercrit[$c]"
let c++
done
# find the corresponding names of the critical server
c=0
for line in ${servercrit[@]}
do serverfinalcrit[${c}]=${servernames[$line]}
echo "$c"
echo "serverfinalcrit[${c}]"
let c++
doneCode: Select all
echo "$c"
echo "servercrit[$c]"Code: Select all
echo "$c"
echo "serverfinalcrit[${c}]"As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: help with plugin 'check_compellent"
i will try this. thank you.
Re: help with plugin 'check_compellent"
Code: Select all
echo "$c"
echo "serverfinalcrit[${c}]"
echo "$w"
echo "serverfinalwarn[${w}]"
echo "$o"
echo "serverfinalok[${o}]"
when i run the check:
./check_compellent.pl -H x.x.x.x -C public -t server -w 2 -c 3
it starts to display a list:
serverwarn[]
serverwarn[]
serverok[]
1
serverok[1]
2
serverok[2]
3
.........
serverok[122]
123
serverok[123]
124
serverok[124]
Down Servers: "notdownserver1" "notdownserver2" < names changed to protect the innocent.
still listing the incorrect server names as down.
ideas?
Re: help with plugin 'check_compellent"
The full commands it runs are:
I think it is failing to line up the servers that are returned with the statuses that are returned:
I'm not able to test and think it may be worth trying to print out these arrays to see if they line up.
Code: Select all
declare -a servernames=($(snmpwalk -v 2c -O vqe -c ${community} ${host} .1.3.6.1.4.1.674.11000.2000.500.1.2.27.1.4 | tr '\n' ' '))
declare -a serverwarn=($(snmpwalk -v 2c -O vqe -c ${community} ${host} .1.3.6.1.4.1.674.11000.2000.500.1.2.27.1.3 | grep -n "2" | awk -F : '{print $1}' | tr '\n' ' '))Code: Select all
declare -a serverwarn=($(snmpwalk -v 2c -O vqe -c ${community} ${host} .1.3.6.1.4.1.674.11000.2000.500.1.2.27.1.3 | grep -n "2" | awk -F : '{print $1}' | tr '\n' ' '))
c=0
for line in ${serverwarn[@]}
do serverwarn[$w]=`expr ${serverwarn[$w]} - 1`
let c++
done
# find the corresponding names of the warning server
c=0
for line in ${serverwarn[@]}
do serverfinalwarn[${w}]=${servernames[$line]}
let w++
doneAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.