Comments (9)
Got it working by just quoting the whole line (no quotes inside):
args:
- '--haproxy.scrape-uri=http://user:[email protected]:2200/haproxy/haproxy_stats.php?haproxystats=1;csv'
from haproxy_exporter.
hello @easylo
what is the command line you are using exactly? I cannot reproduce on my side
from haproxy_exporter.
ping @easylo
from haproxy_exporter.
@wdauchy i can confirm the but @easylo found; It happend to me today, as i tried to deploy the haproxy_exporter via kubernetes as a deployment:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: haproxy-exporter-lb
name: haproxy-exporter-lb
namespace: kube-system
spec:
replicas: 1
selector:
matchLabels:
app: haproxy-exporter-lb
template:
metadata:
labels:
app: haproxy-exporter-lb
spec:
containers:
- name: haproxy-exporter-lb
image: quay.io/prometheus/haproxy-exporter:latest
ports:
- containerPort: 9101
hostPort: 9101
args:
- --haproxy.scrape-uri="http://user:[email protected]:2200/haproxy/haproxy_stats.php?haproxystats=1;csv"
shows the following output:
time="2018-01-22T11:08:04Z" level=info msg="Starting haproxy_exporter (version=, branch=, revision=)" source="haproxy_exporter.go:495"
time="2018-01-22T11:08:04Z" level=info msg="Build context (go=go1.9.2, user=, date=)" source="haproxy_exporter.go:496"
time="2018-01-22T11:08:04Z" level=fatal msg="parse \"http://user:[email protected]:2200/haproxy/haproxy_stats.php?haproxystats=1;csv\": first path segment in URL cannot contain colon" source="haproxy_exporter.go:500"
However, if i try to run it simpl via docker (not kubernetes deployment) it is running fine:
docker run -p 9101:9101 -it --rm quay.io/prometheus/haproxy-exporter:latest --haproxy.scrape-uri="http://user:[email protected]:2200/haproxy/haproxy_stats.php?haproxystats=1;csv"
I think the problem is the escaping, which kubernetes does if you pass args to your deployment. When i try to run it with escaping:
docker run -p 9101:9101 -it --rm quay.io/prometheus/haproxy-exporter:latest --haproxy.scrape-uri=\"http://user:[email protected]:2200/haproxy/haproxy_stats.php?haproxystats=1;csv\"
it fails with the same error message as on kubernetes :/
from haproxy_exporter.
Try quoting the whole arg:
args:
- '--haproxy....'
from haproxy_exporter.
@discordianfish doesn't work either:
Deployment:
args:
- '--haproxy.scrape-uri="http://user:[email protected]:2200/haproxy/haproxy_stats.php?haproxystats=1;csv"'
Error:
time="2018-01-23T08:00:21Z" level=fatal msg="parse \"http://user:[email protected]:2200/haproxy/haproxy_stats.php?haproxystats=1;csv\": first path segment in URL cannot contain colon" source="haproxy_exporter.go:500"
from haproxy_exporter.
Meh, was worth a try. Had my fair share of escaping issues with yaml myself. Either way, this isn't a problem with the haproxy-exporter but with the manifest. So I think it makes sense to close this.
from haproxy_exporter.
Thanks for the tip @discostur ! To add another one, don't try and escape any special characters in your password like I was!
from haproxy_exporter.
Got it working by just quoting the whole line (no quotes inside):
args: - '--haproxy.scrape-uri=http://user:[email protected]:2200/haproxy/haproxy_stats.php?haproxystats=1;csv'
Thanks for the tip!
from haproxy_exporter.
Related Issues (20)
- Error when using docker-compose HOT 1
- Cutting a new release HOT 4
- Haproxy stats page report inaccurate data. HOT 3
- not read stats in haproxy for monitoring HOT 1
- haproxy.scrape-uri parameter format HOT 1
- Can't scrape HAProxy: Requested canceled while waiting for connection. HOT 1
- Metric for frontend status HOT 2
- haproxy_backend_http_responses_total per API? HOT 1
- Multiple remote haproxy HOT 2
- http_responses_total missing exported_service label HOT 1
- crashes on http.ListenAndServe (during accepting new connections) HOT 2
- only one pid's metrics return by exporter HOT 6
- Discard golang / process metrics HOT 4
- dockerhub images have wrong os/architecture tags HOT 2
- The README file in Docker Hub uses the wrong command "-haproxy.scrape-uri" HOT 1
- --help
- haproxy_exporter.exe commited to repo HOT 1
- ts=2022-01-17T08:59:49.183Z caller=haproxy_exporter.go:421 level=error msg="Unexpected error while reading CSV" err="unexpected EOF" HOT 1
- dial tcp 127.0.0.1:8181: connect: connection refused HOT 3
- metric description HOT 1
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 haproxy_exporter.