Runtime Configuration - Splunk Connect for Syslog (2024)

Prerequisites

  • Linux host with Docker (CE 19.x or greater) or Podman enabled, depending on runtime choice (below).
  • A network load balancer (NLB) configured for round-robin. Note: Special consideration may be required when more advanced products are used.The optimal configuration of the load balancer will round-robin each http POST request (not each connection).
  • The host linux OS receive buffer size should be tuned to match the sc4s default to avoid dropping events (packets) at the network level.The default receive buffer for sc4s is set to 16 MB for UDP traffic, which should be OK for most environments. To set the host OS kernel tomatch this, edit /etc/sysctl.conf using the following whole-byte values corresponding to 16 MB:
net.core.rmem_default = 17039360net.core.rmem_max = 17039360
and apply to the kernel:
sysctl -p
* Ensure the kernel is not dropping packets by periodically monitoring the buffer with the commandnetstat -su | grep "receive errors".* NOTE: Failure to account for high-volume traffic (especially UDP) by tuning the kernel will result in message loss, which can be veryunpredictable and difficult to detect. See this helpful discussion in the syslog-ngProfessional Editiondocumentation regarding tuning syslog-ng in particular (via the SC4S_SOURCE_*_SO_RCVBUFFenvironment variable in sc4s) as well as overall host kernel tuning. The default values for receive kernel buffers in most distros is 2 MB,which has proven inadequate for many.

IPv4 Forwarding

In many distributions (e.g. CentOS provisioned in AWS), IPV4 forwarding is not enabled by default.This needs to be enabled for container networking to function properly. The following is an exampleto check and set this up; as usual this needs to be vetted with your enterprise security policy:

To check:sudo sysctl net.ipv4.ip_forwardTo set:sudo sysctl net.ipv4.ip_forward=1

To ensure the change survives a reboot:

  • sysctl settings are defined through files in /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
  • To override only specific settings, you can either add a file with a lexically later name in /etc/sysctl.d/ and put following setting there:
    net.ipv4.ip_forward=1
  • or find this specific setting in one of existing configuration files (mentioned above) and set value to 1.
net.ipv4.ip_forward=1

Select a Container Runtime and SC4S Configuration

Container Runtime and OrchestrationOperating Systems
MicroK8sUbuntu with Microk8s
RHEL 8.x or CentOS 8.x (best option), Debian or Ubuntu 18.04LTS
Docker CE 19 (and greater) + systemdRHEL or CentOS >7.7 (best option), Debian or Ubuntu 18.04LTS
Docker Desktop + ComposeMacOS
Docker Desktop + ComposeRHEL or CentOS 8.1 & 8.2 (best option)
Bring your own EnvironmentRHEL or CentOS 8.1 & 8.2 (best option)
Offline Container InstallationRHEL 8.x or CentOS 8.x (best option), Debian or Ubuntu 18.04LTS
Ansible+Docker SwarmRHEL 8.x or CentOS 8.x (best option), Debian or Ubuntu 18.04LTS
Ansible+PodmanRHEL 7.x/8.x or CentOS 7.x/8.x (best option), Debian or Ubuntu 20.10LTS(and higher)
Ansible+DockerRHEL 7.x/8.x or CentOS 7.x/8.x (best option), Debian or Ubuntu 18.04LTS(and higher)

Docker and Podman basic configurations

  • To run properly sc4s you need to create directories:/opt/sc4s/local /opt/sc4s/archive /opt/sc4s/tls
  • /opt/sc4s/local will be used as a mount point for local overrides and configurations.The empty local directory created above will populate with defaults and examples at the first invocationof SC4S for local configurations and context overrides. Do not change the directory structure ofthe files that are laid down; change (or add) only individual files if desired. SC4S depends on the directory layoutto read the local configurations properly. See the notes below for which files will be preserved on restarts.In the local/config/ directory there are four subdirectories that allow you to provide support for device typesthat are not provided out of the box in SC4S. To get you started, there is an example log path template (lp-example.conf.tmpl)and a filter (example.conf) in the log_paths and filters subdirectories, respectively. These should not be used directly,but copied as templates for your own log path development. They will get overwritten at each SC4S start.
    In the local/context directory, if you change the “non-example” version of a file (e.g. splunk_metadata.csv) the changeswill be preserved on a restart.

  • /opt/sc4s/archive will be used as a mount point for local storage of syslog events(if the optional mount is uncommented above). The events will be written in the syslog-ng EWMM format. See the “configuration”document for details on the directory structure the archive uses.

  • /opt/sc4s/tls will be used as a mount point for custom TLS certificates(if the optional mount is uncommented above).

  • IMPORTANT: When creating the directories above, ensure the directories created match the volume mounts specified in thesc4s.service unit file. Failure to do this will cause SC4S to abort at startup.

