Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
title/etc/logstash/conf.d/radius-pipeline.conf
input {
    pipeline { address => radiuslogs }
}

filter {
    mutate { gsub => [ "message", "[\n\t]+", " " ] }

    kv {
        allow_duplicate_values => false
        include_keys => [
            "Calling-Station-Id",
            "Framed-IP-Address",
            "Timestamp",
            "Called-Station-Id",
            "NAS-IP-Address",
            "Acct-Status-Type"
        ]

        remove_field => [
            "logtype",
            "message",
            "@version"
        ]
    }

    if "beats_input_codec_plain_applied" in [tags] {
        mutate { remove_tag => ["beats_input_codec_plain_applied"] }
    }

    geoip { source => "NAS-IP-Address" }

    fingerprint {
        key => "${cipherfingerprint_key}"
        method => "SHA512"
        source => "Calling-Station-Id"
        target => "Calling-Station-Id"
    }

    fingerprint {
        key => "${cipherfingerprint_key}"
        method => "SHA512"
        source => "Framed-IP-Address"
        target => "Framed-IP-Address"
    }
}

output {
    stdout { codec => rubydebug }
}

...

Code Block
title/etc/logstash/conf.d/dhcp-pipeline.conf
input {
    pipeline { address => dhcplogs }
}

filter {
    dissect {
        mapping => {
            "message" => "%{} DHCPACK on %{ip} to %{mac} %{}"
        }

        remove_field => [
            "logtype",
            "message",
            "@version"
        ]
    }

    if "beats_input_codec_plain_applied" in [tags] {
        mutate { remove_tag => ["beats_input_codec_plain_applied"] }
    }

    fingerprint {
        key => "${cipherfingerprint_key}"
        method => "SHA512"
        source => "ip"
        target => "ip"
    }

    fingerprint {
        key => "${cipherfingerprint_key}"
        method => "SHA512"
        source => "mac"
        target => "mac"
    }
}

output {
    stdout { codec => rubydebug }
}

...