diff --git a/activemq_xml/README.md b/activemq_xml/README.md index efa11612ff139..3a9c273edf970 100644 --- a/activemq_xml/README.md +++ b/activemq_xml/README.md @@ -30,6 +30,30 @@ To configure this check for an Agent running on a host: 2. [Restart the Agent][117]. +##### Log collection + +1. Collecting logs is disabled by default in the Datadog Agent, enable it in your `datadog.yaml` file: + + ```yaml + logs_enabled: true + ``` + +2. Add this configuration block to your `activemq_xml.d/conf.yaml` or `activemq.d/conf.yaml` file to start collecting your ActiveMQ logs: + + ```yaml + logs: + - type: file + path: "/data/activemq.log" + source: activemq + service: "" + - type: file + path: "/data/audit.log" + source: activemq + service: "" + ``` + +3. [Restart the Agent][7]. + diff --git a/activemq_xml/assets/configuration/spec.yaml b/activemq_xml/assets/configuration/spec.yaml index 52d93b15eeb1b..580cbade0a8bb 100644 --- a/activemq_xml/assets/configuration/spec.yaml +++ b/activemq_xml/assets/configuration/spec.yaml @@ -50,3 +50,13 @@ files: example: [, ] - template: instances/http - template: instances/default + - template: logs + example: + - type: file + path: /data/activemq.log + source: activemq + service: + - type: file + path: /data/audit.log + source: activemq + service: diff --git a/activemq_xml/datadog_checks/activemq_xml/data/conf.yaml.example b/activemq_xml/datadog_checks/activemq_xml/data/conf.yaml.example index 5d9e8943bafd2..db2340c09d0fd 100644 --- a/activemq_xml/datadog_checks/activemq_xml/data/conf.yaml.example +++ b/activemq_xml/datadog_checks/activemq_xml/data/conf.yaml.example @@ -385,3 +385,28 @@ instances: ## 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. +## 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: /data/activemq.log +# source: activemq +# service: +# - type: file +# path: /data/audit.log +# source: activemq +# service: diff --git a/activemq_xml/manifest.json b/activemq_xml/manifest.json index cc720bf44508c..1381926ed8522 100644 --- a/activemq_xml/manifest.json +++ b/activemq_xml/manifest.json @@ -1,6 +1,7 @@ { "categories": [ "processing", + "log collection", "messaging", "autodiscovery" ],