Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit c4589b8

Browse files
WIP
1 parent 13d1f8e commit c4589b8

File tree

4 files changed

+140
-0
lines changed

4 files changed

+140
-0
lines changed

_includes/gdi/otel-receivers-table.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
* :ref:`mongodb-atlas-receiver`
2424
* :ref:`mssql-server-receiver`
2525
* :ref:`mysql-receiver`
26+
* :ref:`ngninx-receiver`
2627
* :ref:`oracledb-receiver`
2728
* :ref:`otlp-receiver`
2829
* :ref:`postgresql-receiver`

gdi/opentelemetry/components.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ The Splunk Distribution of the OpenTelemetry Collector includes and supports the
124124
* - :ref:`mysql-receiver` (``mysql``)
125125
- Queries and retrieves metrics about MySQL's global status and InnoDB tables.
126126
- Metrics
127+
* - :ref:`ngninx-receiver` (``ngninx``)
128+
- Fetches stats from a Nginx instance using the ``ngx_http_stub_status_module`` module's status endpoint.
129+
- Metrics
127130
* - :ref:`oracledb` (``oracledb``) |br|
128131
- Connects to an Oracle Database instance and obtains metrics such as physical reads, CPU, time, and others.
129132
- Metrics

gdi/opentelemetry/components/a-components-receivers.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Collector components: Receivers
3737
mongodb-atlas-receiver
3838
mssql-server-receiver
3939
mysql-receiver
40+
ngninx-receiver
4041
oracledb-receiver
4142
otlp-receiver
4243
postgresql-receiver
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
.. _ngninx-receiver:
2+
3+
***********************
4+
NGINX receiver
5+
***********************
6+
7+
.. meta::
8+
:description: The NGNINX receiver fetches stats from a Nginx instance using the ``ngx_http_stub_status_module`` module's status endpoint.
9+
10+
The NGNINX 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+
13+
14+
15+
16+
17+
18+
19+
20+
21+
22+
23+
24+
The receiver collects stats with MongoDB's ``dbStats`` and ``serverStatus`` commands, and uses the golang mongo driver. See more at :new-page:`Mongo Go driver documentation <https://github.com/mongodb/mongo-go-driver>`.
25+
26+
.. note:: Use the MongoDB receiver in place of the deprecated SignalFx Smart Agent ``mongodb`` monitor type.
27+
28+
Prerequisites
29+
======================
30+
31+
The MongoDB receiver supports MongoDB versions 4.0+ and 5.0.
32+
33+
MongoDB recommends to set up a least privilege user (LPU) with a ``clusterMonitor`` role in order to collect metrics.
34+
35+
* For information on MongoDB's roles, see :new-page:`MongoDB built-in roles <https://www.mongodb.com/docs/v5.0/reference/built-in-roles/#mongodb-authrole-clusterMonitor>`.
36+
* For an example of how to configure these permissions, see :new-page:`lpu.sh <https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/mongodbreceiver/testdata/integration/scripts/lpu.sh>`.
37+
38+
.. note:: If you're using automatic discovery with MongoDB, see :ref:`linux-third-party-mongodb`.
39+
40+
Get started
41+
======================
42+
43+
Follow these steps to configure and activate the component:
44+
45+
1. Deploy the Splunk Distribution of the OpenTelemetry Collector to your host or container platform:
46+
47+
- :ref:`otel-install-linux`
48+
- :ref:`otel-install-windows`
49+
- :ref:`otel-install-k8s`
50+
51+
2. Configure the receiver as described in the next section.
52+
3. Restart the Collector.
53+
54+
Sample configurations
55+
---------------------------
56+
57+
To activate the MongoDB receiver, add ``mongodb`` to the ``receivers`` section of your configuration file, as shown in the following example:
58+
59+
.. code:: yaml
60+
61+
receivers:
62+
mongodb:
63+
hosts:
64+
- endpoint: localhost:27017
65+
transport: tcp
66+
username: otel
67+
password: ${env:MONGODB_PASSWORD}
68+
collection_interval: 60s
69+
initial_delay: 1s
70+
tls:
71+
insecure: true
72+
insecure_skip_verify: true
73+
74+
To complete the configuration, include the receiver in the ``metrics`` pipeline of the ``service`` section of your configuration file. For example:
75+
76+
.. code:: yaml
77+
78+
service:
79+
pipelines:
80+
metrics:
81+
receivers: [mongodb]
82+
83+
Configuration options
84+
--------------------------------------------
85+
86+
The following settings are optional:
87+
88+
* ``hosts``. ``[localhost:27017]`` by default. List of ``host:port`` or Unix domain socket endpoints.
89+
90+
* For standalone MongoDB deployments this is the hostname and port of the mongod instance.
91+
92+
* For replica sets specify the hostnames and ports of the mongod instances that are in the replica set configuration. If the ``replica_set`` field is specified, nodes will be autodiscovered.
93+
94+
* For a sharded MongoDB deployment, specify a list of the ``mongos`` hosts.
95+
96+
* ``username``: If authentication is required, provide the ``clusterMonitor`` permissions here.
97+
98+
* ``password``: If authentication is required, provide the password here.
99+
100+
* ``collection_interval``. ``1m`` by default. This receiver collects metrics on an interval. Valid time units are ``ns``, ``us`` (or ``µs``), ``ms``, ``s``, ``m``, ``h``. This value must be a string readable by Golang's time parseDuration. Learn more at :new-page:`ParseDuration <https://pkg.go.dev/time#ParseDuration>`.
101+
102+
* ``initial_delay``. ``1s`` by default. Defines how long this receiver waits before starting.
103+
104+
* ``replica_set``: If the deployment of MongoDB is a replica set, use this to specify the replica set name which allows for autodiscovery of other nodes in the replica set.
105+
106+
* ``timeout``. ``1m`` by default. The timeout of running commands against mongo.
107+
108+
* ``tls``: TLS control. By default insecure settings are rejected and certificate verification is on. See more at :new-page:`TLS Configuration Settings <https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md>`.
109+
110+
Settings
111+
======================
112+
113+
The following table shows the configuration options for the MongoDB receiver:
114+
115+
.. raw:: html
116+
117+
<div class="metrics-standard" category="included" url="https://raw.githubusercontent.com/splunk/collector-config-tools/main/cfg-metadata/receiver/mongodb.yaml"></div>
118+
119+
Metrics
120+
=====================
121+
122+
The following metrics, resource attributes, and attributes are available.
123+
124+
.. raw:: html
125+
126+
<div class="metrics-component" category="included" url="https://raw.githubusercontent.com/splunk/collector-config-tools/main/metric-metadata/mongodbreceiver.yaml"></div>
127+
128+
* ``mongodb.extent.count`` is available for versions under 4.4 with mmapv1 storage engine.
129+
130+
.. include:: /_includes/activate-deactivate-native-metrics.rst
131+
132+
Troubleshooting
133+
======================
134+
135+
.. include:: /_includes/troubleshooting-components.rst

0 commit comments

Comments
 (0)