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

Commit a5c0c92

Browse files
Feedback
1 parent 028ec85 commit a5c0c92

File tree

1 file changed

+44
-31
lines changed

1 file changed

+44
-31
lines changed

gdi/opentelemetry/deployments/deployments-ecs-ec2.rst

Lines changed: 44 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ Notes:
4444

4545
* You can set the memory limit for the ``memory_limiter`` processor using environment variable ``SPLUNK_MEMORY_LIMIT_MIB``. The default memory limit is 512 MiB.
4646

47-
* To run Docker containers in Amazon ECS you need a task definition and to launch the Collector.
48-
4947
.. _ecs-ec2-custom-config:
5048

5149
Deploy the Collector using a custom configuration
@@ -57,19 +55,56 @@ Alternatively, you can specify the custom configuration YAML directly using the
5755

5856
.. _ecs-observer-config:
5957

60-
Configure ``ecs_observer``
61-
--------------------------------
58+
Configure the Amazon Elastic Container Service Observer extension
59+
=======================================================================
60+
61+
Use the Amazon Elastic Container Service Observer (``ecs_observer``) extension in your custom configuration to discover metric targets in running tasks, filtered by service names, task definitions, and container labels.
62+
63+
Prerequisites
64+
----------------------------------------------------------------
6265

63-
Use extension Amazon Elastic Container Service Observer (``ecs_observer``) in your custom configuration to discover metric targets in running tasks, filtered by service names, task definitions, and container labels. ``ecs_observer`` is currently limited to Prometheus targets and requires the read-only permissions below. The Collector should be configured to run as an ECS Daemon. You can add the permissions to the task role by adding them to a customer-managed policy that is attached to the task role.
66+
The following applies:
67+
68+
* The Collector must run as an ECS Daemon. See :ref:`ecs-observer-launch`.
69+
* The ECS Observer is currently limited to Prometheus targets.
70+
* The ECS Observer requires the read-only permissions below. Add them to the customer-managed policy that is attached to the task role.
6471

6572
.. code-block:: yaml
6673
67-
ecs:List*
68-
ecs:Describe*
74+
ecs:List*
75+
ecs:Describe*
76+
77+
.. _ecs-observer-launch:
78+
79+
Launch the Collector as a Daemon from the ECS console
80+
----------------------------------------------------------------
81+
82+
To launch the Collector from the Amazon ECS console:
83+
84+
1. Go to your cluster in the console and select :guilabel:`Services`.
85+
86+
2. Select :guilabel:`Create` and define the following options:
87+
88+
* Launch Type: EC2
89+
90+
* Task Definition (Family): splunk-otel-collector
91+
92+
* Task Definition (Revision): 1 (or whatever the latest is in your case)
93+
94+
* Service Name: splunk-otel-collector
95+
96+
* Service type: DAEMON
97+
98+
3. Leave everything else as default and proceed to :guilabel:`Next step` until you're required to create the service.
99+
100+
4. Select :guilabel:`Create Service` to deploy the Collector onto each node in the ECS cluster. You should see infrastructure and docker metrics flowing soon.
101+
102+
Configuration example
103+
----------------------------------------------------------------
69104

70-
The following custom configuration examples show the ``ecs_observer`` configured to find Prometheus targets in the ``lorem-ipsum-cluster`` cluster and ``us-west-2`` region, where the task ARN pattern is ``^arn:aws:ecs:us-west-2:906383545488:task-definition/lorem-ipsum-task:[0-9]+$``.
105+
The following example configures the ``ecs_observer`` to find Prometheus targets in the ``lorem-ipsum-cluster`` cluster and ``us-west-2`` region, where the task ARN pattern is ``^arn:aws:ecs:us-west-2:906383545488:task-definition/lorem-ipsum-task:[0-9]+$``. The results are written to ``/etc/ecs_sd_targets.yaml``.
71106

72-
The results are written to ``/etc/ecs_sd_targets.yaml``. The ``prometheus`` receiver is configured to read targets from the results file. The values for ``access_token`` and ``realm`` are read from the ``SPLUNK_ACCESS_TOKEN`` and ``SPLUNK_REALM`` environment variables, which must be specified in your container definition.
107+
The ``prometheus`` receiver is configured to read targets from the results file. The values for ``access_token`` and ``realm`` are read from the ``SPLUNK_ACCESS_TOKEN`` and ``SPLUNK_REALM`` environment variables, which you must specify in your container definition.
73108

74109
.. code-block:: yaml
75110
@@ -132,25 +167,3 @@ Follow these steps:
132167
133168
.. caution:: The AWS Parameter Store limits the size of the config file to 4096 bytes.
134169

135-
Launch the Collector as a Daemon from the ECS console
136-
============================================================
137-
138-
To launch the Collector from the Amazon ECS console:
139-
140-
1. Go to your cluster in the console and select :guilabel:`Services`.
141-
142-
2. Select :guilabel:`Create` and define the following options:
143-
144-
* Launch Type: EC2
145-
146-
* Task Definition (Family): splunk-otel-collector
147-
148-
* Task Definition (Revision): 1 (or whatever the latest is in your case)
149-
150-
* Service Name: splunk-otel-collector
151-
152-
* Service type: DAEMON
153-
154-
3. Leave everything else as default and proceed to :guilabel:`Next step` until you're required to create the service.
155-
156-
4. Select :guilabel:`Create Service` to deploy the Collector onto each node in the ECS cluster. You should see infrastructure and docker metrics flowing soon.

0 commit comments

Comments
 (0)