Skip to content
Permalink
Browse files

agent_aws: Started AWS/ELBv2

Change-Id: Ice5a8785c085b80342d86f1e1aae4c7c05e35438
  • Loading branch information
si-23 committed Apr 18, 2019
1 parent 5db852a commit 315e38452306be9c4761a8b120422082e54038d3
@@ -0,0 +1,21 @@
Title: aws_elbv2_limits: New check which monitors AWS/ELBv2 limits
Level: 1
Component: checks
Compatible: compat
Edition: cre
Version: 1.6.0i1
Date: 1555322009
Class: feature

The check monitors the following limits and related default values:
<ul>
<li>Application Load balancers, 20</li>
<li>Application Load Balancer Rules, 100</li>
<li>Application Load Balancer Listeners, 50</li>
<li>Application Load Balancer Target Groups, 3000</li>
<li>Application Load balancer Certificates, 25</li>
<li>Network Load balancers, 20</li>
<li>Network Load Balancer Listeners, 50</li>
<li>Network Load Balancer Target Groups, 3000</li>
<li>Load balancers Target Groups, 3000</li>
</ul>
@@ -0,0 +1,37 @@
title: AWS/ELBv2 Application and Network Limits
agents: aws
catalog: cloud/aws
license: GPL
distribution: check_mk
description:
This check monitors the AWS/ELBv2 limits. To make this check work
you have to configure the related special agent {Amazon Web Services (AWS)}.

Default levels are set to 80, 90 percent and the default max.
value is fetched from the API, ie.

- Application Load balancers, 20

- Application Load Balancer Rules, 100

- Application Load Balancer Listeners, 50

- Application Load Balancer Target Groups, 3000

- Application Load balancer Certificates, 25

- Network Load balancers, 20

- Network Load Balancer Listeners, 50

- Network Load Balancer Target Groups, 3000

- Load balancers Target Groups, 3000

These levels are configurable.

If limits are enabled all load balancers are fetched regardless of
possibly configured restriction to names or tags.

inventory:
One service will be created.
@@ -0,0 +1,58 @@
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
# | | |___| | | | __/ (__| < | | | | . \ |
# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
# | |
# | Copyright Mathias Kettner 2018 mk@mathias-kettner.de |
# +------------------------------------------------------------------+
#
# This file is part of Check_MK.
# The official homepage is at http://mathias-kettner.de/check_mk.
#
# check_mk is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation in version 2. check_mk is distributed
# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public License for more de-
# tails. You should have received a copy of the GNU General Public
# License along with GNU Make; see the file COPYING. If not, write
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.

factory_settings['aws_elbv2_limits_default_levels'] = {
'application_load_balancers': (None, 80.0, 90.0),
'application_load_balancer_rules': (None, 80.0, 90.0),
'application_load_balancer_listeners': (None, 80.0, 90.0),
'application_load_balancer_target_groups': (None, 80.0, 90.0),
'application_load_balancer_certificates': (None, 80.0, 90.0),
'network_load_balancers': (None, 80.0, 90.0),
'network_load_balancer_listeners': (None, 80.0, 90.0),
'network_load_balancer_target_groups': (None, 80.0, 90.0),
'load_balancer_target_groups': (None, 80.0, 90.0),
}


def parse_aws_elbv2_limits(info):
return [(resource_key, resource_title, limit, amount, None)
for resource_key, resource_title, limit, amount in parse_aws(info)]


def check_aws_elbv2_limits(item, params, parsed):
return check_aws_limits("elbv2", params, parsed)


check_info['aws_elbv2_limits'] = {
'parse_function': parse_aws_elbv2_limits,
'inventory_function': discover_single,
'check_function': check_aws_elbv2_limits,
'service_description': 'AWS/ELBv2 Limits',
'includes': ['aws.include'],
'group': 'aws_elbv2_limits',
'default_levels_variable': 'aws_elbv2_limits_default_levels',
'has_perfdata': True,
}
@@ -5337,6 +5337,60 @@ def register_fireye_metrics():
'color': '21/a',
}

metric_info['aws_elbv2_application_load_balancers'] = {
'title': _('Application Load balancers'),
'unit': 'count',
'color': '11/a',
}

metric_info['aws_elbv2_application_load_balancer_rules'] = {
'title': _('Application Load Balancer Rules'),
'unit': 'count',
'color': '13/a',
}

