diff options
author | Florian Klink <flokli@flokli.de> | 2020-09-25 22:06:38 +0200 |
---|---|---|
committer | Florian Klink <flokli@flokli.de> | 2020-09-25 22:30:55 +0200 |
commit | 8d52cf501f0796294b30ddf17f5b0ea8ccb8918b (patch) | |
tree | 124db3f4bd36b131b4cdec326f854419fc50795b /nixos | |
parent | a0563ded10c8ce20921d0abc7273395b656f185d (diff) |
nixos/datadog: Don't recommend dd_url for sites, add proper option
Turns out, `dd_url` should only be used in proxy scenarios, not to point datadog to their EU endpoint - `site` should be used for that. The `dd_url` setting doesn't affect APM, Logs or Live Process intake which have their own "*_dd_url" settings.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/monitoring/datadog-agent.nix | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/nixos/modules/services/monitoring/datadog-agent.nix b/nixos/modules/services/monitoring/datadog-agent.nix index 673bc7b02b268..d97565f15d6ce 100644 --- a/nixos/modules/services/monitoring/datadog-agent.nix +++ b/nixos/modules/services/monitoring/datadog-agent.nix @@ -6,7 +6,6 @@ let cfg = config.services.datadog-agent; ddConf = { - dd_url = cfg.ddUrl; skip_ssl_validation = false; confd_path = "/etc/datadog-agent/conf.d"; additional_checksd = "/etc/datadog-agent/checks.d"; @@ -14,6 +13,8 @@ let } // optionalAttrs (cfg.logLevel != null) { log_level = cfg.logLevel; } // optionalAttrs (cfg.hostname != null) { inherit (cfg) hostname; } + // optionalAttrs (cfg.ddUrl != null) { dd_url = cfg.ddUrl; } + // optionalAttrs (cfg.site != null) { site = cfg.site; } // optionalAttrs (cfg.tags != null ) { tags = concatStringsSep ", " cfg.tags; } // optionalAttrs (cfg.enableLiveProcessCollection) { process_config = { enabled = "true"; }; } // optionalAttrs (cfg.enableTraceAgent) { apm_config = { enabled = true; }; } @@ -79,14 +80,23 @@ in { ddUrl = mkOption { description = '' - Custom dd_url to configure the agent with. - Useful when you want to point datadog to another endpoint, either - because you need a proxy to send out data, or because you use their EU - endpoint. + Custom dd_url to configure the agent with. Useful if traffic to datadog + needs to go through a proxy. + Don't use this to point to another datadog site (EU) - use site instead. ''; - default = "https://app.datadoghq.com"; - example = "https://app.datadoghq.eu"; - type = types.str; + default = null; + example = "http://haproxy.example.com:3834"; + type = types.nullOr types.str; + }; + + site = mkOption { + description = '' + The datadog site to point the agent towards. + Set to datadoghq.eu to point it to their EU site. + ''; + default = null; + example = "datadoghq.eu"; + type = types.nullOr types.str; }; tags = mkOption { |