Skip to content

PMM-14858 Skip built-in ClickHouse scrape for external instances#5369

Open
4nte wants to merge 5 commits into
v3from
PMM-14858-fix-external-clickhouse-scrape
Open

PMM-14858 Skip built-in ClickHouse scrape for external instances#5369
4nte wants to merge 5 commits into
v3from
PMM-14858-fix-external-clickhouse-scrape

Conversation

@4nte
Copy link
Copy Markdown

@4nte 4nte commented May 15, 2026

PMM-14858

Feature build

PMM kept scraping 127.0.0.1:9363 even when an external ClickHouse was configured or PMM_DISABLE_BUILTIN_CLICKHOUSE was set.

Introduced new ClickHouseParams model struct that validates and facilitates CH parameters.

ClickHouse scraping is skipped when any of the following are true:

  1. ExternalVM is on. (old behavior)
  2. PMM_DISABLE_BUILTIN_CLICKHOUSE is set. (new)
  3. PMM_CLICKHOUSE_ADDR points to an external host. (new)

Addditionally, we log a warning when PMM_DISABLE_BUILTIN_CLICKHOUSE is not set and PMM_CLICKHOUSE_ADDR is an external address (not 127.0.0.1) to warn user about unwanted drift in their configuration.

@4nte 4nte requested a review from a team as a code owner May 15, 2026 12:23
@4nte 4nte requested review from JiriCtvrtka and maxkondr and removed request for a team May 15, 2026 12:23
Comment thread managed/models/clickhouse_params.go
Comment thread managed/services/victoriametrics/victoriametrics.go Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

❌ Patch coverage is 77.41935% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.25%. Comparing base (6ecb7d5) to head (d3844dc).

Files with missing lines Patch % Lines
managed/cmd/pmm-managed/main.go 0.00% 13 Missing ⚠️
managed/services/victoriametrics/prometheus.go 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##               v3    #5369      +/-   ##
==========================================
+ Coverage   43.18%   43.25%   +0.06%     
==========================================
  Files         413      413              
  Lines       42253    42258       +5     
==========================================
+ Hits        18247    18277      +30     
+ Misses      22140    22115      -25     
  Partials     1866     1866              
Flag Coverage Δ
managed 42.39% <77.41%> (+0.13%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 15, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants