check_vllm: fix
This commit is contained in:
parent
45087f3299
commit
e1fe37a175
|
@ -48,11 +48,7 @@ def main(critical, warning, timeout, target_url, does_not_contain, verify):
|
||||||
text_result = f"failed with status code {response.status_code}\n{response.text}"
|
text_result = f"failed with status code {response.status_code}\n{response.text}"
|
||||||
exit_code = nagios.STATE_CRIT
|
exit_code = nagios.STATE_CRIT
|
||||||
else:
|
else:
|
||||||
if not json_data.get('text'):
|
if not json_data.get('text') or not len(json_data['text']):
|
||||||
text_result = f"did not receive valid JSON\n{response.text}"
|
|
||||||
exit_code = nagios.STATE_CRIT
|
|
||||||
else:
|
|
||||||
if not len(json_data['text']):
|
|
||||||
text_result = f"did not receive valid JSON\n{response.text}"
|
text_result = f"did not receive valid JSON\n{response.text}"
|
||||||
exit_code = nagios.STATE_CRIT
|
exit_code = nagios.STATE_CRIT
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue