diff --git a/cid-redirects.json b/cid-redirects.json
index 50931975cf..f9a4849028 100644
--- a/cid-redirects.json
+++ b/cid-redirects.json
@@ -1764,7 +1764,10 @@
"/cid/10321": "/docs/send-data/opentelemetry-collector/remote-management/source-templates/windows",
"/cid/10322": "/docs/send-data/opentelemetry-collector/remote-management/source-templates/docker",
"/cid/10323": "/docs/send-data/opentelemetry-collector/remote-management/source-templates/nginx",
- "/cid/10324": "/docs/send-data/opentelemetry-collector/remote-management/source-templates/kafka",
+ "/cid/10340": "/docs/send-data/opentelemetry-collector/remote-management/source-templates/kafka",
+ "/cid/10341": "/docs/send-data/opentelemetry-collector/remote-management/source-templates/postgresql",
+ "/cid/10342": "/docs/send-data/opentelemetry-collector/remote-management/source-templates/mysql",
+ "/cid/10343": "/docs/send-data/opentelemetry-collector/remote-management/source-templates/elasticsearch",
"/cid/10325": "/docs/send-data/opentelemetry-collector/remote-management/source-templates/apache/changelog",
"/cid/10326": "/docs/send-data/opentelemetry-collector/remote-management/source-templates/linux/changelog",
"/cid/10327": "/docs/send-data/opentelemetry-collector/remote-management/source-templates/localfile/changelog",
@@ -1776,6 +1779,10 @@
"/cid/10337": "/docs/send-data/opentelemetry-collector/remote-management/source-templates/docker/changelog",
"/cid/10338": "/docs/send-data/opentelemetry-collector/remote-management/source-templates/nginx/changelog",
"/cid/10339": "/docs/send-data/opentelemetry-collector/remote-management/source-templates/kafka/changelog",
+ "/cid/10344": "/docs/send-data/opentelemetry-collector/remote-management/source-templates/postgresql/changelog",
+ "/cid/10345": "/docs/send-data/opentelemetry-collector/remote-management/source-templates/mysql/changelog",
+ "/cid/10346": "/docs/send-data/opentelemetry-collector/remote-management/source-templates/elasticsearch/changelog",
+ "/cid/10347": "/docs/send-data/opentelemetry-collector/remote-management/source-templates/st-with-secrets",
"/cid/10822": "/docs/manage/manage-subscription/create-manage-orgs-flex",
"/cid/10817": "/docs/integrations/sumo-apps/cse",
"/cid/10818": "/docs/integrations/sumo-apps/cse",
diff --git a/docs/integrations/databases/opentelemetry/postgresql-opentelemetry.md b/docs/integrations/databases/opentelemetry/postgresql-opentelemetry.md
index 03f94f2d3d..df506bf35a 100644
--- a/docs/integrations/databases/opentelemetry/postgresql-opentelemetry.md
+++ b/docs/integrations/databases/opentelemetry/postgresql-opentelemetry.md
@@ -19,7 +19,7 @@ This app supports PostgreSQL version 9.6+.
We use the OpenTelemetry collector for PostgreSQL metric collection and for collecting PostgreSQL logs.
-The diagram below illustrates the components of the PostgreSQL collection for each database server. OpenTelemetry collector runs on the same host as PostgreSQL, and uses the [PostgreSQL receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/postgresqlreceiver) to obtain PostgreSQL metrics, and the [Sumo Logic OpenTelemetry Exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/sumologicexporter) to send the metrics to Sumo Logic. MySQL logs are sent to Sumo Logic through a [filelog receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/filelogreceiver).
+The diagram below illustrates the components of the PostgreSQL collection for each database server. OpenTelemetry collector runs on the same host as PostgreSQL, and uses the [PostgreSQL receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/postgresqlreceiver) to obtain PostgreSQL metrics, and the [Sumo Logic OpenTelemetry Exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/sumologicexporter) to send the metrics to Sumo Logic. PostgreSQL logs are sent to Sumo Logic through a [filelog receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/filelogreceiver).
@@ -107,7 +107,7 @@ import SetupColl from '../../../reuse/apps/opentelemetry/set-up-collector.md';
### Step 2: Configure integration
-In this step, you will configure the yaml file required for Mysql collection.
+In this step, you will configure the yaml file required for PostgreSQL collection.
Below is the required input:
diff --git a/docs/send-data/opentelemetry-collector/remote-management/source-templates/elasticsearch/changelog.md b/docs/send-data/opentelemetry-collector/remote-management/source-templates/elasticsearch/changelog.md
new file mode 100644
index 0000000000..7efb1c0fb1
--- /dev/null
+++ b/docs/send-data/opentelemetry-collector/remote-management/source-templates/elasticsearch/changelog.md
@@ -0,0 +1,11 @@
+---
+id: changelog
+title: Changelog
+sidebar_label: Changelog
+description: Changelog for Elasticsearch source template for OpenTelemetry.
+---
+
+## [1.0.0] - 2025-01-30
+
+### Added
+- Initial version of Elasticsearch source template.
\ No newline at end of file
diff --git a/docs/send-data/opentelemetry-collector/remote-management/source-templates/elasticsearch/index.md b/docs/send-data/opentelemetry-collector/remote-management/source-templates/elasticsearch/index.md
new file mode 100644
index 0000000000..32c3b2a42a
--- /dev/null
+++ b/docs/send-data/opentelemetry-collector/remote-management/source-templates/elasticsearch/index.md
@@ -0,0 +1,95 @@
+---
+slug: /send-data/opentelemetry-collector/remote-management/source-templates/elasticsearch
+title: Elasticsearch Source Template
+sidebar_label: Elasticsearch
+description: Learn about the Sumo Logic Elasticsearch source template for OpenTelemetry.
+---
+
+import useBaseUrl from '@docusaurus/useBaseUrl';
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+
+
+
+The Elasticsearch source template creates an OpenTelemetry configuration that can be pushed to a remotely managed OpenTelemetry collector (abbreviated as otelcol). By creating this source template and pushing the config to the appropriate OpenTelemetry agent, you can ensure collection of Elasticsearch logs and metrics to Sumo Logic.
+
+## Fields creation in Sumo Logic for Local File
+
+If not already present, the following [Fields](/docs/manage/fields/) are created as part of source template creation.
+
+- **`sumo.datasource`**. Fixed value of **elasticsearch**.
+- **`deployment.environment`**. This is a user-configured field set at the time of collector installation. It identifies the environment where the host resides, such as `dev`, `prod`, or `qa`.
+- **`db.cluster.name`**. User configured. Enter a uniquely identifiable name for your elasticsearch cluster to show in the Sumo Logic dashboards.
+- **`db.node.name`**. Includes the value of the hostname of the machine which is being monitored.
+
+## Prerequisites
+
+### For metrics collection
+
+- 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+
+
+- 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).
+
+### For logs collection
+
+Elasticsearch supports logging via local text log files. Elasticsearch logs have four levels of verbosity. To select a level, set `loglevel` to one of:
+
+* **debug**. A lot of information, useful for development/testing.
+* **verbose**. Includes information not often needed, but logs less than debug.
+* **notice** (default value). Moderately verbose, ideal for production environments.
+* **warning**. Only important/critical messages are logged.
+
+All logging settings are located in [Elasticsearch.conf](https://www.elastic.co/guide/en/elasticsearch/reference/current/logging.html). By default, Elasticsearch logs are stored in `/var/log/elasticsearch/ELK-.log`. The default directory for log files is listed in the Elasticsearch.conf file.
+
+Ensure that the otelcol has adequate permissions to access all log file paths. Execute the following command:
+
+```bash
+sudo setfacl -R -m d:u:otelcol-sumo:r-x,u:otelcol-sumo:r-x,g:otelcol-sumo:r-x
+```
+
+import LogsCollectionPrereqisites from '../../../../../reuse/apps/logs-collection-prereqisites.md';
+
+
+
+import OtelWindowsLogPrereq from '../../../../../reuse/apps/opentelemetry/log-collection-prerequisite-windows.md';
+
+
+
+## Configuring the Elasticsearch source template
+
+You can follow the below steps to set a remotely managed OpenTelemetry collector and push the source template to it.
+
+### Step 1: Set up remotely managed OpenTelemetry collector
+
+import CollectorInstallation from '../../../../../reuse/apps/opentelemetry/collector-installation.md';
+
+
+
+### Step 2: Configure the source template
+
+In this step, you will configure the yaml required for Elasticsearch collection. Below are the inputs required for configuration:
+
+- **Name**. Name of the source template.
+- **Description**. Description for the source template.
+- **Log Filepath**. Location where the Elasticsearch logs are logged. Please refer to your elasticsearch.conf file.
+- **Endpoint**. Enter the url of the server you need to monitor. (default: `localhost:9200`).
+- **Username**. Enter the Elasticsearch username.
+- **Password Environment Variable Name**. Enter the Elasticsearch password environment variable name.
+- **Fields/Metadata**. You can provide any customer fields to be tagged with the data collected. By default, Sumo Logic tags `_sourceCategory` with the value otel/elasticsearch user needs to provide the value for `db.cluster.name`.
+
+import OtelLogAdvanceOption from '../../../../../reuse/apps/opentelemetry/logs-advance-option-otel.md';
+
+
+
+**Processing Rules**. You can add **processing rules** for logs/metrics collected. To learn more, refer to [Processing Rules](../../processing-rules/index.md).
+
+### Step 3: Push the source template to the desired remotely managed collectors
+
+import DataConfiguration from '../../../../../reuse/apps/opentelemetry/data-configuration.md';
+
+
+
+:::info
+Refer to the [changelog](changelog.md) for information on periodic updates to this source template.
+:::
\ No newline at end of file
diff --git a/docs/send-data/opentelemetry-collector/remote-management/source-templates/mysql/changelog.md b/docs/send-data/opentelemetry-collector/remote-management/source-templates/mysql/changelog.md
new file mode 100644
index 0000000000..d5bcd55be7
--- /dev/null
+++ b/docs/send-data/opentelemetry-collector/remote-management/source-templates/mysql/changelog.md
@@ -0,0 +1,11 @@
+---
+id: changelog
+title: Changelog
+sidebar_label: Changelog
+description: Changelog for MySQL source template for OpenTelemetry.
+---
+
+## [1.0.0] - 2025-01-30
+
+### Added
+- Initial version of MySQL source template.
\ No newline at end of file
diff --git a/docs/send-data/opentelemetry-collector/remote-management/source-templates/mysql/index.md b/docs/send-data/opentelemetry-collector/remote-management/source-templates/mysql/index.md
new file mode 100644
index 0000000000..6452676a6a
--- /dev/null
+++ b/docs/send-data/opentelemetry-collector/remote-management/source-templates/mysql/index.md
@@ -0,0 +1,105 @@
+---
+slug: /send-data/opentelemetry-collector/remote-management/source-templates/mysql
+title: MySQL Source Template
+sidebar_label: MySQL
+description: Learn about the Sumo Logic MySQL source template for OpenTelemetry.
+---
+
+import useBaseUrl from '@docusaurus/useBaseUrl';
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+
+
+
+The MySQL source template creates an OpenTelemetry configuration that can be pushed to a remotely managed OpenTelemetry collector (abbreviated as otelcol). By creating this source template and pushing the config to the appropriate OpenTelemetry agent, you can ensure collection of MySQL logs and metrics to Sumo Logic.
+
+## Fields creation in Sumo Logic for Local File
+
+If not already present, the following [Fields](/docs/manage/fields/) are created as part of source template creation.
+
+- **`sumo.datasource`**. Fixed value of **mysql**.
+- **`deployment.environment`**. This is a user-configured field set at the time of collector installation. It identifies the environment where the host resides, such as `dev`, `prod`, or `qa`.
+- **`db.cluster.name`**. User configured. Enter a uniquely identifiable name for your mysql cluster to show in the Sumo Logic dashboards.
+- **`db.node.name`**. Includes the value of the hostname of the machine which is being monitored.
+
+## Prerequisites
+
+### For metrics collection
+
+- 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
+
+- 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).
+
+### For logs collection
+
+MySQL logs are stored in log files. Slow query logs must be explicitly enabled to be able to be written to a log file. To configure the MySQL log file(s), locate your local `my.cnf` configuration file in the database directory.
+ 1. Open `my.cnf` in a text editor.
+ 2. Set the following parameters in the `[mysqld]` section:
+ ```sql
+ [mysqld]
+ log_error = /var/log/mysql/error.log
+ slow_query_log=1
+ slow_query_log_file = /var/log/mysql/mysql-slow.log
+ long_query_time=2
+ ```
+ * [Error Logs](https://dev.mysql.com/doc/refman/5.7/en/slow-query-log.html). By default, error logs are enabled and are logged at file specified by the `log_error` key.
+ * [Slow Query Logs](https://dev.mysql.com/doc/refman/5.7/en/slow-query-log.html). `slow_query_log=1` enables logging of slow queries to the file specified by `slow_query_log_file`. Setting `long_query_time=2` will cause queries that take more than two seconds to execute to be logged. The default value of `long_query_time` is 10 seconds.
+ * [General Query Logs](https://dev.mysql.com/doc/refman/5.7/en/query-log.html). We do not recommend enabling `general_log` for performance reasons. These logs are not used by the Sumo Logic MySQL app.
+ 3. Save the `my.cnf` file.
+ 4. Restart the MySQL server:
+ ```bash
+ sudo mysql.server restart
+ ```
+Ensure that the otelcol has adequate permissions to access all log file paths. Execute the following command:
+
+```bash
+sudo setfacl -R -m d:u:otelcol-sumo:r-x,u:otelcol-sumo:r-x,g:otelcol-sumo:r-x
+```
+
+import LogsCollectionPrereqisites from '../../../../../reuse/apps/logs-collection-prereqisites.md';
+
+
+
+import OtelWindowsLogPrereq from '../../../../../reuse/apps/opentelemetry/log-collection-prerequisite-windows.md';
+
+
+
+## Configuring the MySQL source template
+
+You can follow the below steps to set a remotely managed OpenTelemetry collector and push the source template to it.
+
+### Step 1: Set up remotely managed OpenTelemetry collector
+
+import CollectorInstallation from '../../../../../reuse/apps/opentelemetry/collector-installation.md';
+
+
+
+### Step 2: Configure the source template
+
+In this step, you will configure the yaml required for MySQL collection. Below are the inputs required for configuration:
+
+- **Name**. Name of the source template.
+- **Description**. Description for the source template.
+- **Error log path**. Location where the SQL Errors are logged. Please refer to your my.cnf file.
+- **Slow Transaction log file path (optional)**. Location where the Slow SQL transactions are logged. Please refer to your my.cnf file.
+- **Endpoint**. The URL of the MySQL endpoint (default: `localhost:3306`).
+- **Username**. Enter the MySQL username.
+- **Password Environment Variable Name**. Enter the MySQL password environment variable name.
+- **Fields/Metadata**. You can provide any customer fields to be tagged with the data collected. By default, Sumo Logic tags `_sourceCategory` with the value otel/mysql user needs to provide the value for `db.cluster.name`.
+
+import OtelLogAdvanceOption from '../../../../../reuse/apps/opentelemetry/logs-advance-option-otel.md';
+
+
+
+**Processing Rules**. You can add **processing rules** for logs/metrics collected. To learn more, refer to [Processing Rules](../../processing-rules/index.md).
+
+### Step 3: Push the source template to the desired remotely managed collectors
+
+import DataConfiguration from '../../../../../reuse/apps/opentelemetry/data-configuration.md';
+
+
+
+:::info
+Refer to the [changelog](changelog.md) for information on periodic updates to this source template.
+:::
\ No newline at end of file
diff --git a/docs/send-data/opentelemetry-collector/remote-management/source-templates/postgresql/changelog.md b/docs/send-data/opentelemetry-collector/remote-management/source-templates/postgresql/changelog.md
new file mode 100644
index 0000000000..beb8f1d0c4
--- /dev/null
+++ b/docs/send-data/opentelemetry-collector/remote-management/source-templates/postgresql/changelog.md
@@ -0,0 +1,9 @@
+---
+id: changelog
+title: Changelog
+sidebar_label: Changelog
+description: Changelog for PostgreSQL source template for OpenTelemetry.
+---
+## [1.0.0] - 2025-01-30
+### Added
+- Initial version of PostgreSQL source template.
\ No newline at end of file
diff --git a/docs/send-data/opentelemetry-collector/remote-management/source-templates/postgresql/index.md b/docs/send-data/opentelemetry-collector/remote-management/source-templates/postgresql/index.md
new file mode 100644
index 0000000000..4df407decc
--- /dev/null
+++ b/docs/send-data/opentelemetry-collector/remote-management/source-templates/postgresql/index.md
@@ -0,0 +1,116 @@
+---
+slug: /send-data/opentelemetry-collector/remote-management/source-templates/postgresql
+title: PostgreSQL Source Template
+sidebar_label: PostgreSQL
+description: Learn about the Sumo Logic PostgreSQL source template for OpenTelemetry.
+---
+
+import useBaseUrl from '@docusaurus/useBaseUrl';
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+
+
+The PostgreSQL source template creates an OpenTelemetry configuration that can be pushed to a remotely managed OpenTelemetry collector (abbreviated as otelcol). By creating this source template and pushing the config to the appropriate OpenTelemetry agent, you can ensure collection of PostgreSQL logs and metrics to Sumo Logic.
+
+## Fields creation in Sumo Logic for PostgreSQL
+
+If not already present, the following [Fields](/docs/manage/fields/) are created as part of source template creation.
+
+- **`sumo.datasource`**. Fixed value of **postgresql**.
+- **`deployment.environment`**. This is a user-configured field set at the time of collector installation. It identifies the environment where the host resides, such as `dev`, `prod`, or `qa`.
+- **`db.cluster.name`**. User configured. Enter a uniquely identifiable name for your PostgreSQL cluster to show in the Sumo Logic dashboards.
+- **`db.node.name`**. Includes the value of the hostname of the machine which is being monitored.
+
+## Prerequisites
+
+### For metrics collection
+
+- 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).
+- 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).
+- 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).
+
+:::note
+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.
+:::
+
+### For logs collection
+
+Configure logging in PostgreSQL:
+
+1. Locate your local PostgreSQL postgresql.conf configuration file in the database data_directory. For more information, see the [PostgreSQL File Locations documentation](https://www.postgresql.org/docs/9.1/static/runtime-config-file-locations.html). By default it's located in `/var/lib/pgsql//data/postgresql.conf`. You can run SHOW config_file command inside your server's psql shell to get the location. After determining the location of conf file, modify the PostgreSQL postgresql.conf configuration file logging parameters
+2. Connect to the database server (using SSH) in a terminal window.
+3. Open `postgresql.conf` configuration file.
+4. Under the ERROR REPORTING AND LOGGING section of the file, use the following config parameters. For more information on the following parameters, [click here](https://www.postgresql.org/docs/12/static/runtime-config-logging.html).
+ ```sql
+ log_destination = 'stderr'
+ logging_collector = on
+ log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
+ log_truncate_on_rotation = off
+ log_rotation_age = 1d
+ log_min_duration_statement = 250
+ log_connections = on
+ log_duration = on
+ log_hostname = on
+ log_timezone = 'UTC'
+ log_min_messages = 'WARNING'
+ log_line_prefix = '%m [%p] %q%u@%d '
+ ```
+5. Save the `postgresql.conf` file and restart the postgresql server:
+ ```sh
+ sudo service postgresql restart
+ ```
+Ensure that the otelcol has adequate permissions to access all log file paths. Execute the following command:
+
+```bash
+sudo setfacl -R -m d:u:otelcol-sumo:r-x,u:otelcol-sumo:r-x,g:otelcol-sumo:r-x
+```
+
+import LogsCollectionPrereqisites from '../../../../../reuse/apps/logs-collection-prereqisites.md';
+
+
+
+import OtelWindowsLogPrereq from '../../../../../reuse/apps/opentelemetry/log-collection-prerequisite-windows.md';
+
+
+
+## Configuring the PostgreSQL source template
+
+You can follow the below steps to set a remotely managed OpenTelemetry collector and push the source template to it.
+
+### Step 1: Set up remotely managed OpenTelemetry collector
+
+import CollectorInstallation from '../../../../../reuse/apps/opentelemetry/collector-installation.md';
+
+
+
+### Step 2: Configure the source template
+
+In this step, you will configure the yaml required for PostgreSQL collection. Below are the inputs required for configuration:
+
+- **Name**. Name of the source template.
+- **Description**. Description for the source template.
+- **Error Log Path**. Enter the path of the error log file for your PostgreSQL instance.
+- **Endpoint**. The endpoint of the PostgreSQL server. This value should be host:port. Default endpoint is `localhost:5432`.
+ :::note
+ There should not be any http prefixed to this value. For example, `http://localhost:port`.
+ :::
+- **UserName**. Enter the PostgreSQL username.
+- **Password Environment Variable Name**. Enter the PostgreSQL password environment variable name.
+- **Fields/Metadata**. You can provide any customer fields to be tagged with the data collected. By default, Sumo Logic tags `_sourceCategory` with the value otel/postgresql user needs to provide the value for `db.cluster.name`.
+
+import OtelLogAdvanceOption from '../../../../../reuse/apps/opentelemetry/logs-advance-option-otel.md';
+
+
+
+**Processing Rules**. You can add **processing rules** for logs/metrics collected. To learn more, refer to [Processing Rules](../../processing-rules/index.md).
+
+### Step 3: Push the source template to the desired remotely managed collectors
+
+import DataConfiguration from '../../../../../reuse/apps/opentelemetry/data-configuration.md';
+
+
+
+:::info
+Refer to the [changelog](changelog.md) for information on periodic updates to this source template.
+:::
\ No newline at end of file
diff --git a/docs/send-data/opentelemetry-collector/remote-management/source-templates/st-with-secrets.md b/docs/send-data/opentelemetry-collector/remote-management/source-templates/st-with-secrets.md
new file mode 100644
index 0000000000..22ff6e7127
--- /dev/null
+++ b/docs/send-data/opentelemetry-collector/remote-management/source-templates/st-with-secrets.md
@@ -0,0 +1,93 @@
+---
+id: st-with-secrets
+title: Setting Environment Variables with Secret Values for Source Templates
+sidebar_label: Setting Environment Variables
+description: Steps for setting environment variable with secret value which can be used by source template at runtime in a remotely managed OpenTelemetry collector.
+---
+
+import useBaseUrl from '@docusaurus/useBaseUrl';
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+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.
+
+Below are the steps to make things work for such source templates:
+
+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.
+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}`.
+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.
+
+:::note
+Environment variable should start with small or capital character or an underscore(_) followed by any letters(small or capital), numbers and underscore.
+:::
+
+This way, your secret data is not shared with Sumo Logic.
+
+Below are the steps to set the environment variable in different operating systems:
+
+## Linux
+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`.
+ :::note
+ 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.
+ :::
+2. Restart the agent to load the newly added env variables to the OTRM agent process using the command: `sudo systemctl restart otelcol-sumo`.
+3. Create a ST referring to above env variable (`ENV_KEY`) for password, which will get remotely pushed to the OTRM agent.
+
+## Mac
+- You can set an environment variable in the OpenTelemetry agent by making changes to `/Library/LaunchDaemons/com.sumologic.otelcol-sumo.plist`.
+- This file already has the `SUMOLOGIC_INSTALLATION_TOKEN` set. Parallel to it we can set any environment variable. For example below, have set `MAC_ENV_VAR` in agent:
+
+```
+
+
+
+
+ EnvironmentVariables
+
+ SUMOLOGIC_INSTALLATION_TOKEN
+ U1VNT3c2c2tv************************
+ MAC_ENV_VAR
+ etc
+
+ GroupName
+ _otelcol-sumo
+ KeepAlive
+
+ Label
+ otelcol-sumo
+ ProgramArguments
+
+ /usr/local/bin/otelcol-sumo
+ --remote-config
+ opamp:/etc/otelcol-sumo/sumologic.yaml
+
+ RunAtLoad
+
+ StandardErrorPath
+ /var/log/otelcol-sumo/otelcol-sumo.log
+ StandardOutPath
+ /var/log/otelcol-sumo/otelcol-sumo.log
+ UserName
+ _otelcol-sumo
+
+
+```
+- You then need to restart the OpenTelemetry collector on your Mac machine using the below command:
+`sudo launchctl unload /Library/LaunchDaemons/com.sumologic.otelcol-sumo.plist && sudo launchctl load -w /Library/LaunchDaemons/com.sumologic.otelcol-sumo.plist`
+
+## Windows
+
+1. On your Windows machine, open the Registry Editor.
+2. Go to `Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\OtelcolSumo`.
+3. Right-click on the right pane and select **New** > **Multi-String Value**. You must name this as `environment`.
+4. Right click on newly created entity `environment` in the step above and select `modify`.
+5. You can set the environment variable as per your needs. For example, in the below screenshot, we have set `TEST_VAR` env variable with value `sumoemp`:
+6. Click on **OK**.
+7. (Optional step) By default, any variables stored in the registry are visible to all users. To control visibility and permissions, follow the steps below to manage the ACLs for both the service registry and the environment variables you set previously.
+ 1. Right-click on OtelcolSumo service in the left pane of the registry editor and click on permissions.
+ 1. Go to the advanced section by pressing the Advanced button.
+ 1. Since the permissions are inherited by services from its parent by default, you will need to disable inheritance in the Advanced Security Settings popup.
+ 1. When you disable inheritance, you’ll be given two options: you can either convert the existing inherited permissions, or remove them entirely and build a new permission list from scratch. Choose whichever option best fits your requirements.
+ 1. You can then edit Users from this list to ensure appropriate access of this registry and environment variable set under it.
+8. Restart the windows agent using the below command:
+`Restart-Service -Name OtelcolSumo`
diff --git a/sidebars.ts b/sidebars.ts
index bb46d58618..e1b1d6e2b6 100644
--- a/sidebars.ts
+++ b/sidebars.ts
@@ -153,6 +153,16 @@ module.exports = {
'send-data/opentelemetry-collector/remote-management/source-templates/docker/changelog',
]
},
+ {
+ type: 'category',
+ label: 'Elasticsearch',
+ collapsible: true,
+ collapsed: true,
+ link: {type: 'doc', id: 'send-data/opentelemetry-collector/remote-management/source-templates/elasticsearch/index'},
+ items:[
+ 'send-data/opentelemetry-collector/remote-management/source-templates/elasticsearch/changelog',
+ ]
+ },
{
type: 'category',
label: 'Kafka',
@@ -193,6 +203,16 @@ module.exports = {
'send-data/opentelemetry-collector/remote-management/source-templates/mac/changelog',
]
},
+ {
+ type: 'category',
+ label: 'MySQL',
+ collapsible: true,
+ collapsed: true,
+ link: {type: 'doc', id: 'send-data/opentelemetry-collector/remote-management/source-templates/mysql/index'},
+ items:[
+ 'send-data/opentelemetry-collector/remote-management/source-templates/mysql/changelog',
+ ]
+ },
{
type: 'category',
label: 'Nginx',
@@ -203,6 +223,16 @@ module.exports = {
'send-data/opentelemetry-collector/remote-management/source-templates/nginx/changelog',
]
},
+ {
+ type: 'category',
+ label: 'PostgreSQL',
+ collapsible: true,
+ collapsed: true,
+ link: {type: 'doc', id: 'send-data/opentelemetry-collector/remote-management/source-templates/postgresql/index'},
+ items:[
+ 'send-data/opentelemetry-collector/remote-management/source-templates/postgresql/changelog',
+ ]
+ },
{
type: 'category',
label: 'RabbitMQ',
@@ -243,6 +273,7 @@ module.exports = {
'send-data/opentelemetry-collector/remote-management/source-templates/windows/changelog',
]
},
+ 'send-data/opentelemetry-collector/remote-management/source-templates/st-with-secrets',
],
},
{
diff --git a/static/img/send-data/opentelemetry-collector/ACL_windows_registry.png b/static/img/send-data/opentelemetry-collector/ACL_windows_registry.png
new file mode 100644
index 0000000000..1aa4e4f8d4
Binary files /dev/null and b/static/img/send-data/opentelemetry-collector/ACL_windows_registry.png differ
diff --git a/static/img/send-data/opentelemetry-collector/set_env_varibale_windows.png b/static/img/send-data/opentelemetry-collector/set_env_varibale_windows.png
new file mode 100644
index 0000000000..1c033f49d4
Binary files /dev/null and b/static/img/send-data/opentelemetry-collector/set_env_varibale_windows.png differ