Update admin documentation for Prometheus collector
Added Prometheus collector-related configuration documentation to administration documentation. Depends-On: https://review.openstack.org/#/c/642989/ Change-Id: I8dc841dc7a0c20a5a5d486eb53be239ba082df48 Story: 2004974 Task: 29894
This commit is contained in:
parent
df9442c275
commit
7c7ff81cd9
@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2018 Objectif Libre
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
@ -13,8 +12,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
# @author: Martin CAMEY
|
||||
#
|
||||
from decimal import Decimal
|
||||
from decimal import localcontext
|
||||
from decimal import ROUND_HALF_UP
|
||||
@ -34,7 +31,7 @@ from cloudkitty import utils as ck_utils
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
PROMETHEUS_COLLECTOR_OPTS = 'collector_prometheus'
|
||||
pcollector_collector_opts = [
|
||||
collector_prometheus_opts = [
|
||||
cfg.StrOpt(
|
||||
'prometheus_url',
|
||||
default='',
|
||||
@ -59,7 +56,7 @@ pcollector_collector_opts = [
|
||||
help='Explicitly trust untrusted HTTPS responses',
|
||||
),
|
||||
]
|
||||
cfg.CONF.register_opts(pcollector_collector_opts, PROMETHEUS_COLLECTOR_OPTS)
|
||||
cfg.CONF.register_opts(collector_prometheus_opts, PROMETHEUS_COLLECTOR_OPTS)
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
@ -19,6 +19,7 @@ import itertools
|
||||
import cloudkitty.api.app
|
||||
import cloudkitty.collector.gnocchi
|
||||
import cloudkitty.collector.monasca
|
||||
import cloudkitty.collector.prometheus
|
||||
import cloudkitty.config
|
||||
import cloudkitty.fetcher
|
||||
import cloudkitty.fetcher.gnocchi
|
||||
@ -43,6 +44,8 @@ _opts = [
|
||||
cloudkitty.collector.gnocchi.collector_gnocchi_opts))),
|
||||
('collector_monasca', list(itertools.chain(
|
||||
cloudkitty.collector.monasca.collector_monasca_opts))),
|
||||
('collector_prometheus', list(itertools.chain(
|
||||
cloudkitty.collector.prometheus.collector_prometheus_opts))),
|
||||
('fetcher', list(itertools.chain(
|
||||
cloudkitty.fetcher.fetcher_opts))),
|
||||
('fetcher_gnocchi', list(itertools.chain(
|
||||
|
@ -184,6 +184,7 @@ class PrometheusCollectorTest(tests.TestCase):
|
||||
|
||||
|
||||
class PrometheusClientTest(tests.TestCase):
|
||||
|
||||
class FakeResponse(object):
|
||||
"""Mimics an HTTP ``requests`` response"""
|
||||
|
||||
|
@ -64,6 +64,23 @@ Section: ``collector_monasca``.
|
||||
* ``monasca_service_name``: Defaults to ``monasca``. Name of the Monasca
|
||||
service in Keystone.
|
||||
|
||||
|
||||
Prometheus
|
||||
----------
|
||||
|
||||
Section ``collector_prometheus``.
|
||||
|
||||
* ``prometheus_url``: Prometheus HTTP API URL.
|
||||
|
||||
* ``prometheus_user``: For HTTP basic authentication. The username.
|
||||
|
||||
* ``prometheus_password``: For HTTP basic authentication. The password.
|
||||
|
||||
* ``cafile``: Option to allow custom certificate authority file.
|
||||
|
||||
* ``insecure``: Option to explicitly allow untrusted HTTPS connections.
|
||||
|
||||
|
||||
Metric collection
|
||||
=================
|
||||
|
||||
@ -228,7 +245,7 @@ Gnocchi
|
||||
unless you know what you're doing.
|
||||
|
||||
* ``aggregation_method``: Defaults to ``max``. The aggregation method to use
|
||||
when retrieving measures in gnocchi. Must be one of ``min``, ``max``,
|
||||
when retrieving measures from gnocchi. Must be one of ``min``, ``max``,
|
||||
``mean``.
|
||||
|
||||
Monasca
|
||||
@ -239,5 +256,12 @@ Monasca
|
||||
unless you know what you're doing.
|
||||
|
||||
* ``aggregation_method``: Defaults to ``max``. The aggregation method to use
|
||||
when retrieving measures in gnocchi. Must be one of ``min``, ``max``,
|
||||
when retrieving measures from monasca. Must be one of ``min``, ``max``,
|
||||
``mean``.
|
||||
|
||||
Prometheus
|
||||
~~~~~~~~~~
|
||||
|
||||
* ``aggregation_method``: Defaults to ``max``. The aggregation method to use
|
||||
when retrieving measures from prometheus. Must be one of ``avg``, ``min``,
|
||||
``max``, ``sum``, ``count``, ``stddev``, ``stdvar``.
|
||||
|
@ -2,5 +2,5 @@
|
||||
features:
|
||||
- |
|
||||
Prometheus collector now supports HTTPS with custom CA file,
|
||||
an insecure option to allow untrusted certificate
|
||||
an insecure option to allow an untrusted certificate
|
||||
and basic HTTP authentication.
|
||||
|
Loading…
x
Reference in New Issue
Block a user