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
The source tag that's used for shipping logs to Datadog is based on a naming convention, where the name of the log group is mapped to a specific source tag.
My specific scenario is for RDS logs. The naming convention requires the engine (mysql, mariadb, etc.) to be included in the name of the DB instance for the source tag to be properly set to the DB engine.
If the engine is not part of the DB instance name, it won't appear in the Log Group name and the source will be set to rds, which is not parsed properly (or at all) by Datadog when the logs are ingested.
As a user, I'd like to be able to specify a mapping of source strings to CloudWatch Log Group names, matching the CloudWatch Log Group name.
For example, if the CloudWatch Log Group name is /aws/rds/instance/my-db-instance/error I want to be able to set the source tag to mysql so that the logs are parsed automatically by Datadog.
Implementation
One possible implementation would be to use an environment variable. For example, setting the following environment variable would configure the forwarder to work as described above:
The code would look for environment variables starting with CW_LOGS_SOURCE_MAPPING_<SOURCE> for configuration. Where <SOURCE> is the desired value of the source tag (converted to lowercase).
The value of the environment variable is the string to match in the name of the CloudWatch Log Group.
This feature would allow the customization of the source tag (which is really important for proper parsing in Datadog) based on any CloudWatch Log Group name.
The text was updated successfully, but these errors were encountered:
The
source
tag that's used for shipping logs to Datadog is based on a naming convention, where the name of the log group is mapped to a specificsource
tag.My specific scenario is for RDS logs. The naming convention requires the engine (mysql, mariadb, etc.) to be included in the name of the DB instance for the
source
tag to be properly set to the DB engine.If the engine is not part of the DB instance name, it won't appear in the Log Group name and the
source
will be set tords
, which is not parsed properly (or at all) by Datadog when the logs are ingested.As a user, I'd like to be able to specify a mapping of
source
strings to CloudWatch Log Group names, matching the CloudWatch Log Group name.For example, if the CloudWatch Log Group name is
/aws/rds/instance/my-db-instance/error
I want to be able to set thesource
tag tomysql
so that the logs are parsed automatically by Datadog.Implementation
One possible implementation would be to use an environment variable. For example, setting the following environment variable would configure the forwarder to work as described above:
CW_LOGS_SOURCE_MAPPING_MYSQL=/aws/rds/instance/my-db-instance
The code would look for environment variables starting with
CW_LOGS_SOURCE_MAPPING_<SOURCE>
for configuration. Where<SOURCE>
is the desired value of thesource
tag (converted to lowercase).The value of the environment variable is the string to match in the name of the CloudWatch Log Group.
This feature would allow the customization of the
source
tag (which is really important for proper parsing in Datadog) based on any CloudWatch Log Group name.The text was updated successfully, but these errors were encountered: