Syslog Source Template
The Syslog 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, the agent will start listening on the configured port for syslogs and send them to Sumo Logic.
Fields created by the source templateβ
When you create a source template, the following fields are automatically added (if they donβt already exist):
sumo.datasource
. Fixed value of syslog.deployment.environment
. This is a user-configured field set at the time of collector installation. It identifies the environment where the host resides, such asdev
,prod
, orqa
.host.group
. This is a collector level field and is user configured (at the time of collector installation). This identifies the group of hosts.host.name
. This is tagged through the resourcedetection processor. It holds the value of the host name where the OTel collector is installed.
Prerequisiteβ
Ensure that the syslogs conform to the RFC 5424 protocol. Since we use the OpenTelemetry syslog receiver with this protocol, this will ensure proper parsing of the syslog metadata when ingested into Sumo Logic.
Configuring the Syslog source templateβ
Follow these steps to set up and deploy the source template to a remotely managed OpenTelemetry collector.
Step 1: Set up remotely managed OpenTelemetry collectorβ
In this step, we'll install the collector and add a uniquely identifiable tag to these collectors.
- Classic UI. In the main Sumo Logic menu, select Manage Data > Collection > OpenTelemetry Collection.
New UI. In the Sumo Logic top menu select Configuration, and then under Data Collection select OpenTelemetry Collection. You can also click the Go To... menu at the top of the screen and select OpenTelemetry Collection. - On the OpenTelemetry Collection page, click + Add Collector.
- In the Set up Collector step:
- Choose your platform (for example, Linux).
- Enter your Installation Token.
- Under Tag data on Collector level, add a new tag to identify these collectors as having Apache running on them (for example,
application = Apache
). - Leave the Collector Settings at their default values to configure collectors as remotely managed.
- Under Generate and run the command to install the collector, copy and run the installation command in your system terminal where the collector needs to be installed.
- After installation is complete, click Next to proceed.
- Select a source template (for example, Apache source template) to start collecting logs from all linked collectors, then proceed with the data configuration.
To revisit this screen later: From the Classic UI, select Manage Data > Collection > Source Template. From the New UI, select Configuration > Source Template.
Step 2: Configure the source templateβ
In this step, you will configure the yaml required for Syslog Collection. Below are the inputs required for configuration:
- Name. Name of the source template.
- Description. Description for the source template.
- Fields/Metadata. You can provide any customer fields to be tagged with the data collected. By default, sumo tags
_sourceCategory
with the value otel/syslog. - Protocol. Select the protocol that your syslog-enabled devices are currently using to send syslog data, UDP or TCP.
- Port. Enter the port number for agent to listen to. Make sure the devices are sending to the same port.
Processing Rules. You can add processing rules for logs collected. To learn more, refer to Processing Rules.
Step 3: Push the source template to the desired remotely managed collectorsβ
A new source template will always be created with the latest version of the source template.
Follow the below steps to create a data collection configuration to gather the required logs and link them to all the collectors with the help of collector tags.
- Complete the source template form with the name and file path for your logs (for example, error logs or access logs), then click Next.
- Under Link Collectors, you will have the option to link the collectors using the collector name or by adding tags to find the group of collectors (for example,
application = Apache
). - Preview and confirm the collectors that will be linked (fetched automatically) to the newly created source template.
- Click Next to complete the source template creation. In the background, the system will apply the configuration to all the linked collectors and will start collecting the respective telemetry data from the remote host (in the example, it would start collecting Apache error logs).
- Click the Log Search or Metrics Search icons to search for and analyze your data collected for this source template.
Refer to the changelog for information on periodic updates to this source template.