Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prometheus: service labels based on config_ident #2110

Merged
merged 3 commits into from Jul 27, 2018

Conversation

@elliefm
Copy link
Contributor

elliefm commented Aug 22, 2017

This PR labels metrics with the ident of the service counting them. For example if your cyrus.conf has both "imap" and "imaps" services, the cyrus_imap_foo metric will be split up into cyrus_imap_foo{service="imap"} and cyrus_imap_foo{service="imaps"}, even though the same binary is used for both services.

To avoid reporting metric/service combinations that will never be seen (e.g. cyrus_lmtp_foo{service="imap"}), this PR:

  • no longer automatically initialises the last_updated field of metrics during prometheus_init(), instead leaving it as zero; and
  • only reports metrics that have a non-zero last updated

A consequence of this is that a newly started Cyrus instance will report very few statistics at all, but the report will gradually thicken out as interesting events occur and are counted.

@elliefm elliefm requested a review from robn Aug 22, 2017
@elliefm elliefm force-pushed the elliefm:v31/prom-service-labels branch from 2b90a23 to 4c1cea5 Aug 22, 2017
@elliefm elliefm assigned elliefm and ajaysusarla and unassigned elliefm Aug 23, 2017
@elliefm elliefm self-assigned this Nov 10, 2017
@elliefm elliefm merged commit 1baf875 into cyrusimap:master Jul 27, 2018
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.