Module: check_mk
Branch: master
Commit: 235e6e98800967d14bc7567e6d6ec1487ab4df6d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=235e6e98800967…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon Jan 28 10:46:14 2019 +0100
aws_ec2: Minor cleanup
Change-Id: I836007e82af4a0fc0303c75eac41ff08782b260b
---
checks/aws_ec2 | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/checks/aws_ec2 b/checks/aws_ec2
index 85a54ab..acafedc 100644
--- a/checks/aws_ec2
+++ b/checks/aws_ec2
@@ -46,7 +46,7 @@ def parse_aws_ec2(info):
return
-def inventory_aws_ec2_cpu_credits(parsed, required_metrics):
+def inventory_aws_ec2_generic(parsed, required_metrics):
metrics = parsed.get(EC2DefaultItemName, {})
for required_metric in required_metrics:
if required_metric not in metrics:
@@ -89,7 +89,7 @@ def check_aws_ec2_status_check(item, params, parsed):
check_info['aws_ec2'] = {
'parse_function': parse_aws_ec2,
'inventory_function':
- lambda p: inventory_aws_ec2_cpu_credits(p, ['StatusCheckFailed_System',
'StatusCheckFailed_Instance']),
+ lambda p: inventory_aws_ec2_generic(p, ['StatusCheckFailed_System',
'StatusCheckFailed_Instance']),
'check_function': check_aws_ec2_status_check,
'service_description': 'AWS/EC2 Status Check',
'includes': ['aws.include'],
@@ -122,7 +122,7 @@ def check_aws_ec2_cpu_credits(item, params, parsed):
check_info['aws_ec2.cpu_credits'] = {
'inventory_function':
- lambda p: inventory_aws_ec2_cpu_credits(p, ['CPUCreditUsage',
'CPUCreditBalance']),
+ lambda p: inventory_aws_ec2_generic(p, ['CPUCreditUsage',
'CPUCreditBalance']),
'check_function': check_aws_ec2_cpu_credits,
'service_description': 'AWS/EC2 CPU Credits',
'group': 'aws_ec2_cpu_credits',
@@ -152,7 +152,7 @@ def check_aws_ec2_cpu_util(item, params, parsed):
check_info['aws_ec2.cpu_util'] = {
- 'inventory_function': lambda p: inventory_aws_ec2_cpu_credits(p,
['CPUUtilization']),
+ 'inventory_function': lambda p: inventory_aws_ec2_generic(p,
['CPUUtilization']),
'check_function': check_aws_ec2_cpu_util,
'service_description': 'AWS/EC2 CPU utilization',
'group': 'cpu_utilization',