mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
Merge pull request #98793 from flokli/dd-site
nixos/datadog: Don't recommend dd_url for sites, add proper option
This commit is contained in:
commit
ecad9348f6
1 changed files with 18 additions and 8 deletions
|
@ -6,7 +6,6 @@ let
|
||||||
cfg = config.services.datadog-agent;
|
cfg = config.services.datadog-agent;
|
||||||
|
|
||||||
ddConf = {
|
ddConf = {
|
||||||
dd_url = cfg.ddUrl;
|
|
||||||
skip_ssl_validation = false;
|
skip_ssl_validation = false;
|
||||||
confd_path = "/etc/datadog-agent/conf.d";
|
confd_path = "/etc/datadog-agent/conf.d";
|
||||||
additional_checksd = "/etc/datadog-agent/checks.d";
|
additional_checksd = "/etc/datadog-agent/checks.d";
|
||||||
|
@ -14,6 +13,8 @@ let
|
||||||
}
|
}
|
||||||
// optionalAttrs (cfg.logLevel != null) { log_level = cfg.logLevel; }
|
// optionalAttrs (cfg.logLevel != null) { log_level = cfg.logLevel; }
|
||||||
// optionalAttrs (cfg.hostname != null) { inherit (cfg) hostname; }
|
// 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.tags != null ) { tags = concatStringsSep ", " cfg.tags; }
|
||||||
// optionalAttrs (cfg.enableLiveProcessCollection) { process_config = { enabled = "true"; }; }
|
// optionalAttrs (cfg.enableLiveProcessCollection) { process_config = { enabled = "true"; }; }
|
||||||
// optionalAttrs (cfg.enableTraceAgent) { apm_config = { enabled = true; }; }
|
// optionalAttrs (cfg.enableTraceAgent) { apm_config = { enabled = true; }; }
|
||||||
|
@ -79,14 +80,23 @@ in {
|
||||||
|
|
||||||
ddUrl = mkOption {
|
ddUrl = mkOption {
|
||||||
description = ''
|
description = ''
|
||||||
Custom dd_url to configure the agent with.
|
Custom dd_url to configure the agent with. Useful if traffic to datadog
|
||||||
Useful when you want to point datadog to another endpoint, either
|
needs to go through a proxy.
|
||||||
because you need a proxy to send out data, or because you use their EU
|
Don't use this to point to another datadog site (EU) - use site instead.
|
||||||
endpoint.
|
|
||||||
'';
|
'';
|
||||||
default = "https://app.datadoghq.com";
|
default = null;
|
||||||
example = "https://app.datadoghq.eu";
|
example = "http://haproxy.example.com:3834";
|
||||||
type = types.str;
|
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 {
|
tags = mkOption {
|
||||||
|
|
Loading…
Reference in a new issue