Hi, I need to add suricata logs from different servers (diggerent customers) in a single elastich dashboard. I need to filter and analyze log per-customer. Is it possible? How can do it? Many thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Heya,
It does sound possible for sure!
Let’s give a certain review of the situation and how to approach it:
Log Centralization:
Tag Logs with Customer-Specific Information: To filter logs by customer, you’ll need to tag the logs based on the server or customer. This is done by adding metadata to each log entry, either using Filebeat or Logstash.
filebeat.yml
), which will tag logs based on the customer’s identity.filebeat.inputs:
- type: log
paths:
- /var/log/suricata/eve.json
fields:
customer_id: "customer_1"
You can configure this for each server to ensure logs are tagged with the respective customer ID.
Logstash: If you are using Logstash, you can use filters to add metadata like customer IDs when processing logs:
filter {
if [host] == "customer1_server_ip" {
mutate { add_field => { "customer_id" => "customer_1" } }
}
}
Index Design:
customer_id
for filtering. This is simple and allows you to scale easily, but performance may degrade as logs grow.suricata_customer1-*
, suricata_customer2-*
, etc. This is more organized but could be harder to maintain if you have many customers.Index Patterns in Kibana: Once the logs are ingested into Elasticsearch, you can create index patterns in Kibana to filter logs by customer.
suricata-*
.customer_id
) in the Discover tab, which allows you to search, analyze, and visualize logs per customer.Dashboards and Visualizations:
customer_id
field.On another note, consider using an automation tool like Ansible to deploy and configure Suricata, Filebeat, or Logstash on each server with the correct customer-specific settings to streamline the setup.
With this setup, your dashboard will be able to display a comprehensive view of all logs while still offering the flexibility to filter and analyze data by customer.
Regards
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.