You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 2, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: gdi/opentelemetry/deployments/deployments-ecs-ec2.rst
+71-54Lines changed: 71 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,32 +7,28 @@ Deploy the Collector with Amazon ECS EC2
7
7
.. meta::
8
8
:description: Deploy the Splunk Observability Cloud OpenTelemetry Collector as a Sidecar in an Amazon ECS EC2 cluster.
9
9
10
-
Use the guided setup to deploy the Collector as a Sidecar in an Amazon ECS EC2 cluster. The guided setup provides a JSON task definition for the Collector.
11
-
12
-
Choose one of the following Collector configuration options:
13
-
14
-
- **Default:** The file /etc/otel/collector/ecs_ec2_config.yaml in the Collector image is used for the Collector configuration.
15
-
- **File:** Specify the file to use for the Collector configuration. See :ref:`ecs-ec2-custom-config`.
16
-
- **AWS Parameter Store:** Specify the AWS Parameter Store key or ARN to use for the Collector configuration. See :ref:`ecs-ec2-custom-config`.
10
+
Use the guided setup to deploy the Collector as a sidecar in an Amazon ECS EC2 cluster.
17
11
18
12
To access the guided setup for AWS integration, perform the following steps:
19
13
20
14
#. Log in to Splunk Observability Cloud.
21
15
#. On the navigation menu, select :guilabel:`Data Management`.
22
16
#. Go to the :guilabel:`Available integrations` tab, or select :guilabel:`Add Integration` in the :guilabel:`Deployed integrations` tab.
23
17
#. Select the tile for :guilabel:`Amazon ECS EC2`.
24
-
#. Follow the steps provided in the guided setup.
18
+
#. Follow the steps provided in the guided setup, which provides a JSON task definition for the Collector.
25
19
26
-
Getting started
27
-
=================================
20
+
Choose one of the following Collector configuration options:
28
21
29
-
The following sections describe how to create a task definition and launch the Collector. A task definition is required to run Docker containers in Amazon ECS. After creating the task definition, you need to launch the Collector.
22
+
- **Default:** The file /etc/otel/collector/ecs_ec2_config.yaml in the Collector image is used for the Collector configuration.
23
+
- **File:** Specify the file to use for the Collector configuration. See :ref:`ecs-ec2-custom-config`.
24
+
- **AWS Parameter Store:** Specify the AWS Parameter Store key or ARN to use for the Collector configuration. See :ref:`ecs-ec2-aws-store`.
30
25
31
-
Add the Collector as a Sidecar
32
-
---------------------------------
33
-
.. note:: To use this option you need to be familiar with Amazon ECS EC2 launch type. See :new-page:`Getting started with the classic console using Amazon EC2 <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/getting-started-ecs-ec2.html>` for further reading.
Open the ECS task definition to which the Collector Sidecar is going to be added:
29
+
.. note:: To use this option you need to be familiar with Amazon ECS EC2 launch. See :new-page:`Getting started with the classic console using Amazon EC2 <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/getting-started-ecs-ec2.html>` for further reading.
30
+
31
+
Open the ECS task definition in which you'll add the Collector sidecar:
36
32
37
33
1. Locate the task definition for the Collector from the :new-page:`repository <https://github.com/signalfx/splunk-otel-collector/blob/main/deployments/ecs/ec2/splunk-otel-collector.json>`.
38
34
2. Merge the definitions of the Collector with the existing ECS task definition.
To use a custom configuration file, replace the value of the ``SPLUNK_CONFIG`` environment variable with the file path of the custom configuration file in the Collector task definition.
57
53
58
54
Alternatively, you can specify the custom configuration YAML directly using the ``SPLUNK_CONFIG_YAML`` environment variable, as described in :ref:`ecs-observer-config`.
59
55
60
56
.. _ecs-observer-config:
61
57
62
-
Configure ``ecs_observer``
63
-
--------------------------------
58
+
Configure the Amazon Elastic Container Service Observer extension
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.
Use extension Amazon Elastic Container Service Observer (``ecs_observer``) in your custom configuration to discover metrics 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.
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.
66
71
67
72
.. code-block:: yaml
68
73
69
-
ecs:List*
70
-
ecs:Describe*
74
+
ecs:List*
75
+
ecs:Describe*
71
76
72
-
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]+$``.
77
+
.. _ecs-observer-launch:
78
+
79
+
Launch the Collector as a daemon from the ECS console
To launch the Collector from the Amazon ECS console:
73
83
74
-
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.
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.
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``.
106
+
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.
75
108
76
109
.. code-block:: yaml
77
110
@@ -111,42 +144,26 @@ The results are written to ``/etc/ecs_sd_targets.yaml``. The ``prometheus`` rece
111
144
processors: [batch, resourcedetection]
112
145
exporters: [signalfx]
113
146
114
-
.. _aws-parameter-store:
147
+
.. _ecs-ec2-aws-store:
115
148
116
-
Launch the Collector as a Daemon
117
-
--------------------------------------------
149
+
Deploy the Collector using the AWS Parameter Store
#. Task Definition (Revision): 1 (or whatever the latest is in your case)
128
-
#. Service Name: splunk-otel-collector
129
-
#. Service type: DAEMON
130
-
#. Leave everything else at default.
131
-
#. Select :guilabel:`Next step`.
132
-
#. Leave everything on this next page at their defaults and select :guilabel:`Next step`.
133
-
#. Leave everything on this next page at their defaults and select :guilabel:`Next step`.
134
-
#. Select :guilabel:`Create Service` to deploy the Collector onto each node in the ECS cluster. You should see infrastructure and docker metrics flowing soon.
152
+
To use the AWS Parameter Store, specify the config YAML directly in the ``SPLUNK_CONFIG_YAML`` environment variable instead of using ``SPLUNK_CONFIG``.
135
153
136
-
Use the AWS Parameter Store
137
-
----------------------------
154
+
.. note:: To have read access to the Parameter Store add the policy ``AmazonSSMReadOnlyAccess`` to the task role. See :new-page:`Systems manager parameter store <https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html>` for more information.
138
155
139
-
Use the ``SPLUNK_CONFIG_YAML`` environment variable to specify the configuration YAML directly. Use ``SPLUNK_CONFIG_YAML`` in place of ``SPLUNK_CONFIG``.
156
+
Follow these steps:
140
157
141
-
For example, first, store the custom configuration for the :ref:`ecs-observer-config` in a parameter called ``splunk-otel-collector-config`` in the AWS Systems Manager Parameter Store.Next, assign the parameter to ``SPLUNK_CONFIG_YAML`` using the ``valueFrom`` option, as shown in the following example:
158
+
#. Store the custom configuration for the :ref:`ecs-observer-config` in the parameter ``splunk-otel-collector-config`` in the AWS Systems Manager Parameter Store.
159
+
#. Next, assign the ``splunk-otel-collector-config`` parameter to ``SPLUNK_CONFIG_YAML`` using the ``valueFrom`` option, as shown in the following example:
.. caution:: The AWS Parameter Store limits the size of the config file to 4096 bytes.
149
169
150
-
.. note::
151
-
152
-
You should add policy ``AmazonSSMReadOnlyAccess`` to the task role for the task to have read access to the Parameter Store. See :new-page:`Systems manager parameter store <https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html>` for more information.
0 commit comments