Comments (17)
@jzielke-nli I have opened #101. Depending on feedback it may require some additional work.
from haproxy_exporter.
In order to avoid complexity to understand the different code status, I would propose to rename the up
metric to something like:
status{status="up", backend="my_backend_name"} 42
status{status="down", backend="my_backend_name"} 5
status{status="maint", backend="my_backend_name"} 18
WDYT @grobie?
from haproxy_exporter.
Strongly advise this change
from haproxy_exporter.
waiting for @grobie acknowledgment before starting any patch
from haproxy_exporter.
I wouldn't change the current up metric, it's being used in many dashboards and alert expressions. I'd be fine adding an additional metric, but I'm a bit worried about the label cardinality. I'm counting at least 9 different status values. Maybe only add that metric to backend and frontend lines?
from haproxy_exporter.
@grobie the MAINT status is only avaiable in the backend. At least the status MAINT shouldn't return 0 because a planned maitenance by definition is not an error nor an unwanted condition. Normally the status page of haproxy only has the status UP,DOWN,MAINT and DRAIN (see: Link).
Also drain is a forced action which is wanted by the administrators of the proxy and thus should not be considered as a failure either. So generally spoken, UP and DOWN are conditions which could be met without any action (e.g. in an error case) while DRAIN and MAINT are forced actions which should be treated differently. Hence my suggestion to return 2 and expand the haproxy metrics.
from haproxy_exporter.
ok I can add what I proposed
from haproxy_exporter.
The up metric is a common pattern in Prometheus and is a boolean value with the values 0 or 1. An instance / a server which can't serve requests is not up, whether it's not up because of errors or maintenance is not being answered by this metric. If that destinction is relevant to users, I'm happy to accept a PR which will add a new metric broken down by status type.
from haproxy_exporter.
I would very much like the status to be exposed, particularly per server, few thoughts (partly echoing what has already been said):
- "returncode of 2" would be meaningless once you start summing across metrics.
- Not (numerically) counting MAINT as down is dangerous. Let's say I alert when I have less than 5 servers ready. I normally have 10 servers in the backend, I take 2 down for maintenance (MAINT), then 4 of the remaining servers fail. If MAINT isn't being counted as down I will not get an alert.
I would support leaving the current up metric as is, and creating a new metric e.g:
haproxy_server_status{status="MAINT",backend="foo",instance="bar",job="haproxy",server="server1"} 1
Transitional statuses could perhaps be normalised, e.g "UP 1/3" and "UP 2/3" become "UP".
from haproxy_exporter.
So rather than changing the metric, adding a new attribute is the right way to go so users can decide whether to work with that new information being parsed or not without breaking anything they've created so far.
Unfortunately I'm not familiar with the go-syntax and although I understand parts of it I think it's better someone does the pull request who knows what he's doing. Th suggestion of @Tom-Fawcett seems to point in the right direction.
from haproxy_exporter.
Any plans on implementing this one in the near future?
from haproxy_exporter.
@grobie Please be so kind and commit this change if ok.
from haproxy_exporter.
With MAINT of a server being configured as a new metric, in this threads example, how would that work with Grafana where you have a single panel for status of a server?
from haproxy_exporter.
Any update on this? @grobie
from haproxy_exporter.
Dead end here?
from haproxy_exporter.
Any update on this one ?
from haproxy_exporter.
Hi, I am closing this issue because we are retiring this exporter. We will not be implementing new features anymore.
Please use the Prometheus support in HAProxy directly. It may already support this; if not, please open an issue against the HAProxy repository.
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.