metric_info['aws_elbv2_application_load_balancer_listeners'] = {
'title': _('Application Load Balancer Listeners'),
'unit': 'count',
'color': '15/a',
}

metric_info['aws_elbv2_application_load_balancer_target_groups'] = {
'title': _('Application Load Balancer Target Groups'),
'unit': 'count',
'color': '21/a',
}

metric_info['aws_elbv2_application_load_balancer_certificates'] = {
'title': _('Application Load balancer Certificates'),
'unit': 'count',
'color': '23/a',
}

metric_info['aws_elbv2_network_load_balancers'] = {
'title': _('Network Load balancers'),
'unit': 'count',
'color': '25/a',
}

metric_info['aws_elbv2_network_load_balancer_listeners'] = {
'title': _('Network Load Balancer Listeners'),
'unit': 'count',
'color': '31/a',
}

metric_info['aws_elbv2_network_load_balancer_target_groups'] = {
'title': _('Network Load Balancer Target Groups'),
'unit': 'count',
'color': '33/a',
}

metric_info['aws_elbv2_load_balancer_target_groups'] = {
'title': _('Load balancers Target Groups'),
'unit': 'count',
'color': '35/a',
}

metric_info["elapsed_time"] = {
"title": _("Elapsed time"),
"unit": "s",
@@ -768,6 +768,54 @@ def parameter_valuespec(self):
])


#.
# .--ELBv2---------------------------------------------------------------.
# | _____ _ ____ ____ |
# | | ____| | | __ )_ _|___ \ |
# | | _| | | | _ \ \ / / __) | |
# | | |___| |___| |_) \ V / / __/ |
# | |_____|_____|____/ \_/ |_____| |
# | |
# '----------------------------------------------------------------------'


@rulespec_registry.register
class RulespecCheckgroupParametersAwsElbv2Limits(CheckParameterRulespecWithoutItem):
@property
def group(self):
return RulespecGroupCheckParametersApplications

@property
def check_group_name(self):
return "aws_elbv2_limits"

@property
def title(self):
return _("AWS/ELBv2 Limits")

@property
def match_type(self):
return "dict"

@property
def parameter_valuespec(self):
return Dictionary(elements=[
('application_load_balancers', _vs_limits("Application Load balancers", 20)),
('application_load_balancer_rules', _vs_limits("Application Load Balancer Rules", 100)),
('application_load_balancer_listeners',
_vs_limits("Application Load Balancer Listeners", 50)),
('application_load_balancer_target_groups',
_vs_limits("Application Load Balancer Target Groups", 3000)),
('application_load_balancer_certificates',
_vs_limits("Application Load balancer Certificates", 25)),
('network_load_balancers', _vs_limits("Network Load balancers", 20)),
('network_load_balancer_listeners', _vs_limits("Network Load Balancer Listeners", 50)),
('network_load_balancer_target_groups',
_vs_limits("Network Load Balancer Target Groups", 3000)),
('load_balancer_target_groups', _vs_limits("Load balancers Target Groups", 3000)),
])


#.
# .--EBS-----------------------------------------------------------------.
# | _____ ____ ____ |
@@ -2015,7 +2015,17 @@ def valuespec(self):
)),
("elb",
Dictionary(
title=_("Classic Elastic Load Balancing (ELB)"),
title=_("Classic Load Balancing (ELB)"),
elements=[
_vs_element_aws_service_selection(),
_vs_element_aws_limits(),
],
optional_keys=["limits"],
default_keys=["limits"],
)),
("elbv2",
Dictionary(
title=_("Application and Network Load Balancing (ELBv2)"),
elements=[
_vs_element_aws_service_selection(),
_vs_element_aws_limits(),
@@ -2050,7 +2060,7 @@ def valuespec(self):
default_keys=["alarms", "limits"],
)),
],
default_keys=["ec2", "ebs", "s3", "elb", "rds", "cloudwatch"],
default_keys=["ec2", "ebs", "s3", "elb", "elbv2", "rds", "cloudwatch"],
)),
("overall_tags", _vs_aws_tags(
_("Restrict monitoring services by one of these tags"))),

0 comments on commit 315e384

Please sign in to comment.
You can’t perform that action at this time.