Skip to content

[haproxy_otel] Haproxy OpenTelemetry assets - #17189

Merged
ritalwar merged 21 commits into
elastic:mainfrom
ritalwar:haproxy_otel_content_pack
Mar 31, 2026
Merged

[haproxy_otel] Haproxy OpenTelemetry assets#17189
ritalwar merged 21 commits into
elastic:mainfrom
ritalwar:haproxy_otel_content_pack

Conversation

@ritalwar

@ritalwar ritalwar commented Feb 2, 2026

Copy link
Copy Markdown
Contributor
  • Enhancement

Proposed commit message

This PR adds Haproxy Otel content pack which include assets like dashboards, alert_rule_templates and slo_template.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Screenshots

haproxy-metrics-overview-otel haproxy-metrics-frontend-otel haproxy-metrics-backend-otel haproxy-metrics-server-otel
@ritalwar ritalwar self-assigned this Feb 2, 2026
@ritalwar ritalwar added documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. dashboard Relates to a Kibana dashboard bug, enhancement, or modification. New Integration Issue or pull request for creating a new integration package. Team:Obs-InfraObs Observability Infrastructure Monitoring team [elastic/obs-infraobs-integrations] labels Feb 2, 2026
@ritalwar ritalwar changed the title Draft PR for haproxy otel package with backend dashboard Feb 2, 2026
@ritalwar
ritalwar marked this pull request as ready for review February 12, 2026 08:40
@ritalwar
ritalwar requested a review from a team as a code owner February 12, 2026 08:40
@lalit-satapathy

Copy link
Copy Markdown
Contributor

@claude for detailed initial review.

@github-actions

github-actions Bot commented Feb 17, 2026

Copy link
Copy Markdown
Contributor

Claude finished @lalit-satapathy's task in 3m 28s —— View job


Detailed Initial Review

I've completed the detailed review and submitted my feedback via the PR review system.

  • Gather repository context and guidelines
  • Check existing review comments (none found)
  • Review manifest.yml configuration
  • Review changelog.yml
  • Review documentation (README.md)
  • Review CODEOWNERS entry
  • Review dashboard JSON files
  • Check screenshots are properly configured
  • Check for best practices alignment
  • Submit detailed review

Review Summary:

The HAProxy OpenTelemetry content pack is well-structured overall. I found 2 medium-severity and 4 low-severity items to address:

Severity File Issue
🟡 Medium manifest.yml Screenshots are commented out despite images existing in /img
🟡 Medium docs/README.md Service pipeline missing exporter - users following this example won't get data into Elasticsearch
⚪ Low manifest.yml Typo: "OpenTelemtry" → "OpenTelemetry"
⚪ Low docs/README.md HAProxy config example should be in a code block
⚪ Low docs/README.md batch processor used but not defined in config
⚪ Low docs/README.md Consider adding metrics reference table like nginx_otel

Good practices observed:

  • ✅ Proper CODEOWNERS entry
  • ✅ Changelog follows correct format with PR link
  • ✅ Dashboard naming is consistent ([Metrics HAProxy Otel] prefix)
  • ✅ Appropriate Kibana version constraint (^9.2.0)
  • ✅ Correct type: content for OTel content packs
  • ✅ Dataset discovery properly configured

See the full review for inline comments and suggested fixes.

--- | Branch: haproxy_otel_content_pack


Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a well-structured HAProxy OpenTelemetry content pack with good dashboard coverage. I've added a few suggestions that can improve the quality and consistency with other OTel content packs in this repository.

Summary of key feedback:

  1. Screenshots are commented out - The screenshot images already exist in the /img folder but the screenshots section in manifest.yml is commented out. Enabling these would improve discoverability in Kibana.

  2. OTel config example incomplete - The example configuration in the README is missing the exporter in the service pipeline, and the batch processor is used but not defined. Users following this example literally would not get data into Elasticsearch.

  3. Minor documentation improvements - The HAProxy config example should be in a code block, and a brief metrics reference table (like in nginx_otel) would be helpful.

