Module: check_mk
Branch: master
Commit: 5ac8d7aaa0bad84e1ca4a65fa50c47730a62c7a9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5ac8d7aaa0bad8…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed Feb 20 14:02:14 2019 +0100
AWS checks: Added missing performance data flag resp. metric info
Change-Id: Ifcf448ff481889f31d765977a9602f991ce2a24e
---
checks/aws_ec2 | 3 ++-
checks/aws_rds | 4 +++-
cmk/gui/plugins/metrics/check_mk.py | 6 ++++++
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/checks/aws_ec2 b/checks/aws_ec2
index ce545c7..668b06b 100644
--- a/checks/aws_ec2
+++ b/checks/aws_ec2
@@ -113,7 +113,7 @@ def check_aws_ec2_cpu_credits(item, params, parsed):
warn, crit = params["balance_levels_lower"]
yield check_levels(
metrics['CPUCreditBalance'],
- "aws_ec2_credit_balance", (None, None, warn, crit),
+ "aws_cpu_credit_balance", (None, None, warn, crit),
human_readable_func=lambda x: "%.2f" % x,
infoname='Balance')
@@ -126,6 +126,7 @@ check_info['aws_ec2.cpu_credits'] = {
'group': 'aws_ec2_cpu_credits',
'includes': ['aws.include'],
'default_levels_variable': 'aws_cpu_credits',
+ 'has_perfdata': True,
}
#.
diff --git a/checks/aws_rds b/checks/aws_rds
index 36c8697..8fca101 100644
--- a/checks/aws_rds
+++ b/checks/aws_rds
@@ -101,6 +101,7 @@ check_info['aws_rds'] = {
'includes': ['cpu_util.include', 'aws.include'],
'group': 'cpu_utilization_multiitem',
'default_levels_variable': 'aws_rds_cpu_util',
+ 'has_perfdata': True,
}
#.
@@ -137,7 +138,7 @@ def check_aws_rds_cpu_credits(item, params, metrics):
warn, crit = params.get("balance_levels_lower", (None, None))
yield check_levels(
metrics['CPUCreditBalance'],
- "aws_rds_credit_balance", (None, None, warn, crit),
+ "aws_cpu_credit_balance", (None, None, warn, crit),
human_readable_func=lambda x: "%.2f" % x,
infoname='Balance')
@@ -157,6 +158,7 @@ check_info['aws_rds.cpu_credits'] = {
'check_function': check_aws_rds_cpu_credits,
'service_description': 'AWS/RDS %s CPU Credits',
'group': 'aws_rds_cpu_credits',
+ 'has_perfdata': True,
}
#.
diff --git a/cmk/gui/plugins/metrics/check_mk.py b/cmk/gui/plugins/metrics/check_mk.py
index 3dd0703..eaa981d 100644
--- a/cmk/gui/plugins/metrics/check_mk.py
+++ b/cmk/gui/plugins/metrics/check_mk.py
@@ -4860,6 +4860,12 @@ metric_info['aws_burst_balance'] = {
'color': '11/a',
}
+metric_info['aws_cpu_credit_balance'] = {
+ 'title': _('CPU Credit Balance'),
+ 'unit': 'count',
+ 'color': '11/a',
+}
+
metric_info['aws_rds_bin_log_disk_usage'] = {
'title': _('Bin Log Disk Usage'),
'unit': '%',