|
| 1 | +.. _nginx-receiver: |
| 2 | + |
| 3 | +*********************** |
| 4 | +NGINX receiver |
| 5 | +*********************** |
| 6 | + |
| 7 | +.. meta:: |
| 8 | + :description: The NGINX receiver fetches stats from a NGINX instance using the ``ngx_http_stub_status_module`` module's status endpoint. |
| 9 | + |
| 10 | +The NGINX receiver fetches stats from a NGINX instance using the ``ngx_http_stub_status_module`` module's ``status`` endpoint. The supported pipeline type is ``metrics``. See :ref:`otel-data-processing` for more information. |
| 11 | + |
| 12 | +You need to configure NGINX to expose status information. To learn how, see the :new-page:`HTTP status module config guide <https://nginx.org/en/docs/http/ngx_http_stub_status_module.html>` in the NGINX documentation. |
| 13 | + |
| 14 | +.. note:: Out-of-the-box dashboards and navigators aren't supported for the NGINX Server receiver yet, but are planned for a future release. |
| 15 | + |
| 16 | +Get started |
| 17 | +====================== |
| 18 | + |
| 19 | +Follow these steps to configure and activate the component: |
| 20 | + |
| 21 | +1. Deploy the Splunk Distribution of the OpenTelemetry Collector to your host or container platform: |
| 22 | + |
| 23 | + - :ref:`otel-install-linux` |
| 24 | + - :ref:`otel-install-windows` |
| 25 | + - :ref:`otel-install-k8s` |
| 26 | + |
| 27 | +2. Configure the receiver as described in the next section. |
| 28 | +3. Restart the Collector. |
| 29 | + |
| 30 | +Sample configuration |
| 31 | +--------------------------- |
| 32 | + |
| 33 | +To activate the NGINX receiver, add ``nginx`` to the ``receivers`` section of your configuration file, as shown in the following example: |
| 34 | + |
| 35 | +.. code:: yaml |
| 36 | +
|
| 37 | + receivers: |
| 38 | + nginx: |
| 39 | + endpoint: "http://localhost:80/status" |
| 40 | + collection_interval: 10s |
| 41 | +
|
| 42 | +To complete the configuration, include the receiver in the ``metrics`` pipeline of the ``service`` section of your configuration file. For example: |
| 43 | + |
| 44 | +.. code:: yaml |
| 45 | +
|
| 46 | + service: |
| 47 | + pipelines: |
| 48 | + metrics: |
| 49 | + receivers: [nginx] |
| 50 | +
|
| 51 | +Configuration options |
| 52 | +------------------------------------------------- |
| 53 | + |
| 54 | +The following settings are available: |
| 55 | + |
| 56 | +* ``endpoint``. :strong:`Required`. ``http://localhost:80/status`` by default. The URL of the NGINX status endpoint. |
| 57 | + |
| 58 | +.. include:: /_includes/gdi/collector-settings-collectioninterval.rst |
| 59 | + |
| 60 | +.. include:: /_includes/gdi/collector-settings-initialdelay.rst |
| 61 | + |
| 62 | +Settings |
| 63 | +====================== |
| 64 | + |
| 65 | +The following table shows the configuration options for the NGINX receiver: |
| 66 | + |
| 67 | +.. raw:: html |
| 68 | + |
| 69 | + <div class="metrics-standard" category="included" url="https://raw.githubusercontent.com/splunk/collector-config-tools/main/cfg-metadata/receiver/nginx.yaml"></div> |
| 70 | + |
| 71 | +Metrics |
| 72 | +===================== |
| 73 | + |
| 74 | +The following metrics, resource attributes, and attributes are available. |
| 75 | + |
| 76 | +.. raw:: html |
| 77 | + |
| 78 | + <div class="metrics-component" category="included" url="https://raw.githubusercontent.com/splunk/collector-config-tools/main/metric-metadata/nginxreceiver.yaml"></div> |
| 79 | + |
| 80 | +.. include:: /_includes/activate-deactivate-native-metrics.rst |
| 81 | + |
| 82 | +Troubleshooting |
| 83 | +====================== |
| 84 | + |
| 85 | +.. include:: /_includes/troubleshooting-components.rst |
0 commit comments