Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

processors as exported resources #245

Open
philmes opened this issue Feb 28, 2020 · 1 comment
Open

processors as exported resources #245

philmes opened this issue Feb 28, 2020 · 1 comment

Comments

@philmes
Copy link

philmes commented Feb 28, 2020

I'd like to be able to add processors as exported resources, like you can with inputs. This would me to define filebeat in a base profile, and then add configuration from roles. For example:

To add inputs I can do this:

    filebeat::input { 'rails-api-logs':
        paths    => [
            '/blah/production.json.log'
        ],
        doc_type => 'syslog-beat',
        fields => {
            type => 'rails',
            app => 'api'
        }
    }

Is it possible to do the same with processors? The obvious doesn't work:

    filebeat::processors { 'rails-api-processors':
        params => {
            "add_host_metadata" => "~",
            "add_cloud_metadata" => "~",
            "add_docker_metadata" => "~",
            "add_kubernetes_metadata" => "~",
            "decode_json_fields" => {
                "fields" => ["message"],
                "target" =>"\"\"",
                "overwrite_keys" => "true"
            },
            "rename" => {
                "fields" => [{"from" => "host", "to" => "server" }]
            }
        }
    }
@pcfens
Copy link
Owner

pcfens commented Feb 28, 2020

We don't have a defined resource for a processor yet, but I like the idea. I'll add it to the todo list, though if someone has time and wants to submit a PR before I get to it that's fine too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants