Skip to content

Commit

Permalink
csv-values, mysql-query: Improve perfdata result
Browse files Browse the repository at this point in the history
  • Loading branch information
markuslf committed Jun 7, 2024
1 parent c3e8065 commit a96015f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions check-plugins/csv-values/csv-values
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions check-plugins/mysql-query/mysql-query
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit a96015f

Please sign in to comment.