mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-21 00:13:06 +01:00
Initial support for Live Queries in Hunt
This commit is contained in:
@@ -2,15 +2,17 @@
|
||||
{%- set THREADS = salt['pillar.get']('logstash_settings:ls_input_threads', '') %}
|
||||
{% set BATCH = salt['pillar.get']('logstash_settings:ls_pipeline_batch_size', 125) %}
|
||||
|
||||
## TO DO - Add this to Logstash Pipeline Pillar - Manager
|
||||
|
||||
input {
|
||||
redis {
|
||||
host => '{{ MANAGER }}'
|
||||
port => 6379
|
||||
data_type => 'pattern_channel'
|
||||
key => 'results_*'
|
||||
type => 'osq'
|
||||
type => 'live_query'
|
||||
add_field => {
|
||||
"module" => "osquery"
|
||||
"dataset" => "live_query"
|
||||
}
|
||||
threads => {{ THREADS }}
|
||||
batch_count => {{ BATCH }}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
{%- endif %}
|
||||
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
|
||||
output {
|
||||
if [module] =~ "osquery" {
|
||||
if [module] =~ "osquery" and "live_query" not in [dataset] {
|
||||
elasticsearch {
|
||||
pipeline => "%{module}.%{dataset}"
|
||||
hosts => "{{ ES }}"
|
||||
|
||||
@@ -5,28 +5,30 @@
|
||||
{%- endif %}
|
||||
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
|
||||
|
||||
## TO DO - Add this to Logstash Pipeline Pillar - Search
|
||||
|
||||
filter {
|
||||
if [type] =~ "osq" {
|
||||
if [type] =~ "live_query" {
|
||||
|
||||
mutate {
|
||||
rename => {
|
||||
"[host][hostname]" => "computer_name"
|
||||
}
|
||||
}
|
||||
|
||||
prune {
|
||||
blacklist_names => ["host"]
|
||||
}
|
||||
|
||||
split {
|
||||
field => "rows"
|
||||
}
|
||||
mutate {
|
||||
rename => {
|
||||
"[rows][cmdline]" => "[process][commandline]"
|
||||
"[rows][name]" => "[process][name]"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
output {
|
||||
if [type] =~ "osq" {
|
||||
if [type] =~ "live_query" {
|
||||
elasticsearch {
|
||||
pipeline => "common"
|
||||
pipeline => "osquery.live_query"
|
||||
hosts => "{{ ES }}"
|
||||
index => "so-osquery"
|
||||
template_name => "so-osquery"
|
||||
Reference in New Issue
Block a user