cancel
Showing results for 
Search instead for 
Did you mean: 
Login & Join the DevCentral Connects Group to watch the Recorded LiveStream (May 12) on Basic iControl Security - show notes included.

EAV Monitor For Multiple Sites.

L_W
Nimbostratus
Nimbostratus

I am trying to create an EAV Monitor that can monitor a site with different endpoints but the same hostname. For example,

Hostname = www.hostname.com

Endpoint1/URI1 = v/1/endpoint1

Endpoint2/URI2 = v/2/endpoint2

 

I am also looking at passing a receive string that will be unique to both endpoint if that will be possible.

 

I already have this curl command and I can't seem to get the loop working.

 

For U in $(URI);

do curl -fNsk --resolve $HOST:$PORT:$NODE https://$HOST$U | grep -i "${RECV}" > /dev/null 2>&1

 

# mark node UP if expected response was received

if [ $? -eq 0 ]

then

  rm -f $PIDFILE

  echo "UP"

else

  rm -f $PIDFILE

fi

exit

1 REPLY 1

msenturk
Altocumulus
Altocumulus

Can you try like that ?

 

for i in 1 2

do

curl -Nsk https://$HOST/v/$i/endpoint$i | grep -i "${RECV}" 2>&1 > /dev/null

done