Skip to content

Commit

Permalink
Fix test cases; update READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
markbastiaans committed Jan 14, 2021
1 parent 5fa37c1 commit b29e1c1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,11 @@ Please note that AppDynamics requires Mendix 6.2 or higher.
### Datadog
The Datadog integration features a limited Datadog Agent installation included in the [official Datadog Cloud Foundry Buildpack](https://github.com/DataDog/datadog-cloudfoundry-buildpack). [PostgreSQL metrics](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/postgresql) and [application metrics](https://docs.mendix.com/developerportal/operate/datadog-metrics) are scraped with an included [Telegraf agent](https://docs.influxdata.com/telegraf/) and sent directly to Datadog via the Datadog API. [JMX metrics](https://docs.datadoghq.com/integrations/java/) and [APM traces](https://docs.datadoghq.com/tracing/setup_overview/setup/java/) are retrieved using the Datadog Java trace agent.
The Datadog integration features a limited Datadog Agent installation included in the [official Datadog Cloud Foundry Buildpack](https://github.com/DataDog/datadog-cloudfoundry-buildpack). The following information is collected:
* [Application metrics](https://docs.mendix.com/developerportal/operate/datadog-metrics) are collected by the Datadog IoT agent.
* [JMX metrics](https://docs.datadoghq.com/integrations/java/) and [APM traces](https://docs.datadoghq.com/tracing/setup_overview/setup/java/) are retrieved using the Datadog Java trace agent and collected by the Datadog agent.
* [PostgreSQL metrics](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/postgresql) are collected by an included [Telegraf agent](https://docs.influxdata.com/telegraf/) and sent directly to Datadog via the Datadog API.
To enable Datadog, configure the following environment variables:
Expand All @@ -390,6 +394,8 @@ To enable Datadog, configure the following environment variables:
| `DD_API_KEY` | The Datadog API key. Can can be configured in the `Integrations -> API` screen of the user interface for your Datadog organization. |
| `DD_LOG_LEVEL` | Ensures that log messages are sent to Datadog. A safe level would be `INFO` , but it can be later adjusted to different levels: `CRITICAL` , `ERROR` , `WARNING` , or `DEBUG` . |
If you're using a Datadog EU organization, you should also set the `DD_SITE` environment variable accordingly.

Additionally, the following integration-specific variables are available:
| Environment Variable | Default Value | Description |
|-|-|-|
Expand All @@ -398,7 +404,7 @@ Additionally, the following integration-specific variables are available:

To receive metrics from the runtime, the Mendix Java Agent is added to the runtime as Java agent. This agent can be configured by passing a JSON in the environment variable `METRICS_AGENT_CONFIG` as described in [Datadog for v4 Mendix Cloud](https://docs.mendix.com/developerportal/operate/datadog-metrics).

Please note that Datadog integration **requires Mendix 7.14 or higher**. If an older version is used, then a warning will be displayed in the logs and the Datadog integration will not be enabled.
Please note that application metric collection **requires Mendix 7.14 or higher**.

#### Presets

Expand All @@ -413,14 +419,14 @@ Additionally, we configure the following Datadog environment variables for you:
| Environment Variable | Value | Can Be Overridden? | Description |
|-|-|-|-|
| `DD_HOSTNAME` | `<app>-<env>.mendixcloud.com-<instance>` | No | Human-readable host name for your application |
| `DD_JMXFETCH_ENABLED` | `false` | No | Disables Datadog Java Trace Agent JMX metrics fetching, since this is already handled by the Mendix Runtime. |
| `DD_JMXFETCH_ENABLED` | `true` | No | Enables Datadog Java Trace Agent JMX metrics fetching |
| `DD_LOGS_ENABLED` | `true` | No | Enables sending your application logs directly to Datadog |
| `DD_SERVICE_MAPPING` | `<database>:<app>.db` | No | Links your database to your app in Datadog APM. Is only set when `DD_TRACE_ENABLED` is set to `true` . |
| `DD_SERVICE_MAPPING` | `<database>:<app>.db` | No | Links your database to your app in Datadog APM |
| `DD_SERVICE_NAME` | `<app>` | No | Defaults to your application name as described before. Is only set when `DD_TRACE_ENABLED` is set to `true` . |
| `DD_TAGS` | `tag1:value1,...:...` | No | Derived from the runtime settings in Mendix Public Cloud or the `TAGS` environment variable |
| `DD_TRACE_ENABLED` | `false` | Yes | Disables Datadog APM by default. **Enabling Datadog APM is experimental and enables the [Datadog Java Trace Agent](https://docs.datadoghq.com/tracing/setup/java/) tracing functionality.** |
| `DD_TRACE_ENABLED` | `false` | Yes | Disables Datadog APM by default. **Enabling Datadog APM is experimental and enables tracing via the [Datadog Java Trace Agent](https://docs.datadoghq.com/tracing/setup/java/) tracing functionality.** |

The `DD_LOG_FILE`, `DD_PROCESS_CONFIG_LOG_FILE` and `DD_DOGSTATSD_PORT` environment variables are also configured specifically with buildpack-specific system values. Other environment variables can be set as per the [Datadog Agent documentation](https://docs.datadoghq.com/agent/).
Other environment variables can be set as per the [Datadog Agent documentation](https://docs.datadoghq.com/agent/).

### Dynatrace

Expand Down
4 changes: 3 additions & 1 deletion tests/integration/test_datadog.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ def _test_datadog_running(self, mda_file):
# Validate Telegraf and Datadog are running and have expected ports open
# Telegraf
self.assert_running("telegraf")
self.assert_string_not_in_recent_logs("E!")
self.assert_string_not_in_recent_logs(
"E! [inputs.postgresql_extensible]"
)
# Agent: 18125
self.assert_listening_on_port(datadog.get_statsd_port(), "agent")
# Trace Agent: 8126
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/test_telegraf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ def test_telegraf_running(self):
self.start_container()
self.assert_app_running()
self.assert_listening_on_port(telegraf.get_statsd_port(), "telegraf")
self.assert_string_not_in_recent_logs("E!")
self.assert_string_not_in_recent_logs("E! [inputs.postgresql]")
self.assert_string_not_in_recent_logs("E! [processors.")

0 comments on commit b29e1c1

Please sign in to comment.