
Why Migrate from Splunk to Elastic in 2024? Key Benefits for Canadian Companies
Migration approach
- Cost: Splunk is often considered an expensive tool, especially for large volumes of data. ELK, on the other hand, is open source and offers a free option as well as more affordable commercial options, which can be attractive for organizations looking to reduce costs.
- Flexibility and Customization: Like Splunk, ELK offers great flexibility and in-depth customization, allowing users to create custom data processing pipelines with Logstash, custom visualizations with Kibana, and to adapt to the specific needs of their infrastructure and use cases.
- Scalability: ELK is well known for its horizontal scalability, meaning it can easily scale to handle large volumes of data by simply adding new nodes to the Elasticsearch cluster. This can be particularly advantageous for large-scale or constantly growing environments.
- Integration with the Open Source Ecosystem: ELK integrates well with other open source tools and technologies, allowing users to create complete solutions by combining ELK with other open source components, such as Beats for data collection, or orchestration tools like Kubernetes.
- Community and Support: ELK benefits from an active open source community and a wide range of online resources, which can facilitate learning and problem-solving. Additionally, Elastic, the company behind ELK, also offers commercial support for businesses that need additional assistance.
- Advanced Features: While Splunk offers many advanced features for data analysis and visualization, ELK continues to expand its capabilities with additional modules such as Elastic SIEM, Elastic Observability, and Machine Learning (anomaly detection and AI assistant). It is also worth noting that the ELK licensing model includes all these features in the Enterprise license by default. Unlike Splunk, where everything is a paid 'add-on' on top of the basic license.
Migrating from Splunk to ELK primarily involves handling the data. This can be divided into two components:
Historical Data: Typically used for conducting investigations for specific use cases, such as fraud or customer loyalty (CVM).
Real-Time Data: Aimed at enabling rapid decision-making for real-time use cases.
To successfully migrate, both aspects need to be addressed. Below is a high-level approach to the process:
- Inventory of Data Sources: Identifying the types of data, frequency, and volume of ingestion will greatly assist in effectively planning the migration.
- Real-Time Migration: There are two ways to approach this:
- Ingestion from Splunk using heavy forwarders.
- Direct ingestion using Elastic agents/beats.
The ingestion on Splunk will gradually decrease as the stability and maturity of the ingestion on ELK improve. During this transition, there will be a "double run" for real-time ingestion between Splunk and ELK.
- Historical Data Migration: Stabilizing ingestion on ELK will be a significant milestone for historical data ingestion. Only the data ingested before this milestone (older data) will be migrated.
- Decommissioning Splunk: This will occur after the migration of historical data and real-time data ingestion is complete.
How to Extract and Migrate Historical Data from Splunk to Elastic in 2024
To migrate historical data from Splunk to ELK, you will need to execute the following command in the /opt/splunk/bin directory of the Splunk search head:
./splunk search "index=main earliest=04/22/2024:10:00:00
latest=04/23/2024:10:26:28" -maxout 0 -output json> splunklogs-json.log
Index=main refers to the index ingested in Splunk.
Earliest= refers to the timestamp of the oldest data.
Latest= refers to the timestamp of the most recent data in your historical records.
Json indicates the format of the files; we chose JSON because it is compatible with ELK.
splunklogs-json.log is the file that will contain all the historical data from the index.
Logstash Ingestion for Splunk to Elastic Migration: A Step-by-Step Guide
You will then need a Logstash server to ingest these files into Elasticsearch.
The Logstash configuration for this ingestion is as follows:
input {
file {
path => "/etc/logstash/splunklogs-json.log"
start_position => "beginning"
type => "json"
}
}
filter {
json {
source => "message"
}
}
output {
stdout {}
elasticsearch {
hosts => ["https://ip-elk:9200"]
ssl => true
cacert => "/etc/logstash/certs/elasticsearch-ca.pem"
user => "user"
password => "******"
manage_template => false
data_stream => true
data_stream_type => "logs"
ecs_compatibility => "v8"
}
}
Performing Data Discovery on ELK After Migrating from Splunk
Once you have ingested the data into Elasticsearch through Logstash, you will have a view like this:

