Giter Club home page Giter Club logo

Comments (17)

Tom-Fawcett avatar Tom-Fawcett commented on July 22, 2024 4

@jzielke-nli I have opened #101. Depending on feedback it may require some additional work.

from haproxy_exporter.

wdauchy avatar wdauchy commented on July 22, 2024 2

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.

jzielke84 avatar jzielke84 commented on July 22, 2024

Strongly advise this change

from haproxy_exporter.

wdauchy avatar wdauchy commented on July 22, 2024

waiting for @grobie acknowledgment before starting any patch

from haproxy_exporter.

grobie avatar grobie commented on July 22, 2024

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.

jzielke84 avatar jzielke84 commented on July 22, 2024

@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.

wdauchy avatar wdauchy commented on July 22, 2024

ok I can add what I proposed

from haproxy_exporter.

grobie avatar grobie commented on July 22, 2024

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.

Tom-Fawcett avatar Tom-Fawcett commented on July 22, 2024

I would very much like the status to be exposed, particularly per server, few thoughts (partly echoing what has already been said):

  1. "returncode of 2" would be meaningless once you start summing across metrics.
  2. 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.

jzielke84 avatar jzielke84 commented on July 22, 2024

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.

jzielke84 avatar jzielke84 commented on July 22, 2024

Any plans on implementing this one in the near future?

from haproxy_exporter.

jzielke84 avatar jzielke84 commented on July 22, 2024

@grobie Please be so kind and commit this change if ok.

from haproxy_exporter.

Shadow00Caster avatar Shadow00Caster commented on July 22, 2024

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.

jnogol avatar jnogol commented on July 22, 2024

Any update on this? @grobie

from haproxy_exporter.

jzielke84 avatar jzielke84 commented on July 22, 2024

Dead end here?

from haproxy_exporter.

ekm1908 avatar ekm1908 commented on July 22, 2024

Any update on this one ?

from haproxy_exporter.

matthiasr avatar matthiasr commented on July 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.