Good practices observed:

  • Proper CODEOWNERS entry
  • Changelog follows correct format with PR link
  • Dashboard naming is consistent ([Metrics HAProxy Otel] prefix)
  • Appropriate Kibana version constraint (^9.2.0)
  • Uses type: content correctly for OTel content packs
  • Dataset discovery properly configured
Nitpick comments (1)

💬 NITPICK Icon title could be more descriptive — packages/haproxy_otel/manifest.yml:28

Why: Other packages use more descriptive icon titles (e.g. 'logo HAProxy' or 'Logo MySQL OTEL')

icons:
  - src: /img/logo_haproxy.svg
    title: HAProxy logo
    size: 32x32
    type: image/svg+xml

Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Comment thread packages/haproxy_otel/manifest.yml Outdated
version: 0.1.0
source:
license: "Elastic-2.0"
description: "Haproxy stats metrics from OpenTelemtry Collector"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ LOW Typo in description

Why: Typo 'OpenTelemtry' should be 'OpenTelemetry' for consistency

Suggested change
description: "Haproxy stats metrics from OpenTelemtry Collector"
description: "Haproxy stats metrics from OpenTelemetry Collector"

Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Comment thread packages/haproxy_otel/manifest.yml Outdated
discovery:
datasets:
- name: haproxyreceiver.otel
# screenshots:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 MEDIUM Screenshots are commented out

Why: Other OTel content packs include screenshots which improve discoverability in Kibana. The images already exist in /img folder

Suggested change
# screenshots:
screenshots:
- src: /img/haproxy-metrics-overview-otel.png
title: HAProxy OTel Metrics Overview
size: 600x600
type: image/png
- src: /img/haproxy-metrics-frontend-otel.png
title: HAProxy OTel Frontend
size: 600x600
type: image/png
- src: /img/haproxy-metrics-backend-otel.png
title: HAProxy OTel Backend
size: 600x600
type: image/png
- src: /img/haproxy-metrics-http-frontend-otel.png
title: HAProxy OTel HTTP Frontend
size: 600x600
type: image/png
- src: /img/haproxy-metrics-http-backend-otel.png
title: HAProxy OTel HTTP Backend
size: 600x600
type: image/png
- src: /img/haproxy-metrics-http-server-otel.png
title: HAProxy OTel HTTP Server
size: 600x600
type: image/png

Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.



service:
pipelines:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 MEDIUM Missing exporter in service pipeline

Why: The service pipeline references processors and receivers but doesn't include exporters, which would prevent data from being sent to Elasticsearch

Suggested change
pipelines:
service:
pipelines:
metrics:
receivers: [haproxy]
processors: [batch]
exporters: [elasticsearch/otel]

Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

2. Permissions required: The collector requires access to HAProxy metrics, which are exposed via either the stats socket or the HTTP stats endpoint. Ensure that the OTEL Collector can read from the socket or query the HTTP endpoint. For example, if using the stats socket, the user running the collector must have read permissions on the socket file.

3. HAProxy configuration: HTTP stats endpoint: If using the HTTP stats page, configure HAProxy to allow access from the collector host. For example:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ LOW HAProxy config should be in code block

Why: The HAProxy configuration example should be formatted as a code block for better readability, consistent with other config examples in the doc

