Module: check_mk
Branch: master
Commit: 48e010935056f248161f2b7caecfa0b6ab8ce963
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=48e010935056f2…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Tue Jul 3 12:41:30 2018 +0200
oracle_dataguard_stats, oracle_recovery_status: make perfdata tuples.
Change-Id: I5f81df4603c9c8cb8aa55ce1845d0c76b8461793
---
checks/oracle_dataguard_stats | 4 ++--
checks/oracle_recovery_status | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/checks/oracle_dataguard_stats b/checks/oracle_dataguard_stats
index 773a77c..6ff8dec 100644
--- a/checks/oracle_dataguard_stats
+++ b/checks/oracle_dataguard_stats
@@ -117,9 +117,9 @@ def check_oracle_dataguard_stats(item, params, info):
infotext += state_marker
- perfdata.append([parameter.replace(' ', '_'),
seconds, warn, crit])
+ perfdata.append((parameter.replace(' ', '_'),
seconds, warn, crit))
else:
- perfdata.append([parameter.replace(' ', '_'),
seconds])
+ perfdata.append((parameter.replace(' ', '_'),
seconds))
if itemfound == True:
return state, infotext, perfdata
diff --git a/checks/oracle_recovery_status b/checks/oracle_recovery_status
index 5cbf57a..54dd363 100644
--- a/checks/oracle_recovery_status
+++ b/checks/oracle_recovery_status
@@ -114,7 +114,7 @@ def check_oracle_recovery_status(item, params, info):
or not params.get("levels"):
# We ignore the state of the check when no parameters are known
# _mgmtdb is new internal instance from 12.1.0.2 on Grid-Infrastructure
- perfdata.append(['checkpoint_age', oldest_checkpoint_age])
+ perfdata.append(('checkpoint_age', oldest_checkpoint_age))
else:
if database_role == 'PRIMARY':
# checkpoint age should not higher on primary as well
@@ -125,9 +125,9 @@ def check_oracle_recovery_status(item, params, info):
infotext += '(!)'
state = max(1, state)
- perfdata.append(['checkpoint_age', oldest_checkpoint_age, warn])
+ perfdata.append(('checkpoint_age', oldest_checkpoint_age, warn))
else:
- perfdata.append(['checkpoint_age', oldest_checkpoint_age, warn,
crit])
+ perfdata.append(('checkpoint_age', oldest_checkpoint_age, warn,
crit))
# check the checkpoint age on a non primary database!
if oldest_checkpoint_age >= crit:
@@ -157,7 +157,7 @@ def check_oracle_recovery_status(item, params, info):
warn, crit = params["backup_age"]
infotext += " (warn/crit at %s/%s)" %
(get_age_human_readable(warn), get_age_human_readable(crit))
- perfdata.append(['backup_age', oldest_backup_age, warn, crit])
+ perfdata.append(('backup_age', oldest_backup_age, warn, crit))
if oldest_backup_age >= crit:
infotext += '(!!)'
@@ -166,12 +166,12 @@ def check_oracle_recovery_status(item, params, info):
infotext += '(!)'
state = max(1, state)
else:
- perfdata.append(['backup_age', oldest_backup_age])
+ perfdata.append(('backup_age', oldest_backup_age))
else:
# create a 'dummy' performance data with 0
# => The age from plugin is only valid when a datafile is in backup mode!
- perfdata.append(['backup_age', 0])
+ perfdata.append(('backup_age', 0))
return state, infotext, perfdata