-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Organize logstash pipeline and fix kibana config detection
- Logstash config is now broken into components - Fixed deploy script to work around elastic/kibana#16348, which is also present in Kiban 5.6.8.
- Loading branch information
Showing
17 changed files
with
176 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
input { | ||
kafka { | ||
topics => ["fsf-raw"] | ||
add_field => { "[@metadata][stage]" => "fsfraw_kafka" } | ||
# Set this to one per kafka partition to scale up | ||
#consumer_threads => 4 | ||
group_id => "fsf_logstash" | ||
bootstrap_servers => "127.0.0.1:9092" | ||
codec => json | ||
auto_offset_reset => "earliest" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
input { | ||
kafka { | ||
topics => ["suricata-raw"] | ||
add_field => { "[@metadata][stage]" => "suricataraw_kafka" } | ||
# Set this to one per kafka partition to scale up | ||
#consumer_threads => 4 | ||
group_id => "suricata_logstash" | ||
bootstrap_servers => "127.0.0.1:9092" | ||
codec => json | ||
auto_offset_reset => "earliest" | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
filter { | ||
if [@metadata][stage] == "fsfraw_kafka" { | ||
if ![tags] { | ||
# Remove kafka_topic field | ||
mutate { remove_field => [ "kafka_topic" ] } | ||
|
||
# Set the timestamp | ||
date { match => [ "Scan Time", "ISO8601" ] } | ||
} | ||
else { | ||
mutate { add_field => { "[@metadata][stage]" => "_parsefailure" } } | ||
} | ||
} | ||
|
||
if [@metadata][stage] == "fsf" { | ||
if ![tags] { | ||
mutate { remove_field => ["path"] } | ||
} | ||
else { | ||
mutate { add_field => { "[@metadata][stage]" => "_parsefailure" } } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
filter { | ||
|
||
if [@metadata][stage] == "suricataraw_kafka" { | ||
|
||
if ![tags] { | ||
|
||
# Remove kafka_topic field | ||
mutate { | ||
remove_field => [ "kafka_topic" ] | ||
} | ||
|
||
# Set the timestamp | ||
date { match => [ "timestamp", "ISO8601" ] } | ||
} else { | ||
mutate { add_field => { "[@metadata][stage]" => "_parsefailure" } } | ||
} | ||
} | ||
|
||
if [@metadata][stage] == "suricata_eve" { | ||
# Tags will determine if there is some sort of parse failure | ||
if ![tags] { | ||
mutate { remove_field => ["path"] } | ||
} | ||
else { | ||
mutate { add_field => { "[@metadata][stage]" => "_parsefailure" } } | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
output { | ||
if [@metadata][stage] == "broraw_kafka" { | ||
kafka { | ||
codec => json | ||
topic_id => "bro-%{[@meta][event_type]}" | ||
bootstrap_servers => "127.0.0.1:9092" | ||
} | ||
|
||
elasticsearch { | ||
hosts => ["127.0.0.1"] | ||
index => "bro-%{[@meta][event_type]}-%{+YYYY.MM.dd}" | ||
manage_template => false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
output { | ||
if [@metadata][stage] == "fsfraw_kafka" { | ||
kafka { | ||
codec => json | ||
topic_id => "fsf-clean" | ||
bootstrap_servers => "127.0.0.1:9092" | ||
} | ||
|
||
elasticsearch { | ||
hosts => ["127.0.0.1"] | ||
index => "fsf-%{+YYYY.MM.dd}" | ||
manage_template => false | ||
document_type => "fsf" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
output { | ||
if [@metadata][stage] == "_parsefailure" { | ||
elasticsearch { | ||
hosts => ["127.0.0.1"] | ||
index => "parse-failures-%{+YYYY.MM.dd}" | ||
document_type => "_parsefailure" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
output { | ||
if [@metadata][stage] == "suricataraw_kafka" { | ||
kafka { | ||
codec => json | ||
topic_id => "suricata-clean" | ||
bootstrap_servers => "127.0.0.1:9092" | ||
} | ||
|
||
elasticsearch { | ||
hosts => ["127.0.0.1"] | ||
index => "suricata-%{+YYYY.MM.dd}" | ||
manage_template => false | ||
document_type => "%{event_type}" | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.