Skip to content

fix: route /victoriametrics writes through vmproxy (PMM-15030)#5323

Open
theTibi wants to merge 2 commits into
v3from
fix-pmm-15030
Open

fix: route /victoriametrics writes through vmproxy (PMM-15030)#5323
theTibi wants to merge 2 commits into
v3from
fix-pmm-15030

Conversation

@theTibi
Copy link
Copy Markdown
Contributor

@theTibi theTibi commented May 5, 2026

Summary

  • In external VictoriaMetrics mode (PMM_VM_URL set), nginx still proxied /victoriametrics/ to local 127.0.0.1:9090/prometheus/, causing write-path failures.
  • Route /victoriametrics/ through vmproxy (http://vmproxy/prometheus/) to align with /prometheus/api/v1 behavior.

Ticket

Test plan

  • Brought up PMM test stack with merged compose files (docker-compose.yml + docker-compose.dev.yml) and external VM mode configured.
  • Verified active config inside pmm-server:
    • location /victoriametrics/ { proxy_pass http://vmproxy/prometheus/; }
  • Ran nginx config validation in container:
    • docker exec pmm-server nginx -t -> syntax is ok and test is successful
  • Exercised write endpoint through PMM:
    • curl -k -u admin:admin -X POST https://127.0.0.1/victoriametrics/api/v1/write --data-binary testdata -> HTTP 204
  • pmm-submodules (FB) PR: fix-pmm-15030 (FB) Percona-Lab/pmm-submodules#4340

In external VictoriaMetrics mode, /victoriametrics/ still pointed to local 127.0.0.1:9090 and returned 502 for write requests. Route it through vmproxy to match /prometheus/api/v1 behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>

Signed-off-by: theTibi <tkorocz@gmail.com>
@theTibi theTibi requested a review from a team as a code owner May 5, 2026 09:40
@theTibi theTibi requested review from ademidoff and maxkondr and removed request for a team May 5, 2026 09:40
@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 42.21%. Comparing base (64d3111) to head (624d382).
⚠️ Report is 38 commits behind head on v3.

Additional details and impacted files
@@            Coverage Diff             @@
##               v3    #5323      +/-   ##
==========================================
+ Coverage   42.19%   42.21%   +0.02%     
==========================================
  Files         410      410              
  Lines       41914    41914              
==========================================
+ Hits        17686    17696      +10     
+ Misses      22441    22434       -7     
+ Partials     1787     1784       -3     
Flag Coverage Δ
admin 34.89% <ø> (ø)
agent 49.24% <ø> (+0.07%) ⬆️
managed 40.74% <ø> (+<0.01%) ⬆️
vmproxy 72.09% <ø> (ø)

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

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@ondrejpatocka ondrejpatocka added the author:ai-agent Standalone AI agent contribution label May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author:ai-agent Standalone AI agent contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants