[fix] false positive on nova-services

Nova-services have a false positive due to index of return table contain
the word "down" for column "Forced down"

Tested on Xena

Story: 2008299
Task: 41184

Change-Id: I4ffecb21079c04ca1a7976bea06544dad271d851
Signed-off-by: Cyril Lopez <cylopez@redhat.com>
This commit is contained in:
Cyril Lopez
2022-01-06 14:31:11 +01:00
parent efca596141
commit 08de36aaee

View File

@@ -2,7 +2,7 @@
source ~/openrc
output=$(nova service-list | grep down)
output=$(nova service-list | tail -n +3 | grep down)
if [ $? -eq 0 ]; then
echo -n "CRITICAL - OpenStack Nova services down: "
echo "${output}" | awk '{print $2,$4}' | while read LINE; do