Jaromir Wysoglad 1643abed42 Add evaluation results counters to /metrics
This change adds code for collection and storage of
evaluation result counters. The values of the counters can
then be retreived through a new /metrics api endpoint.

Counters are collected and served for each alarm separately. Only
metrics for the current project will be shown on the /metrics endpoint.
To enable this feature set "enable_evaluation_results_metrics"
to true inside [DEFAULT].

Change-Id: I3fceb9a244f248f1e62a1267408c82d1b35a4d37
2025-03-04 09:14:14 -05:00

36 lines
1.3 KiB
Python

#
# Copyright 2012 New Dream Network, LLC (DreamHost)
# Copyright 2013 IBM Corp.
# Copyright 2013 eNovance <licensing@enovance.com>
# Copyright Ericsson AB 2013. All rights reserved
# Copyright 2014 Hewlett-Packard Company
# Copyright 2015 Huawei Technologies Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from aodh.api.controllers.v2 import alarms
from aodh.api.controllers.v2 import capabilities
from aodh.api.controllers.v2 import metrics
from aodh.api.controllers.v2 import query
from aodh.api.controllers.v2 import quotas
class V2Controller(object):
"""Version 2 API controller root."""
alarms = alarms.AlarmsController()
query = query.QueryController()
capabilities = capabilities.CapabilitiesController()
quotas = quotas.QuotasController()
metrics = metrics.MetricsController()