From 619fba1f5699a5d845b40b7208d82582a4776484 Mon Sep 17 00:00:00 2001 From: Bob Hogg <101146889+bobhoggviakoo@users.noreply.github.com> Date: Wed, 1 Nov 2023 11:02:39 -0700 Subject: [PATCH] Update check_springboot_actuator.py Fixes to make sprinboot nagios plugin actually return data --- check_springboot_actuator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_springboot_actuator.py b/check_springboot_actuator.py index 8647958..8420bc5 100755 --- a/check_springboot_actuator.py +++ b/check_springboot_actuator.py @@ -136,7 +136,7 @@ def handle_version_2(): helper.status(critical) helper.add_summary('could not fetch health data: {}'.format(err)) else: - status = json_data['status'] + status = json_data['status']['code'] if status == 'UP': helper.status(ok) elif status in ('DOWN', 'OUT_OF_SERVICE'): @@ -167,7 +167,7 @@ def handle_version_2(): if version == 1: handle_version_1() - if version == 2: + if version == 2 or version == 3: handle_version_2() helper.exit()