monasca-agent/monasca_setup/detection/plugins/magnum.py

39 lines
1.4 KiB
Python

################################################################
#
# 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)