Module: check_mk
Branch: master
Commit: 76da94fb88089ac2cce984cf3c314507c1de7c7c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=76da94fb88089a…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon Jan 28 18:38:16 2019 +0100
aws_s3_summary: Add performance data for bucket size and number of objects
Change-Id: I807b5540d1a5e508b7c747ece966555b658a2f70
---
checks/aws_s3_summary | 5 +++--
cmk/gui/plugins/metrics/check_mk.py | 30 ++++++++++++++++++++++++++++++
2 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/checks/aws_s3_summary b/checks/aws_s3_summary
index 93c5d8a..330f1b9 100644
--- a/checks/aws_s3_summary
+++ b/checks/aws_s3_summary
@@ -104,8 +104,8 @@ def check_aws_s3_summary_objects(item, params, metrics):
if size >= largest_size:
largest = row['Key']
largest_size = size
- yield 0, 'Bucket size: %s' % get_bytes_human_readable(sum_size)
- yield 0, 'Number of objects: %s' % num_objects
+ yield 0, 'Bucket size: %s' % get_bytes_human_readable(sum_size),
[('bucket_size', sum_size)]
+ yield 0, 'Number of objects: %s' % num_objects, [('num_objects',
num_objects)]
if largest:
yield 0, 'Largest object: %s, %s' % (largest,
get_bytes_human_readable(largest_size))
@@ -114,4 +114,5 @@ check_info['aws_s3_summary.objects'] = {
'inventory_function': discover(),
'check_function': check_aws_s3_summary_objects,
'service_description': 'AWS/S3 Objects %s',
+ 'has_perfdata': True,
}
diff --git a/cmk/gui/plugins/metrics/check_mk.py b/cmk/gui/plugins/metrics/check_mk.py
index 725a28c..25577d6 100644
--- a/cmk/gui/plugins/metrics/check_mk.py
+++ b/cmk/gui/plugins/metrics/check_mk.py
@@ -4782,6 +4782,36 @@ metric_info['aws_costs_unblended'] = {
'color': '11/a',
}
+metric_info['num_objects'] = {
+ 'title': _('Numer of objects'),
+ 'unit': 'count',
+ 'color': '21/a',
+}
+
+metric_info['bucket_size'] = {
+ 'title': _('Bucket size'),
+ 'unit': 'bytes',
+ 'color': '15/a',
+}
+
+metric_info['surge_queue_length'] = {
+ 'title': _('Surge queue length'),
+ 'unit': 'count',
+ 'color': '12/a',
+}
+
+metric_info['spillover'] = {
+ 'title': _('Spillover'),
+ 'unit': 'count',
+ 'color': '13/a',
+}
+
+metric_info['backend_connection_errors'] = {
+ 'title': _('Backend connection errors'),
+ 'unit': '1/s',
+ 'color': '15/a',
+}
+
#.
# .--Checks--------------------------------------------------------------.
# | ____ _ _ |