Logstash Module - Change some fields so dashboards load

This commit is contained in:
Mike Reeves
2018-10-16 16:21:50 -04:00
parent 61c30243ff
commit 57039d83c8
2 changed files with 7 additions and 0 deletions

View File

@@ -1,5 +1,9 @@
{%- set MASTER = salt['pillar.get']('sensor:master', '') %}
{%- set HOSTNAME = salt['grains.get']('host', '') %}
beat.name: {{ HOSTNAME }}
beat.hostname: {{ HOSTNAME }}
#========================== Modules configuration ============================
filebeat.modules:
#=========================== Filebeat prospectors =============================

View File

@@ -11,8 +11,11 @@ input {
filter {
if "ids" in [tags] {
mutate {
add_field => {"sensor_name" => "%{beat.name}"}
add_field => {"syslog-host_from" => "%{beat.hostname}"}
remove_tag => ["beat"]
rename => { "host" => "beat_host" }
remove_field => ["beat.name", "beat.hostname"]
}
}