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

Logs still treated as an integration #612

Open
devinmatte opened this issue Feb 17, 2020 · 2 comments
Open

Logs still treated as an integration #612

devinmatte opened this issue Feb 17, 2020 · 2 comments

Comments

@devinmatte
Copy link
Member

I would love to be able to configure the logs block of each of my integrations like postfix, like the docs tell me to do https://docs.datadoghq.com/integrations/postfix/#log-collection however the puppet module doesn't appear to currently support this use case

@gmccue
Copy link

gmccue commented Mar 4, 2020

I believe you should be able to do this (untested) using the logs integration: https://github.com/DataDog/puppet-datadog-agent/blob/master/manifests/integrations/logs.pp#L23

Edit: scratch that! re-read the description here, and this is about supporting creation of custom paths like postfix.d/conf.yaml instead of relying on the logs integration (conf.d/logs.yaml).

@albertvaka
Copy link
Contributor

Unfortunately, adding all possible fields to all integrations doesn't scale, so many integrations are missing options (like logs in this case).

To circumvent this problem, we recommend you use the free-form integrations hash in the datadog_agent class. There you can specify any integration you want with any fields you want, like this:

class { "datadog_agent":
    < your other arguments to the class >,
    integrations => {
        postfix => {
            init_config => {
                postfix_user => 'postfix',
            },
            instances => [
                {
                    directory => '/var/spool/postfix',
                    queues => [ 'incoming', 'active', 'deferred' ],
                }
            ],
            logs => [
                {
                    type => 'file',
                    path => '/var/log/mail.log',
                    source => 'postfix',
                    service => 'myapp',
                }
            ],
        },
    },
}

Let me know if this solves your issues!

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

No branches or pull requests

3 participants