jeudi 19 mars 2020

if else loop for monitoring web page

Basically a script is running and writing a logs to particular log file. The script is monitoring a page which showing few services along with their status like UP or Down. I want a code which will check status for all the listed services whether it is up or down. The Tool I'm using to run this script will automatically writes a logs hence just need help on code. As of now I'm using following code but I observed it is just checking for 1st condition which I see in logs but not for 2nd and 3rd.

If (XXX service1 is working)

Then Success

else

(This xxx service1 is not working)

If (XXX service2 is working)

Then Success

else

(This xxx service2 is not working)

Aucun commentaire:

Enregistrer un commentaire