Ghost/ghost
Chris Raible 190ebcd684
Added ability to push prometheus metrics to a pushgateway (#21526)
ref
https://linear.app/ghost/issue/ENG-1746/enable-ghost-to-push-metrics-to-a-pushgateway

- We'd like to use prometheus to expose metrics from Ghost, but the
"standard" approach of having prometheus scrape the `/metrics` endpoint
adds some complexity and additional challenges on Pro.
- A suggested simpler alternative is to use a pushgateway, to have Ghost
_push_ metrics to prometheus, rather than have prometheus scrape the
running instances.
- This PR introduces this functionality behind a configuration. 
- It also includes a refactor to the current metrics-server
implementation so all the related code for prometheus is colocated, and
the configuration is a bit more organized. `@tryghost/metrics-server`
has been renamed to `@tryghost/prometheus-metrics`, and it now includes
the metrics server and prometheus-client code itself (including the
pushgateway code)
- To enable the prometheus client alone, `prometheus:enabled` must be
true. This will _not_ enable the metrics server or the pushgateway — it
will essentially collect the metrics, but not do anything with them.
- To enable the metrics server, set `prometheus:metrics_server:enabled`
to true. You can also configure the host and port that the metrics
server should export the `/metrics` endpoint on in the
`prometheus:metrics_server` block.
- To enable the pushgateway, set `prometheus:pushgateway:enabled` to
true. You can also configure the pushgateway's `url`, the `interval` it
should push metrics in (in milliseconds) and the `jobName` in the
`prometheus:pushgateway` block.
2024-11-05 11:50:39 -08:00
..
adapter-cache-memory-ttl Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
adapter-cache-redis Added an optional timeout parameter to AdapterCacheRedis (#20131) 2024-05-02 20:39:23 -07:00
adapter-manager Update TryGhost packages 2024-08-05 12:12:34 +02:00
admin 🐛 Fixed "Unsaved post" modal shown when updating visibility in post settings (#21511) 2024-11-04 07:42:47 +00:00
announcement-bar-settings Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
api-framework Update TryGhost packages 2024-08-05 12:12:34 +02:00
api-version-compatibility-service Fixed handling requests with mismatching version and missing key 2024-05-02 13:03:26 +02:00
audience-feedback 🔒 Added uuid verification to member endpoints not requiring a session 2024-08-20 16:24:02 +02:00
bookshelf-repository 🐛 Fixed NQL filters for single letter slugs (#21340) 2024-10-17 15:35:26 +00:00
bootstrap-socket Update TryGhost packages 2024-08-05 12:12:34 +02:00
collections 🐛 Fixed NQL filters for single letter slugs (#21340) 2024-10-17 15:35:26 +00:00
constants Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
core Added ability to push prometheus metrics to a pushgateway (#21526) 2024-11-05 11:50:39 -08:00
custom-fonts Made visual updates to the custom fonts selector (#21510) 2024-11-04 16:42:04 +08:00
custom-theme-settings-service 🐛 Fixed NQL filters for single letter slugs (#21340) 2024-10-17 15:35:26 +00:00
data-generator Update TryGhost packages 2024-08-05 12:12:34 +02:00
domain-events Update TryGhost packages 2024-08-05 12:12:34 +02:00
donations Switched build and build:ts scripts 2024-09-02 15:20:03 +02:00
dynamic-routing-events Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
email-addresses Update dependency nodemailer to v6.9.16 2024-10-28 11:17:18 +00:00
email-analytics-provider-mailgun Reimplemented email analytics prioritizing email opens (#20914) 2024-09-05 08:10:07 -05:00
email-analytics-service Optimized collating members and email IDs 2024-11-05 08:49:34 +01:00
email-content-generator Lazyloaded several required dependencies 2024-07-26 09:52:26 +02:00
email-events Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
email-service 🌐Added i18n for newsletter strings (#21433) 2024-10-31 08:41:39 -05:00
email-suppression-list Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
express-dynamic-redirects Optimized loading dynamic redirects 2024-10-14 17:16:49 +02:00
external-media-inliner Add Lexical support to the external-media-inliner (#19149) 2023-11-29 17:56:03 +00:00
extract-api-key Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
ghost Update nest monorepo to v10.4.4 2024-10-15 12:44:37 +02:00
html-to-plaintext Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
i18n Updated Vietnamese translations in newsletter.json (#21525) 2024-11-05 11:51:58 +08:00
importer-handler-content-files Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
importer-revue Update Koenig packages 2024-08-14 15:34:44 +01:00
in-memory-repository 🐛 Fixed NQL filters for single letter slugs (#21340) 2024-10-17 15:35:26 +00:00
job-manager Pin dependency workerpool to 9.1.3 2024-11-05 02:45:38 +00:00
link-redirects Updated documentation for LinkRedirects (#20378) 2024-06-12 23:27:15 +00:00
link-replacer Pinned dependencies (#20257) 2024-05-27 15:29:32 +00:00
link-tracking 🐛 Fixed NQL filters for single letter slugs (#21340) 2024-10-17 15:35:26 +00:00
magic-link Added Sentry message logging for generating magic links (#20789) 2024-08-20 08:38:12 +01:00
mail-events Switched build and build:ts scripts 2024-09-02 15:20:03 +02:00
mailgun-client Added configurable target delivery window for batch sending (#20719) 2024-09-05 22:28:40 -07:00
member-attribution Fixed extra arguments being supplied to function calls 2024-05-07 11:44:07 +02:00
member-events Added experimental background job queue (#20985) 2024-11-04 10:13:15 -06:00
members-api 🐛 Fixed malformed unsubscribe_url in members api response (#21437) 2024-10-28 15:36:05 -05:00
members-csv Update dependency pump to v3.0.2 2024-09-11 10:16:42 +00:00
members-events-service Added caching to LastSeenAtUpdater (#20964) 2024-09-13 00:54:43 -07:00
members-importer Update TryGhost packages 2024-08-05 12:12:34 +02:00
members-ssr Update TryGhost packages 2024-08-05 12:12:34 +02:00
mentions-email-report Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
milestones Update TryGhost packages 2024-08-05 12:12:34 +02:00
minifier Update dependency terser to v5.36.0 2024-10-16 17:59:04 +00:00
model-to-domain-event-interceptor Switched build and build:ts scripts 2024-09-02 15:20:03 +02:00
mw-api-version-mismatch Update TryGhost packages 2024-08-05 12:12:34 +02:00
mw-cache-control Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
mw-error-handler Update TryGhost packages 2024-08-05 12:12:34 +02:00
mw-session-from-token Update dependency express to v4.21.1 2024-10-08 21:53:17 +01:00
mw-update-user-last-seen Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
mw-version-match Update TryGhost packages 2024-08-05 12:12:34 +02:00
mw-vhost Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
nql-filter-expansions Switched build and build:ts scripts 2024-09-02 15:20:03 +02:00
oembed-service Not storing icons and thumbnails in case of mention (#21424) 2024-10-28 05:29:49 +00:00
offers Update TryGhost packages 2024-08-05 12:12:34 +02:00
package-json Update TryGhost packages 2024-08-05 12:12:34 +02:00
payments 🐛 Fixed Tips & Donations checkout error for sites with long titles 2024-09-03 21:08:24 +01:00
post-events Added unschedule bulk action to posts (#20945) 2024-09-24 15:32:45 +08:00
post-revisions Switched build and build:ts scripts 2024-09-02 15:20:03 +02:00
posts-service 🐛 Fixed NQL filters for single letter slugs (#21340) 2024-10-17 15:35:26 +00:00
prometheus-metrics Added ability to push prometheus metrics to a pushgateway (#21526) 2024-11-05 11:50:39 -08:00
recommendations 🐛 Fixed missing incoming recommendations (#21317) 2024-10-16 11:14:58 +02:00
referrers Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
security Updated uuid to crypto.randomUUID() (#20821) 2024-09-12 09:09:30 +07:00
session-service Updated code for fetching location (#21368) 2024-10-23 06:43:42 +01:00
settings-path-manager Update TryGhost packages 2024-08-05 12:12:34 +02:00
slack-notifications Update TryGhost packages 2024-08-05 12:12:34 +02:00
staff-service Updated notification email mobile styles 2024-08-29 17:15:45 +01:00
stats-service Update dependency luxon to v3.5.0 2024-08-05 09:19:48 +02:00
stripe Lazyloaded dependencies 2024-10-10 13:38:56 +01:00
tiers Update TryGhost packages 2024-08-05 12:12:34 +02:00
tinybird Fix origin attribution in Tinybird analytics hits (#21187) 2024-10-02 17:27:43 +01:00
update-check-service Updated uuid to crypto.randomUUID() (#20821) 2024-09-12 09:09:30 +07:00
verification-trigger Update TryGhost packages 2024-08-05 12:12:34 +02:00
version-notifications-data-service Fixed handling requests with mismatching version and missing key 2024-05-02 13:03:26 +02:00
webmentions 🐛 Fixed missing incoming recommendations (#21317) 2024-10-16 11:14:58 +02:00
tsconfig.json Disabled TypeScript incremental building 2023-08-09 18:27:56 +02:00