Dedicated (Unique) Listening Ports

For certain source technologies, categorization by message content is impossible due to the lack of a unique “fingerprint” inthe data. In other cases, a unique listening port is required for certain devices due to network requirements in the enterprise.For collection of such sources, we provide a means of dedicating a unique listening port to a specific source.

Follow this step to configure unique ports for one or more sources:

  • Modify the /opt/sc4s/env_file file to include the port-specific environment variable(s). Refer to the “Sources”documentation to identify the specific environment variables that are mapped to each data source vendor/technology.

Modify index destinations for Splunk

Log paths are preconfigured to utilize a convention of index destinations that are suitable for most customers.

  • If changes need to be made to index destinations, navigate to the /opt/sc4s/local/context directory to start.
  • Edit splunk_metadata.csv to review or change the index configuration as required for the data sources utilized in yourenvironment. The key (1st column) in this file uses the syntax vendor_product. Simply replace the index value (the 3rd column) in thedesired row with the index appropriate for your Splunk installation. The “Sources” document details the specific vendor_product keys (rows)in this table that pertain to the individual data source filters that are included with SC4S.
  • Other Splunk metadata (e.g. source and sourcetype) can be overridden via this file as well. This is an advanced topic, and furtherinformation is covered in the “Log Path overrides” section of the Configuration document.

Configure source filtering by source IP or host name

Legacy sources and non-standard-compliant sources require configuration by source IP or hostname as included in the event. The following stepsapply to support such sources. To identify sources that require this step, refer to the “sources” section of this documentation. See documentationfor your vendor/product to determine if specific configuration is required

Configure compliance index/metadata overrides

In some cases, devices that have been properly sourcetyped need to be further categorized by compliance, geography, or other criterion.The two files compliance_meta_by_source.conf and compliance_meta_by_source.csv can be used for this purpose. These operate similarly tothe files above, where the conf file specifies a filter to uniquely identify the messages that should be overridden, and the csv filelists one or more metadata items that can be overridden based on the filter name. This is an advanced topic, and further information iscovered in the “Override index or metadata based on host, ip, or subnet” section of the Configuration document.

Runtime Configuration - Splunk Connect for Syslog (2024)

FAQs

How to configure syslog in Splunk? ›

Set up the global setting
  1. Log on to Splunk.
  2. Navigate to Settings > Data Inputs > HTTP event collector. The HTTP event collector page is displayed.
  3. Click Global Settings.
  4. Specify the following parameters and click Save. NOTE. By default, the HTTP Port Number indicates the default port.

Can Splunk be used as a syslog server? ›

Splunk Enterprise indexers can act as syslog servers that handle incoming data streams that comply with the syslog messaging standard. Splunk Enterprise can also act as a syslog message sender. Splunk Cloud Platform cannot send syslog messages, nor can it move messages from one device to another.

What port does Splunk syslog use? ›

Syslog messages are transferred using UDP on port 514.

What is SC4S? ›

Splunk Connect for Syslog (SC4S) is a distribution of syslog-ng that simplifies getting your syslog data into Splunk Enterprise and Splunk Cloud.

How do I setup and configure syslog? ›

How to Configure Syslog on a Cisco Device
  1. Step 1: Enable logging on the Cisco device. ...
  2. Step 2: Modify the syslog config for facility codes. ...
  3. Step 3: Change the default logging levels. ...
  4. Step 4: Define destination port and IP address. ...
  5. Step 5: Define source IP address. ...
  6. Step 6: Securing syslog messages on a Cisco device (Optional)
May 2, 2024

What is the configuration file for syslog? ›

conf file is the configuration file for the syslogd daemon. It consists of lines with two fields: Selector field. The types of messages and priorities to which the line applies.

