Migration · ELK / OpenSearch
Moving from the ELK stack.
Days, most of it in parsing and dashboards. Filebeat keeps running with one output changed; your grok patterns come with you; Kibana searches translate almost word for word. What does not come across is the Elasticsearch API itself, and anything that depends on it.
- 01
Filebeat: change one output
MinutesPoint Filebeat's Logstash output at a Sondar agent, which listens for the same protocol. Inputs, modules and processors stay as they are. Filebeat's message becomes the event's text, the file path its origin and the host its host. We ran Filebeat 9.5.4 and 8.19.22 this way, at their default settings, and found every event by keyword.
# filebeat.yml output.logstash: hosts: ["sondar-agent.internal:5000"] # the Sondar agent readers: - lumberjack_listener: address: ":5000"Sondar does not speak the Elasticsearch API. Its storage layer is descended from Elasticsearch, but nothing on its port answers Elasticsearch requests, so an
elasticsearchoutput (from Beats, Logstash or a client library) cannot point at it. Logstash's own outputs have not been tested against Sondar; send through Filebeat or the Sondar agent instead. - 02
Parsing: keep your grok patterns
DaysThe agent parses with grok at collect time and ships Logstash's standard pattern file, so
%{COMBINEDAPACHELOG},%{SYSLOGBASE}and the rest mean what they meant. Custom patterns go in a file beside them. Or move the parsing to search time: a regex or JSON extraction rule on a source type applies to data already stored, so it needs no re-ingest. - 03
Searches: KQL becomes SonQL
HoursA Kibana search is mostly the same shape with
=in place of:. As in KQL,ANDbinds tighter thanOR; parenthesise when you mix them. Everything after the search is SonQL commands piped together, the part Kibana does with its visual builders.Kibana (KQL) SonQL status:500 status=500 status >= 500 status>=500 service:checkout and status:500 service="checkout" status=500 not level:debug NOT level="debug" level:(error or warn) level in ("error", "warn") "connection refused" "connection refused" host:* host=* - 04
Dashboards and visualizations: rebuild them
DaysThere is no importer for Kibana saved objects. Each panel is rebuilt from a SonQL search, saved as a report and placed on a dashboard. That is where most of the migration's time goes, and a good moment to retire the panels nobody opens.
- 05
Index lifecycle: set a retention
MinutesAn ILM policy becomes a retention period on each Sondar index. The index a new install writes to keeps 15 days; set each one to what its data needs.
Start with one Filebeat.
Point one Filebeat at an agent, search for a line you know is in the file, and the rest of the estimate follows from how many dashboards you keep.
The Filebeat setup