Skip to content

Commit ec7f456

Browse files
sumoanemakimsauce
andauthored
Apply suggestions from code review
Co-authored-by: Kim (Sumo Logic) <[email protected]>
1 parent 781d3b1 commit ec7f456

File tree

4 files changed

+19
-22
lines changed

4 files changed

+19
-22
lines changed

docs/send-data/opentelemetry-collector/remote-management/source-templates/elasticsearch/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ If not already present, the following [Fields](/docs/manage/fields/) are created
2929

3030
- The Elasticsearch metrics [receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/elasticsearchreceiver) queries the Elasticsearch [node stats](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html), [cluster health](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html) and [index stats](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html) endpoints in order to scrape metrics from a running Elasticsearch cluster. This receiver supports Elasticsearch versions 7.9+
3131

32-
- Make sure to set the password of Elasticsearch user as an environment variable for OpenTelemetry agent, refer to the [Setting Environment variable with secret values for Source Template](../../st-with-secrets.md).
32+
- Make sure to set the Elasticsearch user's password as an environment variable for OpenTelemetry agent. Refer to the [Setting Environment Variables with Secret Values for Source Templates.](../../st-with-secrets.md).
3333

3434
### For logs collection
3535

docs/send-data/opentelemetry-collector/remote-management/source-templates/mysql/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ If not already present, the following [Fields](/docs/manage/fields/) are created
2929

3030
- The MySQL metrics [receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/mysqlreceiver) collects metrics by querying MySQL's global status and InnoDB tables. This app has been tested with following MySQL versions: 8.0
3131

32-
- Make sure to set the password of MySQL user as an environment variable for OpenTelemetry agent, refer to the [Setting Environment variable with secret values for Source Template](../../st-with-secrets.md).
32+
- Make sure to set the MySQL user's password as an environment variable for the OpenTelemetry agent. Refer to [Setting Environment Variables with Secret Values for Source Templates](../../st-with-secrets.md).
3333

3434
### For logs collection
3535

docs/send-data/opentelemetry-collector/remote-management/source-templates/postgresql/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ If not already present, the following [Fields](/docs/manage/fields/) are created
3232

