From a96015fda88afb16b0a500ea9caed038887f1088 Mon Sep 17 00:00:00 2001 From: Markus Frei Date: Fri, 7 Jun 2024 17:41:34 +0200 Subject: [PATCH] csv-values, mysql-query: Improve perfdata result --- check-plugins/csv-values/csv-values | 6 +++--- check-plugins/mysql-query/mysql-query | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/check-plugins/csv-values/csv-values b/check-plugins/csv-values/csv-values index 15569123..36d18ff1 100755 --- a/check-plugins/csv-values/csv-values +++ b/check-plugins/csv-values/csv-values @@ -32,7 +32,7 @@ from lib.globals import (STATE_CRIT, STATE_OK, # pylint: disable=C0413 STATE_UNKNOWN, STATE_WARN) __author__ = 'Linuxfabrik GmbH, Zurich/Switzerland' -__version__ = '2024060301' +__version__ = '2024060601' DESCRIPTION = """This check imports a CSV file into an SQLite database and can then run a separate warning query and/or a critical query against it. The result - the number of @@ -395,8 +395,8 @@ def main(): # no results pass - perfdata += lib.base.get_perfdata('cnt_warn', cnt_warn, None, None, None, None, None) - perfdata += lib.base.get_perfdata('cnt_crit', cnt_crit, None, None, None, None, None) + perfdata += lib.base.get_perfdata('cnt_warn', cnt_warn, None, args.WARN, None, None, None) + perfdata += lib.base.get_perfdata('cnt_crit', cnt_crit, None, None, args.CRIT, None, None) # over and out lib.base.oao(msg, state, perfdata, always_ok=args.ALWAYS_OK) diff --git a/check-plugins/mysql-query/mysql-query b/check-plugins/mysql-query/mysql-query index bee64899..c7308a89 100755 --- a/check-plugins/mysql-query/mysql-query +++ b/check-plugins/mysql-query/mysql-query @@ -22,7 +22,7 @@ from lib.globals import (STATE_CRIT, STATE_OK, # pylint: disable=C0413 __author__ = 'Linuxfabrik GmbH, Zurich/Switzerland' -__version__ = '2024060302' +__version__ = '2024060601' DESCRIPTION = """This check connects to a MySQL/MariaDB database and can then run a separate warning and/or critical query against it. The result - the number of items found @@ -223,8 +223,8 @@ def main(): # no results pass - perfdata += lib.base.get_perfdata('cnt_warn', cnt_warn, None, None, None, None, None) - perfdata += lib.base.get_perfdata('cnt_crit', cnt_crit, None, None, None, None, None) + perfdata += lib.base.get_perfdata('cnt_warn', cnt_warn, None, args.WARN, None, None, None) + perfdata += lib.base.get_perfdata('cnt_crit', cnt_crit, None, None, args.CRIT, None, None) # over and out lib.base.oao(msg, state, perfdata, always_ok=args.ALWAYS_OK)