check_vllm: fix
This commit is contained in:
parent
e1fe37a175
commit
f3c09a60e7
|
@ -77,7 +77,7 @@ def main(critical, warning, timeout, target_url, does_not_contain, verify):
|
||||||
exit_code = nagios.STATE_OK
|
exit_code = nagios.STATE_OK
|
||||||
else:
|
else:
|
||||||
perfdata = {}
|
perfdata = {}
|
||||||
text_result = f"CRITICAL - request failed - {error.__class__.__name__}: {error}"
|
text_result = f"request failed - {error.__class__.__name__}: {error}"
|
||||||
exit_code = nagios.STATE_CRIT
|
exit_code = nagios.STATE_CRIT
|
||||||
|
|
||||||
print_icinga2_check_status(text_result, exit_code, perfdata)
|
print_icinga2_check_status(text_result, exit_code, perfdata)
|
||||||
|
@ -89,7 +89,7 @@ if __name__ == "__main__":
|
||||||
parser.add_argument('-c', '--critical', type=float, default=60, help='Critical threshold for response time in seconds (default: 60)')
|
parser.add_argument('-c', '--critical', type=float, default=60, help='Critical threshold for response time in seconds (default: 60)')
|
||||||
parser.add_argument('-w', '--warning', type=float, default=30, help='Warning threshold for response time in seconds (default: 30)')
|
parser.add_argument('-w', '--warning', type=float, default=30, help='Warning threshold for response time in seconds (default: 30)')
|
||||||
parser.add_argument('-t', '--target-url', type=str, required=True, help='Your completion API endpoint')
|
parser.add_argument('-t', '--target-url', type=str, required=True, help='Your completion API endpoint')
|
||||||
parser.add_argument('-m', '--timeout', type=float, default=300, help='Request timeout in seconds (default: 300)')
|
parser.add_argument('-m', '--timeout', type=float, default=200, help='Request timeout in seconds (default: 200)')
|
||||||
parser.add_argument('-v', '--no-verify', action='store_false', help='Do not verify SSL')
|
parser.add_argument('-v', '--no-verify', action='store_false', help='Do not verify SSL')
|
||||||
parser.add_argument('-n', '--does-not-contain', type=str, help='Response must not contain this string')
|
parser.add_argument('-n', '--does-not-contain', type=str, help='Response must not contain this string')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
Loading…
Reference in New Issue