3333
- The PostgreSQL metrics [receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/postgresqlreceiver) collects metrics by querying the PostgreSQL [statistics collector](https://www.postgresql.org/docs/13/monitoring-stats.html).
3434
- The monitoring user which is used in the source template must be granted permission to SELECT permission for [pg_stat_database](https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-DATABASE-VIEW).
35-
- Make sure to set the password of PostgreSQL user as an environment variable for OpenTelemetry agent, refer to the [Setting Environment variable with secret values for Source Template](../../st-with-secrets.md).
35+
- Make sure to set the PostgreSQL user's password as an environment variable for the OpenTelemetry agent. Refer to [Setting Environment Variables with Secret Values for Source Templates](../../st-with-secrets.md).
3636

3737
:::note
38-
For SumoLogic OpenTelemetry collector version below 0.116 metric collection will work only for PostgreSQL version 16 and below. With Sumo Logic OpenTelemetry collector version 0.116 and above metric collection will work for PostgreSQL version 17 as well.
38+
For Sumo Logic OpenTelemetry Collector versions below 0.116, metric collection supports only PostgreSQL version 16 and earlier. With Sumo Logic OpenTelemetry collector version 0.116 and above, metric collection also supports PostgreSQL version 17.
3939
:::
4040

4141
### For logs collection

docs/send-data/opentelemetry-collector/remote-management/st-with-secrets.md

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
id: st-with-secrets
3-
title: Setting Environment variable with secret values for Source Template
3+
title: Setting Environment Variables with Secret Values for Source Templates
44
sidebar_label: Setting env variables
5-
description: Steps for setting environment variable with secret value which can be used by source template at runtime in a remotely managed opentelemetry collector.
5+
description: Steps for setting environment variable with secret value which can be used by source template at runtime in a remotely managed OpenTelemetry collector.
66
---
77

88
import useBaseUrl from '@docusaurus/useBaseUrl';
@@ -13,28 +13,25 @@ import TabItem from '@theme/TabItem';
1313
<meta name="robots" content="noindex" />
1414
</head>
1515

16-
Certain source template use receiver which use secret/sensitive values like password to pull the data from service and send it to Sumo Logic using OpenTelemetry collector. For example [PostgreSQL receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/postgresqlreceiver) uses PostgreSQL username and password to bring in metrics from PostgreSQL instance.
16+
Certain source template use receiver which use secret/sensitive values like password to pull the data from service and send it to Sumo Logic using OpenTelemetry collector. For example, [PostgreSQL receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/postgresqlreceiver) uses PostgreSQL username and password to bring in metrics from PostgreSQL instance.
1717

18-
Below are the steps to make things work for such source templates :
18+
Below are the steps to make things work for such source templates:
1919

20-
1. Set env variable in OpenTelemetry Collector process. For example : SECRET_ENV_VAR=Welcome@123 . Where SECRET_ENV_VAR is the variable name and Welcome@123 is password.
21-
2. ST creation : While creating the source template you will need to provide the environment variable name instead of the actual password. In this case : SECRET_ENV_VAR and this will be part of the source template referring to the value of the environment variable like:
22-
`password: ${env:SECRET_ENV_VAR}`
20+
1. Set env variable in OpenTelemetry Collector process. For example: `SECRET_ENV_VAR=Welcome@123`, where `SECRET_ENV_VAR` is the variable name and `Welcome@123` is the password.
21+
2. ST creation: While creating the source template you will need to provide the environment variable name instead of the actual password. In this case: `SECRET_ENV_VAR` and this will be part of the source template referring to the value of the environment variable like: `password: ${env:SECRET_ENV_VAR}`.
2322
3. Once this source template gets pushed to the respective OpenTelemetry collector, the environment variable will get resolved at runtime and will be substituted with the actual password value to make the config work and pull the data to send it to Sumo Logic.
2423

25-
This way your secret data is not shared with Sumo Logic.
24+
This way, your secret data is not shared with Sumo Logic.
2625

27-
Below are the steps to set the environment variable in different operating systems :
26+
Below are the steps to set the environment variable in different operating systems:
2827

2928
## Linux
30-
1. Under "/etc/otelcol-sumo/env" you will have `token.env` file. You can set an environment variable in this. For example
31-
`ENV_KEY=password`
32-
:::note
33-
This file is accessible to user/group created while OpenTelemetry collector is installed which is `otelcol-sumo`. You can use this user or any other admin user to access/edit token.env file.
34-
:::
35-
2. Restart the agent to load the newly added env variables to the OTRM agent process. Using the command :
36-
`sudo systemctl restart otelcol-sumo`
37-
3. Create a ST referring to above env variable (ENV_KEY) for password which will get remotely pushed to the OTRM agent.
29+
1. Under "/etc/otelcol-sumo/env" you will have `token.env` file. You can set an environment variable in this. For exampl: `ENV_KEY=password`.
30+
:::note
31+
This file is accessible to the `otelcol-sumo` user/group, which is created during the OpenTelemetry Collector installation. You can use this user or any other admin user to access or edit the `token.env` file.
32+
:::
33+
2. Restart the agent to load the newly added env variables to the OTRM agent process using the command: `sudo systemctl restart otelcol-sumo`.
34+
3. Create a ST referring to above env variable (`ENV_KEY`) for password, which will get remotely pushed to the OTRM agent.
3835

3936
## Mac
4037
- You can set an environment variable in the OpenTelemetry agent by making changes to `/Library/LaunchDaemons/com.sumologic.otelcol-sumo.plist`.
@@ -75,7 +72,7 @@ This file is accessible to user/group created while OpenTelemetry collector is i
7572
</dict>
7673
</plist>
7774
```
78-
- You then need to restart the OpenTelemetry collector on your mac machine using the below command :
75+
- You then need to restart the OpenTelemetry collector on your Mac machine using the below command:
7976
`sudo launchctl unload /Library/LaunchDaemons/com.sumologic.otelcol-sumo.plist && sudo launchctl load -w /Library/LaunchDaemons/com.sumologic.otelcol-sumo.plist`
8077

8178
## Windows

0 commit comments

Comments
 (0)