rfmoz / grafana-dashboards

Grafana dashboards
Apache License 2.0
1.17k stars 445 forks source link

HAProxy Query Params Outdated #62

Closed lz006 closed 4 years ago

lz006 commented 4 years ago

HI, thanks for your amazing Dashboard. We use it for our HAProxy Installation. Unfortunately it seems as several metric names must have changed. Therefor we had to compensate it via following config:

    metric_relabel_configs:
    - source_labels: 
        - __name__
        - proxy
      target_label: frontend
      action: replace
      regex: (haproxy_frontend_.*);(.*)
      replacement: ${2}
    - source_labels:
        - __name__
        - proxy
      target_label: backend
      action: replace
      regex: (haproxy_backend_.*);(.*)
      replacement: ${2}
    - source_labels:
        - __name__
        - proxy
      target_label: backend
      action: replace
      regex: (haproxy_server_.*);(.*)
      replacement: ${2}
    - source_labels:
        - __name__
      target_label: __name__
      regex: haproxy_process_jobs
      replacement: haproxy_up
    - source_labels:
        - __name__
      target_label: __name__
      regex: haproxy_backend_status
      replacement: haproxy_backend_up
    - source_labels:
        - __name__
      target_label: __name__
      regex: haproxy_server_connection_attempts_total
      replacement: haproxy_server_connections_total
    - source_labels:
        - __name__
      target_label: __name__
      regex: haproxy_server_status
      replacement: haproxy_server_up
    - regex: proxy
      action: labeldrop

Without this workaround your Dashboard doesn't even find any host, backend and frontends.Main reason is, that HAProxys' built in prom exporter labels "frontend" and "backend" as "proxy".

Despite relabeling I wasn't to provide a replacement for:

thank you!

rfrail3 commented 4 years ago

Hello lz006,

Please, update to the last dashboard that I uploaded past week: https://github.com/rfrail3/grafana-dashboards/blob/master/prometheus/haproxy-2-full.json

It's tested with the last HAProxy 2.2 and it works fine.

Thanks,

lz006 commented 4 years ago

ah thanks, we downloaded it from grafana dashboard library...