Initial Support - Live Query to Hunt

This commit is contained in:
Josh Brower
2021-02-26 08:08:09 -05:00
parent e06ca75677
commit b8137214e4
2 changed files with 58 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
{%- set MANAGER = salt['grains.get']('master') %}
{%- 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'
threads => {{ THREADS }}
batch_count => {{ BATCH }}
}
}

View File

@@ -0,0 +1,41 @@
{%- if grains['role'] == 'so-eval' -%}
{%- set ES = salt['pillar.get']('manager:mainip', '') -%}
{%- else %}
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
{%- endif %}
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
## TO DO - Add this to Logstash Pipeline Pillar - Search
filter {
if [type] =~ "osq" {
split {
field => "rows"
}
mutate {
rename => {
"[rows][cmdline]" => "[process][commandline]"
"[rows][name]" => "[process][name]"
}
}
}
}
output {
if [type] =~ "osq" {
elasticsearch {
pipeline => "common"
hosts => "{{ ES }}"
index => "so-osquery"
template_name => "so-osquery"
template => "/templates/so-osquery-template.json"
template_overwrite => true
{%- if grains['role'] in ['so-node','so-heavynode'] %}
ssl => true
ssl_certificate_verification => false
{%- endif %}
}
}
}