All fields tagged by Splunk will be retrieved from Elasticsearch. You can even reformat the data with logstash, changing the field structure as you wish. But even without reformatting, all Splunk fields are directly ingested with the result suffix. So while you're waiting for this data to expire, you'll need to adapt your eDiscovery and survey queries slightly.
Real-time data ingestion
Real-time data ingestion is also possible using logstash in addition to heavy forwarders. In this section, we'll take a look at the aforementioned 2.a approach.
Below is an example of syslog traces.
Prerequisites
To transmit syslog data from Splunk to ELK in real time. You need a Splunk infrastructure with heavy forwarders. These are Splunk instances capable of filtering, routing and transforming logs.
Why not use the Splunk search head directly? Log transmission can present a risk of congestion on Splunk queues if there is latency or transmission errors, especially in the case of transmissions via TCP. In this case, Splunk will stop the reception. So let's avoid transmission on Splunk search heads, which should be used mainly for search requests. Pourquoi ne pas utiliser directement Splunk universal forwarder? Universal forwarders have no ability to filter logs before transmission. They send the whole batch or nothing.
Why do you need filtering? You'll need filtering, because in the case of real-time transmission, your data won't have the Splunk tags to identify the different fields and data sources. And to facilitate formatting into a format that is readable and usable at ELK level, you need to transform your data. As logs change structure depending on the source, this work is essential.
onfiguring Heavy Forwarders (HF) for a Smooth Migration
So with heavy forwarders, we'll use the outputs.conf props.conf and tranforms.conf files to route logs to the logstash instance which will do the ingestion at ELK level.
The outputs.conf file can be found here opt/splunk/etc/system/local/outputs.conf
[tcpout]
defaultGroup = splunk_group
[tcpout:splunk_group]
server = 192.168.0.92:9997
disabled = 0
[syslog]
defaultGroup=syslogGroup
[syslog:syslogGroup]
server = 192.168.0.92:5144
sendCookedData = false
type = tcp
Optimizing Search Queries on ELK Post-Migration from Splunk
The file points to two destinations. The Splunk server, which is our default group, where we'll send all the logs received by the HF
And the second syslog group, where we'll send only the syslog traces in our example.
Transmission between Splunk HF and Splunk search head uses s2s coded communication.
On the other hand, logstash does not understand this encoding, hence the need to send unencoded data with the parameter :
sendCookedData = false
The /opt/splunk/etc/system/local/props.conf file is as follows
[syslog]
TRANSFORMS-routing = routeAll, send_to_syslog
It indicates two transformations to be applied: routeAll et send_to_syslog to syslog traces, which are defined in the transforms.conf file below
In the file : /opt/splunk/etc/system/local/transforms.conf the following is indicated:
[routeAll] REGEX = (.) DEST_KEY = _TCP_ROUTING FORMAT = splunk_group
[send_to_syslog]
REGEX = (.)
DEST_KEY = _SYSLOG_ROUTING
FORMAT = syslogGroup
routeAll Transformation
RouteAll Transformation
This transformation uses a simple regular expression (.)* that captures everything (every character) in the tcp group. It then specifies that events should be routed to splunk search head using the _TCP_ROUTING field with the splunk_group format.
Transformation send_to_syslog
This transformation follows a similar logic to the previous one. It uses a simple regular expression (.)* to capture everything. Next, it specifies that the events are to be sent to an external syslog service or another syslog instance using the field _SYSLOG_ROUTING with the syslogGroup.
In summary, when Splunk indexes source-type syslog events, it first applies the transforms specified in the transforms.conf file. Events are first sent to a specific TCP receiver (which forwards them to Splunk search), then they are also sent to Logstash. This ensures that logs are ingested in real time on both platforms.
Ingestion and Logstash Filtering
Now that we have an initial filtering that allows us to capture syslog traces to Logstash, we can apply advanced filtering using grok functionalities to extract the necessary fields. Remember, in real-time ingestion by Splunk HF, unlike file ingestion of historical data, we do not retrieve the Splunk data structure or tags. Therefore, the traces received by Logstash are known to be syslog traces, as we filtered them accordingly. However, Logstash does not know this. Hence, the Logstash configuration below includes the parameter `type => syslog` in the input block.
Then, in the filter block, we apply the necessary transformation to format the logs into a usable format in ELK. Finally, the output block serves as a gateway to the Elasticsearch index.
input {
tcp {
port => 5144
type => "syslog"
}
filter {
if [type] == "syslog" {
grok {
match => { "message" => "<%{NUMBER:facility}> %{IPORHOST:hostname} %{GREEDYDATA:syslog_message}" }
}
date {
match => [ "timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss" ]
}
}
}
output{
elasticsearch {
parameter elastic(look previous example)
}
}
Search Queries on ELK
This transformation allowed us to retrieve logs on Elasticsearch in the format shown below.
The few fields present in this capture result from the fact that the grok used was not fully customized. To fully leverage these logs, it is necessary to extract the maximum number of fields to optimize and facilitate the queries.
This is a task that needs to be done for each type of source.
Even within syslog, the format of the logs changes depending on whether the log comes from a Linux/Windows server or a Cisco source or another. Each syslog allows tracking a particular event with varying fields. Therefore, you need to have as many grok filters as there are event sources.
Additionally, don't forget the upstream filtering that you need to do in Splunk to send specific logs from a source to a Logstash pipeline on a dedicated port. This way, you can impose the structure you want. In this example, we sent the syslog traces to the Logstash pipeline on port 5144.

Conclusion
Ingesting real-time logs from Splunk to Elastic is entirely possible but involves considerable complexity. It requires significant customization in the Splunk architecture with mandatory heavy forwarders (HFs) for initial filtering of source types. Then, a second task involves preparing multiple ingestion pipelines in Logstash for each source, with several grok filters to extract the maximum number of fields. All this work is intended to be abandoned once Splunk is fully decommissioned.
Therefore, we recommend deploying Beats agents on the sources from the early stages of the migration project to directly extract data and index it in formats native to Elasticsearch. This will optimize queries and reduce the time spent on Splunk to ELK transformations. This initial stage will be characterized by a double run of Splunk and ELK until real-time ingestion is stabilized. This timestamp will later represent the most recent milestone for historical data. Subsequently, we will proceed with the extraction of all old data up to the defined milestone marking the beginning of stable real-time ingestion on ELK, following the method mentioned in the historical ingestion section of this document.
WHAT’S THE NEXT STEP?
To take advantage of a successful migration from Splunk to ELK and avoid costly complications related to poor data management, we invite you to meet with our team of experts. With solid experience in handling complex data migrations and a commitment to customer satisfaction, we are here to support you through a smooth transition of your monitoring infrastructure.
With proven success in migrating from Splunk to ELK for numerous companies in Canada and internationally, we are recognized as experts in the field. Our team provides on-site assistance to ensure seamless integration, while maintaining the continuity and security of your data during the transition.
Discover more recent posts

Complete Guide: Installing and Configuring SSL/TLS Certificates on Elasticsearch and Kibana

FAQ – Why is data essential to modern mining management?

How to Install and Configure a Master Node for Your Elastic Cluster?

