Below is the CURL command which gives the status running in RUNDECK
url = "curl -kv https://vn2-lpgdmt-capp99.rno.vzon.com:8990/health/check"
My Code is as follows:
payload={}
Headers={ i have defined here }
response = requests.request("GET", url, headers=headers, data = payload,verify=False)
status = response.status_code
print(status)
response_val = response.json()
response_val = json.dumps(response_val)
if status != 200 :
print('********Error in Response***********')
print('Status :'+ str(status))
print('********Please check for Rundeck Options,URL*********')
print(response.content)
else:
for pattern in part:
if re.search(pattern, response_val):
print('Data Found for ServerNo :'+ pattern)
else:
print('No Data Found for ServerNo :'+ pattern)
print('**************************************************************************')
i want to give multiple curl commands and check status of all those servers , if status is 200 ok then send msg saying Heartbeat Good, if not Hearbeat is Dead" Error
kindly help