Module: check_mk
Branch: master
Commit: 3263417ffd9f6cacbdd997ebc3410bdfa5a31309
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3263417ffd9f6c…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed Jan 9 16:06:27 2019 +0100
Revert "aws_s3: Minor improvements"
This reverts commit e5dae7cac1c7a86bb50a252e74a55089295328b1.
---
checks/.f12 | 1 -
checks/aws_s3 | 11 ++++-------
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/checks/.f12 b/checks/.f12
index 302a564..be888b0 100755
--- a/checks/.f12
+++ b/checks/.f12
@@ -3,7 +3,6 @@ set -e
SITE=${SITE:-$(cat ../.site 2>/dev/null || true)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
-SITE=heute2
ROOT=/omd/sites/$SITE
echo "TARGET: $ROOT/share/check_mk/checks"
diff --git a/checks/aws_s3 b/checks/aws_s3
index 9381d6c..3b81742 100644
--- a/checks/aws_s3
+++ b/checks/aws_s3
@@ -47,15 +47,12 @@ def check_aws_s3_summary(item, params, parsed):
buckets_by_region = {}
long_output = []
for bucket_name, row in parsed.iteritems():
- region = row['LocationConstraint']
- if not region:
- region = "unknown"
- buckets_by_region.setdefault(region, []).append(row)
+ buckets_by_region.setdefault(row['LocationConstraint'], []).append(row)
long_output.append("Bucket: %s, Region: %s, Creation date: %s"\
- % (bucket_name, region, row['CreationDate']))
+ % (bucket_name, row['LocationConstraint'],
row['CreationDate']))
for region, buckets in buckets_by_region.iteritems():
- yield 0, "%s: %s" % (region, len(buckets))
+ yield 0, "%s buckets in region %s" % (len(buckets), region)
if long_output:
yield 0, '\n%s' % '\n'.join(long_output)
@@ -101,5 +98,5 @@ def check_aws_s3_objects(item, params, metrics):
check_info['aws_s3.objects'] = {
'inventory_function': discover(),
'check_function': check_aws_s3_objects,
- 'service_description': 'AWS/S3 Objects %s',
+ 'service_description': 'AWS/S3 %s Objects',
}