## All options defined here are available to all instances.
#
init_config:

  ## @param is_jmx - boolean - required
  ## Whether or not this file is a configuration for a JMX integration.
  #
  is_jmx: true

  ## @param collect_default_metrics - boolean - required
  ## Whether or not the check should collect all default metrics.
  #
  collect_default_metrics: true

  ## @param service_check_prefix - string - optional
  ## Custom service check prefix. e.g. `my_prefix` to get a service check called `my_prefix.can_connect`.
  ## If not set, the default service check used is the integration name.
  #
  # service_check_prefix: <SERVICE_CHECK_PREFIX>

  ## @param conf - list of mappings - optional
  ## The list of metrics to be collected by the integration
  ## Read http://docs.datadoghq.com/integrations/java/ to learn how to customize it
  ## The default metrics to be collected are kept in metrics.yaml, but you can still
  ## add your own metrics here.
  #
  # conf:
  #   - include:
  #       bean: <BEAN_NAME>
  #       attribute:
  #         MyAttribute:
  #           alias: my.metric.name
  #           metric_type: gauge

  ## @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 independent of the others.
#
instances:

  ## @param host - string - required
  ## Tomcat JMX hostname to connect to.
  #
  - host: localhost

    ## @param port - integer - required
    ## Tomcat JMX port to connect to.
    #
    port: 9012

    ## @param user - string - optional
    ## User to use when connecting to JMX.
    #
    # user: <USER>

    ## @param password - string - optional
    ## Password to use when connecting to JMX.
    #
    # password: <PASSWORD>

    ## @param process_name_regex - string - optional
    ## Instead of using a host and port, the Agent can connect using the attach API.
    ## This requires the JDK to be installed and the path to tools.jar to be set below.
    ## Note: It needs to be set when process_name_regex parameter is set
    ## e.g. .*process_name.*
    #
    # process_name_regex: <PROCESS_NAME_REGEX>

    ## @param tools_jar_path - string - optional
    ## The tool.jar path to be used with the `process_name_regex` parameter,
    ## for example: /usr/lib/jvm/java-7-openjdk-amd64/lib/tools.jar
    #
    # tools_jar_path: <TOOLS_JAR_PATH>

    ## @param name - string - optional
    ## Set the instance name to be used as the `instance` tag.
    #
    # name: <NAME>

    ## @param java_bin_path - string - optional
    ## `java_bin_path` should be set if the Agent cannot find your java executable.
    #
    # java_bin_path: <JAVA_BIN_PATH>

    ## @param java_options - string - optional
    ## A list of Java JVM options, for example: "-Xmx200m -Xms50m".
    #
    # java_options: <JAVA_OPTIONS>

    ## @param trust_store_path - string - optional
    ## The path to your trusted store.
    ## `trust_store_path` should be set if SSL is enabled.
    #
    # trust_store_path: <TRUST_STORE_PATH>

    ## @param trust_store_password - string - optional
    ## The password for your TrustStore.jks file.
    ## `trust_store_password` should be set if SSL is enabled.
    #
    # trust_store_password: <TRUST_STORE_PASSWORD>

    ## @param key_store_path - string - optional
    ## The path to your key store.
    ## `key_store_path` should be set if client authentication is enabled on the target JVM.
    #
    # key_store_path: <KEY_STORE_PATH>

    ## @param key_store_password - string - optional
    ## The password to your key store.
    ## `key_store_password` should be set if client authentication is enabled on the target JVM.
    #
    # key_store_password: <KEY_STORE_PASSWORD>

    ## @param rmi_registry_ssl - boolean - optional - default: false
    ## Whether or not the Agent should connect to the RMI registry using SSL.
    #
    # rmi_registry_ssl: false

    ## @param rmi_connection_timeout - number - optional - default: 20000
    ## The connection timeout, in milliseconds, when connecting to a remote JVM.
    #
    # rmi_connection_timeout: 20000

    ## @param rmi_client_timeout - number - optional - default: 15000
    ## The timeout to consider a remote connection, already successfully established, as lost.
    ## If a connected remote JVM does not reply after `rmi_client_timeout` milliseconds jmxfetch
    ## will give up on that connection and retry.
    #
    # rmi_client_timeout: 15000

    ## @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:
    ## https://docs.datadoghq.com/developers/write_agent_check/#collection-interval
    #
    # 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

## 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.
## service - required - 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/tomcat/*.log
#     source: tomcat
#     service: <SERVICE_NAME>
