| 1 |
.. _imap-admin-monitoring: |
| 2 |
|
| 3 |
========== |
| 4 |
Monitoring |
| 5 |
========== |
| 6 |
|
| 7 |
Cyrus IMAP supports monitoring using Prometheus_. |
| 8 |
|
| 9 |
To use this functionality, Cyrus IMAP must have been built with the |
| 10 |
``--enable-http`` configure option enabled. |
| 11 |
|
| 12 |
.. _imap-admin-monitoring-setup: |
| 13 |
|
| 14 |
Setup |
| 15 |
===== |
| 16 |
|
| 17 |
* Set the `prometheus_enabled` setting in :cyrusman:`imapd.conf(5)` to "yes" |
| 18 |
* Add the `prometheus` module to your `httpmodules` in :cyrusman:`imapd.conf(5)` |
| 19 |
* Set the `prometheus_need_auth`, `prometheus_service_update_freq`, |
| 20 |
`prometheus_master_update_freq`, `prometheus_usage_update_freq`, and |
| 21 |
`prometheus_stats_dir` settings in :cyrusman:`imapd.conf(5)` to taste |
| 22 |
* Add a job to run :cyrusman:`promstatsd(8)` to the DAEMON section of |
| 23 |
:cyrusman:`cyrus.conf(5)` (the actual daemon process) |
| 24 |
* Add a job to run ``promstatsd -c`` to the START section of :cyrusman:`cyrus.conf(5)` |
| 25 |
(this cleans up the stats files from the previous run) |
| 26 |
* Configure your Prometheus server to scrape http://yourserver.example.com/metrics |
| 27 |
|
| 28 |
Configuration options |
| 29 |
===================== |
| 30 |
|
| 31 |
.. include:: /imap/reference/manpages/configs/imapd.conf.rst |
| 32 |
:start-after: startblob prometheus_enabled |
| 33 |
:end-before: endblob prometheus_enabled |
| 34 |
|
| 35 |
.. include:: /imap/reference/manpages/configs/imapd.conf.rst |
| 36 |
:start-after: startblob prometheus_need_auth |
| 37 |
:end-before: endblob prometheus_need_auth |
| 38 |
|
| 39 |
.. include:: /imap/reference/manpages/configs/imapd.conf.rst |
| 40 |
:start-after: startblob prometheus_service_update_freq |
| 41 |
:end-before: endblob prometheus_service_update_freq |
| 42 |
|
| 43 |
.. include:: /imap/reference/manpages/configs/imapd.conf.rst |
| 44 |
:start-after: startblob prometheus_master_update_freq |
| 45 |
:end-before: endblob prometheus_master_update_freq |
| 46 |
|
| 47 |
.. include:: /imap/reference/manpages/configs/imapd.conf.rst |
| 48 |
:start-after: startblob prometheus_usage_update_freq |
| 49 |
:end-before: endblob prometheus_usage_update_freq |
| 50 |
|
| 51 |
.. include:: /imap/reference/manpages/configs/imapd.conf.rst |
| 52 |
:start-after: startblob prometheus_stats_dir |
| 53 |
:end-before: endblob prometheus_stats_dir |
| 54 |
|
| 55 |
.. _imap-admin-monitoring-end: |
| 56 |
|
| 57 |
Back to :ref:`imap-admin` |
| 58 |
|
| 59 |
.. _Prometheus: https://prometheus.io |