daemon: expose prometheus in new global.monitoring config section + document it
refs #67
This commit is contained in:
@@ -10,6 +10,11 @@ Changelog
|
||||
The changelog summarized bugfixes that are deemed relevant for users.
|
||||
Developers should consult the git commit log or GitHub issue tracker.
|
||||
|
||||
0.0.4 (unreleased)
|
||||
------------------
|
||||
|
||||
* |feature| :issue:`67`: Expose `Prometheus <https://prometheus.io>`_ metrics via HTTP (:ref:`config docs <monitoring-prometheus>`)
|
||||
|
||||
0.0.3
|
||||
-----
|
||||
|
||||
|
||||
@@ -13,4 +13,5 @@ Configuration
|
||||
configuration/map_filter_syntax
|
||||
configuration/prune
|
||||
configuration/logging
|
||||
configuration/monitoring
|
||||
configuration/misc
|
||||
|
||||
@@ -8,7 +8,7 @@ Logging
|
||||
zrepl uses structured logging to provide users with easily processable log messages.
|
||||
|
||||
Logging outlets are configured in the ``global`` section of the |mainconfig|.
|
||||
Check out :sampleconf:`random/logging.yml` for an example on how to configure multiple outlets:
|
||||
Check out :sampleconf:`random/logging_and_monitoring.yml` for an example on how to configure multiple outlets:
|
||||
|
||||
::
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
.. include:: ../global.rst.inc
|
||||
|
||||
.. _monitoring:
|
||||
|
||||
Monitoring
|
||||
==========
|
||||
|
||||
Monitoring endpoints are configured in the ``global.monitoring`` section of the |mainconfig|.
|
||||
Check out :sampleconf:`random/logging_and_monitoring.yml` for examples.
|
||||
|
||||
.. _monitoring-prometheus:
|
||||
|
||||
Prometheus
|
||||
----------
|
||||
|
||||
zrepl can expose `Prometheus metrics <https://prometheus.io/docs/instrumenting/exposition_formats/>`_ via HTTP.
|
||||
The ``listen`` attribute is a `net.Listen <https://golang.org/pkg/net/#Listen>`_ string for tcp, e.g. ``:9091`` or ``127.0.0.1:9091``.
|
||||
|
||||
The Prometheues monitoring job appears in the ``zrepl control`` job list and may be specified **at most once**.
|
||||
There is no stability guarantee on the exported metrics.
|
||||
|
||||
::
|
||||
|
||||
global:
|
||||
monitoring:
|
||||
- type: prometheus
|
||||
listen: ':9091'
|
||||
|
||||
|
||||
|
||||
@@ -193,6 +193,7 @@ Summary
|
||||
Congratulations, you have a working pull backup. Where to go next?
|
||||
|
||||
* Read more about :ref:`configuration format, options & job types <configuration_toc>`
|
||||
* Configure :ref:`logging <logging>` \& :ref:`monitoring <monitoring>`.
|
||||
* Learn about :ref:`implementation details <implementation_toc>` of zrepl.
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ zrepl daemon
|
||||
============
|
||||
|
||||
All actual work zrepl does is performed by a daemon process.
|
||||
Logging is configurable via the config file. Please refer to the :ref:`logging documention <logging>`.
|
||||
The daemon supports structured :ref:`logging <logging>` and provides :ref:`monitoring endpoints <monitoring>`.
|
||||
|
||||
When installating from a package, the package maintainer should have provided an init script / systemd.service file.
|
||||
You should thus be able to start zrepl daemon using your init system.
|
||||
|
||||
Reference in New Issue
Block a user