From 5f3f92ea498138ce415e29dff1f515ddaf66a069 Mon Sep 17 00:00:00 2001 From: Dmitriy Sumin Date: Mon, 29 Jul 2024 14:08:41 +0300 Subject: [PATCH] Add perfdata with state for arbiterOnly result, useful for dashboards in grafana --- check_mongodb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_mongodb.py b/check_mongodb.py index 7fbabe7..c3d14bd 100755 --- a/check_mongodb.py +++ b/check_mongodb.py @@ -348,7 +348,7 @@ def mongo_connect(host=None, port=None, ssl=False, user=None, passwd=None, repli sys.exit(2) if 'arbiterOnly' in result and result['arbiterOnly'] == True: - print("OK - State: 7 (Arbiter on port %s)" % (port)) + print("OK - State: 7 (Arbiter on port %s)" % (port) + " |state=7") sys.exit(0) if user and passwd: