## All options defined here are available to all instances.
#
init_config:
    postfix_user: postfix
    min_collection_interval: 300

    ## @param postfix_user - string - optional - default: root
    ## The user running dd-agent must have passwordless sudo access for the find
    ## command to run the postfix check.
    ## Example /etc/sudoers entry:
    ##   dd-agent ALL=(postfix) NOPASSWD:/usr/bin/find /var/spool/postfix/incoming -type f
    ##
    ## On Redhat, CentOS, and Amazon Linux, also add:
    ##   Defaults:dd-agent !requiretty
    #
    # postfix_user: root


    ## @param postqueue - boolean - optional - default: false
    ## Set `postqueue: true` to gather mail queue counts using `postqueue -p` without the use of sudo.
    ## Postqueue binary runs with set-group ID privileges, so that it can connect to Postfix daemon processes.
    ## Only `tags` keys are used from `instances` definition.
    ## Postfix has internal access controls that limit activities on the mail queue. By default,
    ## Postfix allows `anyone` to view the queue. On production systems where the Postfix installation may be
    ## configured with stricter access controls, you may need to grant the dd-agent user access to view the mail queue.
    ##
    ##   postconf -e "authorized_mailq_users = dd-agent"
    ##
    ## authorized_mailq_users (static:anyone): List of users who are authorized to view the queue.
    ## http://www.postfix.org/postqueue.1.html
    #
    # postqueue: false

    ## @param service - string - optional
    ## Attach the tag `service:<SERVICE>` to every metric, event, and service check emitted by this integration.
    ##
    ## Additionally, this sets the default `service` for every log source.
    #
    # service: <SERVICE>

## Every instance is scheduled independently of the others.
#
instances:

    ## @param directory - string - optional
    ## Path to the postfix directory. The directory option is required if `postqueue: false` is set. For more 
    ## information see https://docs.datadoghq.com/integrations/postfix/#using-sudo.
    #
  - directory: /var/spool/postfix

    ## @param queues - list of strings - optional
    ## List of queues to monitor.
    #
    queues:
      - incoming
      - active
      - deferred

    min_collection_interval: 300
    ## @param config_directory - string - optional - default: /etc/postfix
    ## The config_directory option applies only when `postqueue: true`.
    ## The config_directory is the location of the Postfix configuration directory that contains the main.cf file.
    #
    # config_directory: /etc/postfix

    ## @param tags - list of strings - optional
    ## A list of tags to attach to every metric and service check emitted by this instance.
    ##
    ## Learn more about tagging at https://docs.datadoghq.com/tagging
    #
    # tags:
    #   - <KEY_1>:<VALUE_1>
    #   - <KEY_2>:<VALUE_2>

    ## @param service - string - optional
    ## Attach the tag `service:<SERVICE>` to every metric, event, and service check emitted by this integration.
    ##
    ## Overrides any `service` defined in the `init_config` section.
    #
    # service: <SERVICE>

    ## @param min_collection_interval - number - optional - default: 15
    ## This changes the collection interval of the check. For more information, see:
    #
    # min_collection_interval: 15

    ## @param empty_default_hostname - boolean - optional - default: false
    ## This forces the check to send metrics with no hostname.
    ##
    ## This is useful for cluster-level checks.
    #
    # empty_default_hostname: false

    ## @param metric_patterns - mapping - optional
    ## A mapping of metrics to include or exclude, with each entry being a regular expression.
    ##
    ## Metrics defined in `exclude` will take precedence in case of overlap.
    #
    # metric_patterns:
    #   include:
    #   - <INCLUDE_REGEX>
    #   exclude:
    #   - <EXCLUDE_REGEX>

## Log Section
##
## type - required - Type of log input source (tcp / udp / file / windows_event).
## port / path / channel_path - required - Set port if type is tcp or udp.
##                                         Set path if type is file.
##                                         Set channel_path if type is windows_event.
## source  - required - Attribute that defines which integration sent the logs.
## encoding - optional - For file specifies the file encoding. Default is utf-8. Other
##                       possible values are utf-16-le and utf-16-be.
## service - optional - The name of the service that generates the log.
##                      Overrides any `service` defined in the `init_config` section.
## tags - optional - Add tags to the collected logs.
##
## Discover Datadog log collection: https://docs.datadoghq.com/logs/log_collection/
#
# logs:
#   - type: file
#     path: /var/log/mail.log
#     source: postfix
