From 9c9cc9e58b4ae9e27f507ebf4a40559648c0abcf Mon Sep 17 00:00:00 2001 From: Anna Urbiztondo Date: Mon, 12 Aug 2024 09:23:57 +0200 Subject: [PATCH 1/3] HAProxy --- _includes/gdi/otel-receivers-table.rst | 1 + gdi/opentelemetry/components.rst | 3 + .../components/a-components-receivers.rst | 1 + .../components/haproxy-receiver.rst | 102 ++++++++++++++++++ 4 files changed, 107 insertions(+) create mode 100644 gdi/opentelemetry/components/haproxy-receiver.rst diff --git a/_includes/gdi/otel-receivers-table.rst b/_includes/gdi/otel-receivers-table.rst index 8133fd50f..9d00f8e85 100644 --- a/_includes/gdi/otel-receivers-table.rst +++ b/_includes/gdi/otel-receivers-table.rst @@ -6,6 +6,7 @@ * :ref:`discovery-receiver` * :ref:`filelog-receiver` * :ref:`fluentd-receiver` +* :ref:`haproxy-receiver` * :ref:`host-metrics-receiver` * :ref:`http-check-receiver` * :ref:`jaeger-receiver` diff --git a/gdi/opentelemetry/components.rst b/gdi/opentelemetry/components.rst index a56805b40..f13e4cb77 100644 --- a/gdi/opentelemetry/components.rst +++ b/gdi/opentelemetry/components.rst @@ -73,6 +73,9 @@ The Splunk Distribution of the OpenTelemetry Collector includes and supports the * - :ref:`fluentd-receiver` (``fluentforward``) - Runs a TCP server that accepts events through the Fluentd Forward protocol. - Logs + * - :ref:`haproxy-receiver` (``haproxy``) + - Generates metrics by polling periodically the HAProxy process through a dedicated socket or HTTP URL. + - Metrics * - :ref:`host-metrics-receiver` (``hostmetrics``) - Generates system metrics from various sources. Use this receiver when deploying the Collector as an agent. - Metrics diff --git a/gdi/opentelemetry/components/a-components-receivers.rst b/gdi/opentelemetry/components/a-components-receivers.rst index ccabb35c6..497b51010 100644 --- a/gdi/opentelemetry/components/a-components-receivers.rst +++ b/gdi/opentelemetry/components/a-components-receivers.rst @@ -20,6 +20,7 @@ Collector components: Receivers discovery-receiver filelog-receiver fluentd-receiver + haproxy-receiver host-metrics-receiver http-check-receiver jaeger-receiver diff --git a/gdi/opentelemetry/components/haproxy-receiver.rst b/gdi/opentelemetry/components/haproxy-receiver.rst new file mode 100644 index 000000000..49278d5de --- /dev/null +++ b/gdi/opentelemetry/components/haproxy-receiver.rst @@ -0,0 +1,102 @@ +.. _haproxy-receiver: + +*********************** +HAProxy receiver +*********************** + +.. meta:: + :description: The HAProxy receiver generates metrics by polling periodically the HAProxy process through a dedicated socket or HTTP URL + +The HAProxy receiver generates metrics by polling periodically the HAProxy process through a dedicated socket or HTTP URL. The supported pipeline type is ``metrics``. See :ref:`otel-data-processing` for more information. + +Get started +====================== + +Follow these steps to configure and activate the component: + +1. Deploy the Splunk Distribution of the OpenTelemetry Collector to your host or container platform: + + - :ref:`otel-install-linux` + - :ref:`otel-install-windows` + - :ref:`otel-install-k8s` + +2. Configure the receiver as described in the next section. +3. Restart the Collector. + +Sample configurations +--------------------------- + +To activate the HAProxy receiver, add ``haproxy`` to the ``receivers`` section of your configuration file, as shown in the following example: + +.. code:: yaml + + receivers: + haproxy: + endpoint: file:///var/run/haproxy.ipc + collection_interval: 1m + metrics: + +To complete the configuration, include the receiver in the ``metrics`` pipeline of the ``service`` section of your configuration file. For example: + +.. code:: yaml + + service: + pipelines: + metrics: + receivers: [haproxy] + +Configuration options +-------------------------------------------- + +You can configure the following settings: + +* ``endpoint``. :strong:`Required`. Path to the endpoint exposed by HAProxy for communications. It can be a local file socket or a HTTP URL. + +* ``collection_interval``. Optional, ``1m`` by default. The scraping collection interval. + +* ``initial_delay``. Optional, ``1s`` by default. Defines how long this receiver waits before starting. + +Enable or disable metrics +-------------------------------------------- + +You can enable or disable metrics by using the `enabled` flag. For example: + +.. code:: yaml + + receivers: + haproxy: + endpoint: http://127.0.0.1:8080/stats + metrics: + haproxy.connection_rate: + enabled: false + haproxy.requests: + enabled: true + +For the full list of metrics, see :ref:`haproxy-receiver-metrics`. + +Settings +====================== + +The following table shows the configuration options for the HAProxy receiver: + +.. raw:: html + +
+ +.. _haproxy-receiver-metrics: + +Metrics +===================== + +The following metrics, resource attributes, and attributes are available. + +.. raw:: html + +
+ +.. include:: /_includes/activate-deactivate-native-metrics.rst + +Troubleshooting +====================== + +.. include:: /_includes/troubleshooting-components.rst From 054a2eda2171103ebe0717838698114c2579c35d Mon Sep 17 00:00:00 2001 From: Anna Urbiztondo Date: Mon, 12 Aug 2024 11:19:12 +0200 Subject: [PATCH 2/3] Correction --- .../components/haproxy-receiver.rst | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/gdi/opentelemetry/components/haproxy-receiver.rst b/gdi/opentelemetry/components/haproxy-receiver.rst index 49278d5de..5b1bc40dc 100644 --- a/gdi/opentelemetry/components/haproxy-receiver.rst +++ b/gdi/opentelemetry/components/haproxy-receiver.rst @@ -56,24 +56,6 @@ You can configure the following settings: * ``initial_delay``. Optional, ``1s`` by default. Defines how long this receiver waits before starting. -Enable or disable metrics --------------------------------------------- - -You can enable or disable metrics by using the `enabled` flag. For example: - -.. code:: yaml - - receivers: - haproxy: - endpoint: http://127.0.0.1:8080/stats - metrics: - haproxy.connection_rate: - enabled: false - haproxy.requests: - enabled: true - -For the full list of metrics, see :ref:`haproxy-receiver-metrics`. - Settings ====================== From e69c1c9c82010046b1bec5ba809b3228741e4f9a Mon Sep 17 00:00:00 2001 From: Anna Urbiztondo Date: Tue, 13 Aug 2024 10:25:19 +0200 Subject: [PATCH 3/3] Notes --- gdi/monitors-hosts/haproxy.rst | 4 +++- gdi/opentelemetry/components/haproxy-receiver.rst | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gdi/monitors-hosts/haproxy.rst b/gdi/monitors-hosts/haproxy.rst index 032388901..81b8e9835 100644 --- a/gdi/monitors-hosts/haproxy.rst +++ b/gdi/monitors-hosts/haproxy.rst @@ -6,10 +6,12 @@ HAProxy .. meta:: :description: Use this Splunk Observability Cloud integration for the HAProxy monitor. See benefits, install, configuration, and metrics -The Splunk Distribution of OpenTelemetry Collector uses the Smart Agent receiver with the +The Splunk Distribution of the OpenTelemetry Collector uses the Smart Agent receiver with the HAProxy monitor type to monitor an HAProxy instance. This monitor requires HAProxy 1.5+. +.. note:: To monitor your HAProxy instances you can instead use the native OpenTelemetry HAProxy receiver. To learn more, see :ref:`haproxy-receiver`. + Benefits -------- diff --git a/gdi/opentelemetry/components/haproxy-receiver.rst b/gdi/opentelemetry/components/haproxy-receiver.rst index 5b1bc40dc..ae56465ff 100644 --- a/gdi/opentelemetry/components/haproxy-receiver.rst +++ b/gdi/opentelemetry/components/haproxy-receiver.rst @@ -9,6 +9,8 @@ HAProxy receiver The HAProxy receiver generates metrics by polling periodically the HAProxy process through a dedicated socket or HTTP URL. The supported pipeline type is ``metrics``. See :ref:`otel-data-processing` for more information. +.. note:: Out-of-the-box dashboards and navigators aren't supported for the HAProxy receiver yet, but are planned for a future release. + Get started ======================