Suggested change
3. HAProxy configuration: HTTP stats endpoint: If using the HTTP stats page, configure HAProxy to allow access from the collector host. For example:
\`\`\`
listen stats
bind *:8404
mode http
stats enable
stats uri /metrics
stats refresh 10s
stats auth admin:password
\`\`\`

Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Comment thread packages/haproxy_otel/docs/README.md Outdated

- Export to Elasticsearch

Example: otel-collector-config.yaml:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ LOW Missing processors definition

Why: The example config uses 'batch' processor in the pipeline but doesn't define it in the processors section. Similar OTel integrations include a resourcedetection processor too.

Suggested change
Example: otel-collector-config.yaml:
Example: otel-collector-config.yaml:
\`\`\`
receivers:
haproxy:
endpoint: http://localhost:8404/stats
collection_interval: 10s
metrics:
haproxy.sessions.total:
enabled: true
# ... other metrics ...
processors:
batch: {}
resourcedetection:
detectors: ["system", "ec2"]
exporters:
debug:
verbosity: normal
elasticsearch/otel:
endpoints: https://localhost:9200
# ...

Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Comment thread packages/haproxy_otel/docs/README.md Outdated
4. Enable [Optional Haproxy metrics](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/haproxyreceiver/documentation.md#optional-metrics) in config file: HAProxy exposes a set of default metrics automatically. The OpenTelemetry HAProxy receiver has a list of optional metrics that are not enabled by default. If you want these optional metrics to appear in Elasticsearch, you must explicitly enable them in the OTel Collector HAProxy receiver configuration like in the example above.


## Metrics reference

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ LOW Consider adding metrics reference table

Why: Other OTel integrations like nginx_otel include a metrics reference table which helps users understand what metrics are available. Currently this section only links to external documentation.


Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@mykola-elastic mykola-elastic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick visuals review

Dashboards

Logo

Most of the OTel assets CPs have a small OpenTelemetry logo in the corner, though there is no strict rule.

Screenshots

The dashboard screenshots are good, just I'd try to load the haproxy a little bit so that graphs look a bit more alive.

For example, a simple script that I used for nginx:
nginx-test.sh

  • generate some GET, HEAD, OPTIONS requests (10 to 20 per second)
  • generate GET requests at /not-found to trigger 404 errors (1-2 per second)
  • generate GET requests at /throw503 (I configured the endpoint to always respond with 503) (1-2 requests every 5 seconds)

Of course it will be a bit different with Haproxy, maybe not worth it, up to you to decide.

@ritalwar
ritalwar marked this pull request as draft March 3, 2026 11:29
@ritalwar
ritalwar marked this pull request as ready for review March 4, 2026 09:08
Comment thread packages/haproxy_otel/_dev/shared/haproxy.yaml Outdated
Comment thread packages/haproxy_otel/docs/README.md Outdated
Comment thread packages/haproxy_otel/manifest.yml Outdated
ritalwar and others added 2 commits March 16, 2026 19:17
Co-authored-by: Ishleen Kaur <102962586+ishleenk17@users.noreply.github.com>
@strawgate

Copy link
Copy Markdown
Contributor

I ran kb-dashboard 0.4.0 upgrade validation on this PR in an isolated worktree.

Results

  • packages/haproxy_otel/_dev/shared
    • upgrade --fail-on-change exit: 4
    • upgrade --write exit: 0
    • post-upgrade compile --format elastic-integrations exit: 0

Upgrade and post-upgrade compile succeeded with 0.4.0.
Please apply these commands in your branch and commit both YAML + regenerated JSON artifacts.

Suggested commands:

uvx --from kb-dashboard-cli==0.4.0 kb-dashboard upgrade --input-dir packages/haproxy_otel/_dev/shared --write
uvx --from kb-dashboard-cli==0.4.0 kb-dashboard compile --input-dir packages/haproxy_otel/_dev/shared --output-dir packages/haproxy_otel/kibana/dashboard --format elastic-integrations
@ishleenk17

Copy link
Copy Markdown
Member

/test

Comment thread packages/haproxy_otel/docs/README.md Outdated
Comment thread packages/haproxy_otel/_dev/shared/haproxy-frontend.yaml Outdated
@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

History

cc @ritalwar

@ritalwar
ritalwar merged commit 0dd5dc6 into elastic:main Mar 31, 2026
12 checks passed
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Package haproxy_otel - 0.1.0 containing this change is available at https://epr.elastic.co/package/haproxy_otel/0.1.0/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboard Relates to a Kibana dashboard bug, enhancement, or modification. documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. Integration:haproxy_otel Haproxy OpenTelemetry Assets New Integration Issue or pull request for creating a new integration package. Team:Obs-InfraObs Observability Infrastructure Monitoring team [elastic/obs-infraobs-integrations]

7 participants