Add magnum service detection plugin
This patch will enable magnum processes to be monitored by monasca. Change-Id: Id23e2f87039f42be06fb5e9384bd0f908c0d59f4
This commit is contained in:
parent
6f7476874b
commit
eb9dc4d481
|
@ -114,6 +114,9 @@
|
|||
- [Freezer Checks](#freezer-checks)
|
||||
- [Freezer Processes Monitored](#freezer-processes-monitored)
|
||||
- [Example Freezer Metrics](#example-freezer-metrics)
|
||||
- [Magnum Checks](#magnum-checks)
|
||||
- [Magnum Processes Monitored](#magnum-processes-monitored)
|
||||
- [Example Magnum Metrics](#example-magnum-metrics)
|
||||
- [License](#license)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
@ -326,6 +329,7 @@ These are the detection plugins included with the Monasca Agent. See [Customiza
|
|||
| kafka_consumer | Plugin |
|
||||
| keystone | ServicePlugin |
|
||||
| libvirt | Plugin |
|
||||
| magnum | ServicePlugin |
|
||||
| mk_livestatus | Plugin |
|
||||
| mon | Plugin (multiple) |
|
||||
| mysql | Plugin |
|
||||
|
@ -2351,7 +2355,22 @@ The following Freezer processes are monitored, if they exist when the monasca-se
|
|||
| freezer-api | http_status | Gauge | Active | service=backup, component=freezer-api url=url_to_freezer_api | http_status | freezer-api http endpoint is alive | This check should be executed on multiple systems.|
|
||||
| freezer-scheduler | processes.process_pid_count | Gauge | Passive | service=backup, component=freezer-scheduler | process | freezer-scheduler process pid count | This is only one of the process checks performed |
|
||||
|
||||
=======
|
||||
### Magnum Checks
|
||||
This section documents a sampling of the metrics generated by the checks setup automatically by the monasca-setup script for the OpenStack Magnum service.
|
||||
|
||||
The following Magnum processes are monitored, if they exist when the monasca-setup script is run:
|
||||
|
||||
##### Magnum Processes Monitored
|
||||
* magnum-api
|
||||
* magnum-controller
|
||||
|
||||
##### Example Magnum Metrics
|
||||
|
||||
| Component | Metric Name | Metric Type | Check Type | Dimensions | Plugin | Description | Notes |
|
||||
| --------- | ----------- | ----------- | ---------- | ---- | ------ | ----------- | ----- |
|
||||
| magnum-api | processes.process_pid_count | Gauge | Passive | service=container-infra, component=magnum-api | process | magnum-api process pid count | This is only one of the process checks performed |
|
||||
| magnum-api | http_status | Gauge | Active | service=container-infra, component=magnum-api url=url_to_magnum_api | http_status | magnum-api http endpoint is alive | This check should be executed on multiple systems |
|
||||
| magnum-controller | processes.process_pid_count | Gauge | Passive | service=container-infra, component=magnum-conductor | process | magnum-conductor process pid count | This is only one of the process checks performed |
|
||||
|
||||
# License
|
||||
(C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
################################################################
|
||||
#
|
||||
# Copyright (c) 2017 SUSE Linux Products GmbH
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 2 or 3 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program (see the file COPYING); if not, write to the
|
||||
# Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
#
|
||||
################################################################
|
||||
|
||||
from monasca_setup import detection
|
||||
|
||||
|
||||
class Magnum(detection.ServicePlugin):
|
||||
"""Detect Magnum daemons and setup configuration to monitor them."""
|
||||
|
||||
def __init__(self, template_dir, overwrite=True, args=None):
|
||||
service_params = {
|
||||
'args': args,
|
||||
'template_dir': template_dir,
|
||||
'overwrite': overwrite,
|
||||
'service_name': 'container-infra',
|
||||
'process_names': ['magnum-api', 'magnum-conductor'],
|
||||
'service_api_url': 'http://localhost:9511',
|
||||
'search_pattern': '.*versions.*',
|
||||
}
|
||||
|
||||
super(Magnum, self).__init__(service_params)
|
Loading…
Reference in New Issue