How do I connect to a syslog server? ›

Configuring SysLog Connection

Navigate to Admin | Configuration and select the Foreign Systems tab. At the SysLog page, click Create. Select a template for the messages, provide a Name and the SysLog Server Address (either tcp or udp). The default is udp on port 514.

How do I connect logs to Splunk? ›

Configure Splunk Enterprise to receive logs
  1. Add a new data input. Open Splunk Web and navigate to Settings > Data inputs. In the Local inputs section, click Add new for the TCP (or UDP) input type. ...
  2. Configure the input settings. Select the appropriate log Source type. ...
  3. Review the pending changes and click Submit.
Feb 10, 2023

How do I send logs to syslog server? ›

Solution:
  1. Connect to a Controller VM (CVM) in the cluster using SSH.
  2. Enter the ncli command to log into the nCLI prompt. ...
  3. The remote syslog server is enabled by default. ...
  4. Add an rsyslog server using the following command, which adds it to the cluster.
May 10, 2024

What are the three main Splunk components? ›

Splunk Components. The primary components in the Splunk architecture are the forwarder, the indexer, and the search head.

Does syslog use TCP or UDP? ›

Syslog runs on UDP, where syslog servers listen to UDP port 514 and clients (sending log messages) use a port above 1023. Note that a syslog server will not send a message back to the client, but the syslog log server can communicate, normally using port 514.

What are some of the most important configuration files in Splunk? ›

List of Splunk Configuration Files
Configuration filePurpose
app.confConfigure app properties
authentication.confToggle between Splunk's built-in authentication or LDAP, and configures LDAP
authorize.confConfigure roles, including granular access controls.
collections.confConfigure KV Store collections for apps.
15 more rows
Mar 21, 2023

Can Splunk be a syslog server? ›

Splunk Connect for Syslog is a containerized Syslog-ng server with a configuration framework designed to simplify getting syslog data into Splunk Enterprise and Splunk Cloud. This approach provides an agnostic solution allowing administrators to deploy using the container runtime environment of their choice.

Can Splunk connect to a database? ›

Splunk DB Connect connects your relational database data to Splunk Enterprise and makes that data consumable by Splunk Enterprise. In addition, Splunk DB Connect can do the reverse, writing Splunk Enterprise data back to your relational database.

What is the syslog protocol? ›

Syslog is a protocol that computer systems use to send event data logs to a central location for storage. Logs can then be accessed by analysis and reporting software to perform audits, monitoring, troubleshooting, and other essential IT operational tasks.

How to configure syslog audit logs? ›

In the Status and Diagnostics section, click Audit Log. Click Configure Syslog Settings. In the Destination field, type the IP address of the remote syslog server. From the Protocol drop-down menu, select TCP or UDP.

How to configure server logs in Splunk? ›

To configure logging to a Splunk server:
  1. Select Start > All Programs > Cherwell Service Management > Tools > Server Manager.
  2. Select a service from the Server drop-down list. ...
  3. Click the Logging button. ...
  4. Select the Log to Splunk check box.
  5. Select a log level: ...
  6. Click OK.
  7. In the Log Server area, click the Configure button.

How to configure a custom syslog sender and test user mappings? ›

Configuration
  1. Go to Device > User Identification > User Mapping.
  2. Edit the "Palo Alto Networks User ID Agent Setup" section.
  3. Go to the Syslog Filter tab and add a new Syslog Parse Profile.
  4. Determine the type for the profile (Regex Identifier or Field Identifier) depending on the complexity of the logs.
Sep 25, 2018

Top Articles
Latest Posts
Article information

Author: Virgilio Hermann JD

Last Updated:

Views: 5823

Rating: 4 / 5 (41 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Virgilio Hermann JD

Birthday: 1997-12-21

Address: 6946 Schoen Cove, Sipesshire, MO 55944

Phone: +3763365785260

Job: Accounting Engineer

Hobby: Web surfing, Rafting, Dowsing, Stand-up comedy, Ghost hunting, Swimming, Amateur radio

Introduction: My name is Virgilio Hermann JD, I am a fine, gifted, beautiful, encouraging, kind, talented, zealous person who loves writing and wants to share my knowledge and understanding with you.