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

merge pushgateway into vmagent #1415

Closed
ldpiuaeng opened this issue Jun 29, 2021 · 4 comments
Closed

merge pushgateway into vmagent #1415

ldpiuaeng opened this issue Jun 29, 2021 · 4 comments
Labels
enhancement New feature or request vmagent

Comments

@ldpiuaeng
Copy link

ldpiuaeng commented Jun 29, 2021

Is your feature request related to a problem? Please describe.
Is it possible combine pushgateway into vmagent ?

@denisgolius denisgolius added question The question issue vmagent labels Jun 29, 2021
@hagen1778
Copy link
Collaborator

Hi! Pushgateway and vmagent are different tools with different APIs. However, they're solving the same problem - pushing data into remote time series database. If that's the case, you can push metrics from your application in any of supported formats directly to vmagent. Unlike pushgateway, vmagent respects provided metrics timestamps and forwards them to VM TSDB accordingly.
Please note, vmagent does not support pushgateway API:

  1. no deletion/updates for recorded metrics (curl -X DELETE/PUT) since vmagent works differently - it doesn't wait to be scraped, it forwards accepted metrics as soon as possible.
  2. No /metrics/job/<JOB_NAME>/<LABEL_NAME>/<LABEL_VALUE>} path support. Extra labels may be set via extra_label param instead. See https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#how-to-import-data-in-prometheus-exposition-format for details.

valyala added a commit that referenced this issue Nov 26, 2022
Extend /api/v1/import/prometheus with the support for Pushgateway way of specifying additional labels.

Updates #1415
valyala added a commit that referenced this issue Nov 26, 2022
Extend /api/v1/import/prometheus with the support for Pushgateway way of specifying additional labels.

Updates #1415
@valyala
Copy link
Collaborator

valyala commented Nov 26, 2022

The commit 58d459e adds the ability to accept data in Pushgateway protocol via /api/v1/import/prometheus endpoint. For example, the following line pushes metric{label="abc",job="my_app",instance="host123"} 123 metric into VictoriaMetrics:

curl -d 'metric{label="abc"} 123' -X POST 'http://localhost:8428/api/v1/import/prometheus/metrics/job/my_app/instance/host123'

See these docs for more details.

This commit will be included in the next release of VictoriaMetrics.

@valyala
Copy link
Collaborator

valyala commented Nov 26, 2022

VictoriaMetrics and vmagent gained support for Pushgateway protocol starting from v1.84.0. Closing this feature request as done.

@valyala valyala closed this as completed Nov 26, 2022
@valyala valyala added enhancement New feature or request and removed question The question issue labels Nov 26, 2022
@valyala
Copy link
Collaborator

valyala commented Jan 15, 2023

The related issue - #3636

valyala added a commit that referenced this issue Jan 15, 2023
valyala added a commit that referenced this issue Jan 15, 2023
valyala added a commit that referenced this issue Jan 27, 2023
…a Prometheus PushGateway protocol

This is the same fix as has been already applied to app/vminsert at cdb6d65

Updates #3636
Updates #1415
valyala added a commit that referenced this issue Jan 27, 2023
…a Prometheus PushGateway protocol

This is the same fix as has been already applied to app/vminsert at cdb6d65

Updates #3636
Updates #1415
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vmagent
Projects
None yet
Development

No branches or pull requests

4 participants