-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Weifeng Wang <[email protected]> agent set clustering = true Signed-off-by: Weifeng Wang <[email protected]>
- Loading branch information
Showing
11 changed files
with
93 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
docker-compose/common/config/agent-flow/modules/docker/integrations/all.river
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
Module: integrations-all | ||
Description: Wrapper module to include all Docker containers metric modules | ||
*/ | ||
argument "forward_to" { | ||
comment = "Must be a list(MetricssReceiver) where collected metrics should be forwarded to" | ||
} | ||
|
||
argument "scrape_interval" { | ||
comment = "How often to scrape metrics from the targets (default: 60s)" | ||
optional = true | ||
} | ||
|
||
argument "scrape_timeout" { | ||
comment = "How long before a scrape times out (default: 10s)" | ||
optional = true | ||
} | ||
|
||
prometheus.exporter.unix "peu_unix" { | ||
set_collectors = ["cpu"] | ||
disable_collectors = ["diskstats", "mdadm", "textfile", "hwmon"] | ||
} | ||
|
||
prometheus.exporter.memcached "pem_memcached" { | ||
address = "memcached:11211" | ||
timeout = "5s" | ||
} | ||
|
||
/******************************************** | ||
* Prometheus Scrape Job | ||
********************************************/ | ||
prometheus.scrape "ps_integrations" { | ||
targets = concat( | ||
prometheus.exporter.unix.peu_unix.targets, | ||
) | ||
//prometheus.exporter.memcached.pem_memcached.targets, | ||
|
||
enable_protobuf_negotiation = true | ||
scrape_classic_histograms = true | ||
|
||
scrape_interval = coalesce(argument.scrape_interval.value, "60s") | ||
scrape_timeout = coalesce(argument.scrape_timeout.value, "10s") | ||
|
||
clustering { | ||
enabled = true | ||
} | ||
|
||
forward_to = [prometheus.relabel.pr_integrations.receiver] | ||
} | ||
|
||
prometheus.relabel "pr_integrations" { | ||
forward_to = argument.forward_to.value | ||
|
||
rule { | ||
source_labels = ["job"] | ||
regex = "integrations/(.*)" | ||
target_label = "pod" | ||
replacement = "${2}" | ||
} | ||
|
||
rule { | ||
source_labels = ["job"] | ||
regex = "integrations/(.*)" | ||
target_label = "container" | ||
replacement = "${2}" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters