Comments (2)
Hey,
I had the same issue, I wanted to scrape gotenberg metrics which default endpoint is /prometheus/metrics
. I managed to add a new flag in the pushprox client entrypoint by adding the following code in cmd/client/main.go
:
In the variables declaration part:
endpoint = kingpin.Flag("endpoint", "Override metrics endpoint (default is /metrics)").String()
In the doScrape
function:
if *endpoint != "" {
request.URL.Path = *endpoint
}
Then you just have to add the following flag to your client entrypoint: --endpoint=/another/metrics/path
Hope it can help you
from pushprox.
Hey,
I had the same issue, I wanted to scrape gotenberg metrics which default endpoint is
/prometheus/metrics
. I managed to add a new flag in the pushprox client entrypoint by adding the following code incmd/client/main.go
:In the variables declaration part:
endpoint = kingpin.Flag("endpoint", "Override metrics endpoint (default is /metrics)").String()
In the
doScrape
function:if *endpoint != "" { request.URL.Path = *endpoint }
Then you just have to add the following flag to your client entrypoint:
--endpoint=/another/metrics/path
Hope it can help you
Hi,
Sorry, but like it was mentionned in #58, the path is not hardcoded: pushproxy is a proxy so it sends the exact query that is set by the client to the final target.
You can test it manually with curl shell cmd:
to reach node_exporter landing page on "client" host
curl -v --proxy http://pushproxy:8080 \
-H "X-Prometheus-Scrape-Timeout-Seconds: 5" \
http://client:9100/
to reach node_exporter status page
curl -v --proxy http://pushproxy:8080 \
-H "X-Prometheus-Scrape-Timeout-Seconds: 5" \
http://client:9100/status
to reach node_exporter metrics page
curl -v --proxy http://pushproxy:8080 \
-H "X-Prometheus-Scrape-Timeout-Seconds: 5" \
http://client:9100/metrics
So if you have trouble to reach the target, it is not the proxy but the config in prometheus !
from pushprox.
Related Issues (20)
- server returned HTTP status 502 Bad Gateway HOT 2
- Cleanup errcheck issues
- Is the PushProx client itself able to use a web proxy to reach the remote PushProx server?
- Scraping more then one exporter. HOT 5
- Add support for http_sd_configs HOT 2
- "malformed HTTP request \"\"" HOT 5
- more complete configuration examples HOT 3
- Become a library HOT 2
- It is very difficult to cowork with nginx. HOT 1
- Is this project still maintained? HOT 1
- Remediation for CircleCL security incident HOT 2
- How to pass ldflags while creating the build ?
- PushProx is using fqdn.get() which is deprecated
- Scraping multiple exporters via pushprox HOT 1
- Getting errors regarding "component" and "CRDs" when trying to install PushProxy with helm chart HOT 1
- Scrap control plane
- Add option for clients to forward requests from the host IP to 127.0.0.1 HOT 2
- Simple test with curl HOT 3
- /clients behavior : fqdn disappear
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pushprox.