forked from grafana/agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge main into dev.multiple-integrations (grafana#1184)
* Fix typo (grafana#1141) * Traces: Improved pod association in PromSD processor (grafana#1137) * Improve k8s pod association * Add tests * Changelog * typo * Add prom_sd_pod_association * Extend tests for pod associations * Docs for pod association config * Lint fixes * Move to unreleased * Add instrumentation recommendations * Remove uncessary constants * Improve tests * remote config with http(s) provider (grafana#1143) * sample remote config code with http provider * use t.TempDir() in unit test * no need to clean up after T.TempDir() * use NewClientFromConfig and make caller responsible for calling SetDirectory * handle nil HTTPClientConfig * remove blank identifier assignment * pass basic auth command line flags for remote config * address pr nits * add expiremental flag * set loader inline * update changelog * add remote config section in docs * pr comment updates * announce patch releases for cve-2021-41090 (grafana#1152) * Merge patch release to main (grafana#1153) * Add secret type to sensitive values * Break out config tests to their own implementation. Also remove username has a sensitive value. * Update changelog * Fix failing test * Scrub secrets when marshaling instance configs * update for v0.21 * Updated changes from the merge. * Remove changelog * Scrub out receivers has ***receivers_scrubber***:null * obscure etcd/consul credentials * Update pkg/traces/config_test.go Co-authored-by: Robert Fratto <robert.fratto@grafana.com> * Update pkg/config/config.go * go fmt * Change to using custom object and return <secret> * Fix bad merge * [v0.21.2] toggle config endpoint (#19) * disable /-/config endpoint by default * disable scraping api get endpoint as well * fix new test * add test and rename flag Co-authored-by: Robert Fratto <robertfratto@gmail.com> * Update version to v0.21.2 * Update defaults.go * fix /-/config endpoint * also fix non-pointer config bug * temporarily disable linting for release * fix lint errors Co-authored-by: Matt Durham <mattdurham@ppog.org> Co-authored-by: Robert Lankford <robert.lankford@grafana.com> * Fix POSTGRES_EXPORTER_DATA_SOURCE_NAME usage for postgres_exporter (grafana#1162) * Fix POSTGRES_EXPORTER_DATA_SOURCE_NAME usage for postgres_exporter A recent change broke the usage of POSTGRES_EXPORTER_DATA_SOURCE_NAME for the postgres_exporter. As the incorrect variable was checked in the if clause, it always raises an error. * changelog: keep feature -> enhancement -> bugfix order * postgres_exporter: add regression test Co-authored-by: f11r <f11r@users.noreply.github.com> Co-authored-by: Robert Fratto <robertfratto@gmail.com> * Fix syntax error in Jsonnet logs helper method (grafana#1174) Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com> * cAdvisor Integration (grafana#1081) * Add cadvisor module * Begin creating common config for cadvisor * Don't export internal state * Finish config options for cadvisor * Set config options, and implement cAdvisor collectors * Linting * Buildflags for cadvisor only in linux * I R LEArN Build Tags * Don't zero value the zero value * Offload sketchy global var manipulation to the integrations Run func * Remove unused collectors * Lint * Create generic stub integration and use it for cadvisor * Lint * Final refactor of cAdvisor config for unsupported platforms. Pared down stub integrations. * Lint * Docs for cadvisor config * Update changelog * Update pkg/integrations/stub_integration.go Co-authored-by: Robert Fratto <robert.fratto@grafana.com> * Reorder changelog * Instance key clarity * Inclusive naming * Finish name changes Keep default disable metric list in sync with upstream Idiomatic golang * Hardcode disabled metrics for cadvisor Co-authored-by: Robert Fratto <robert.fratto@grafana.com> * Remove log-level flag from systemd unit file (grafana#1177) * Upgrade to OTel v0.40.0 (grafana#1176) * Upgrade to OTel v0.40.0 * Changelog * Add factories check * go mod tidy * config/features: create package to standardize experimental features (grafana#1170) * config/features: create package to standardize experiemental features This commit introduces a new package, pkg/config/features, which allows defining a set of features and validating whether flags associated with those features are allowed to be set. Closes grafana#1163 * update documentation (also s/enabled-features/enable-features) * Fix typo * Update pkg/config/features/features.go Co-authored-by: Robert Lankford <rlankfo@gmail.com> Co-authored-by: Robert Lankford <rlankfo@gmail.com> * enable cadvisor by default * switch to using real feature flag * fix postgres_exporter Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com> Co-authored-by: Mario <mariorvinas@gmail.com> Co-authored-by: Robert Lankford <robert.lankford@grafana.com> Co-authored-by: Matt Durham <mattdurham@ppog.org> Co-authored-by: f11r <fiete.gruenter@rwth-aachen.de> Co-authored-by: f11r <f11r@users.noreply.github.com> Co-authored-by: Nick Pillitteri <56quarters@users.noreply.github.com> Co-authored-by: Ryan Geyer <me@ryangeyer.com> Co-authored-by: Juraci Paixão Kröhling <juraci.github@kroehling.de> Co-authored-by: Robert Lankford <rlankfo@gmail.com>
- Loading branch information
1 parent
5de23d3
commit ad76ec5
Showing
74 changed files
with
2,229 additions
and
346 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
+++ | ||
title = "cadvisor_config" | ||
+++ | ||
|
||
# cadvisor_config | ||
|
||
The `cadvisor_config` block configures the `cadvisor` integration, | ||
which is an embedded version of | ||
[`cadvisor`](https://github.com/google/cadvisor). This allows for the collection of container utilization metrics. | ||
|
||
The cAdvisor integration requires some broad privileged permissions to the host. Without these permissions the metrics will not be accessible. This means that the agent must *also* have those elevated permissions. | ||
|
||
A good example of the required file, and system permissions can be found in the docker run command published in the [cAdvisor docs](https://github.com/google/cadvisor#quick-start-running-cadvisor-in-a-docker-container). | ||
|
||
Full reference of options: | ||
|
||
```yaml | ||
# Enables the cadvisor integration, allowing the Agent to automatically | ||
# collect metrics for the specified github objects. | ||
# | ||
# Enabled is DEPRECATED and will be removed in a future release. To disable | ||
# an integration, comment it out or remove it from your config instead of | ||
# setting `enabled: false`. | ||
[enabled: <boolean> | default = true] | ||
|
||
# Sets an explicit value for the instance label when the integration is | ||
# self-scraped. Overrides inferred values. | ||
[instance: <string> | default = <integrations_config.instance>] | ||
|
||
# Automatically collect metrics from this integration. If disabled, | ||
# the cadvisor integration will be run but not scraped and thus not | ||
# remote-written. Metrics for the integration will be exposed at | ||
# /integrations/cadvisor/metrics and can be scraped by an external | ||
# process. | ||
[scrape_integration: <boolean> | default = <integrations_config.scrape_integrations>] | ||
|
||
# How often should the metrics be collected? Defaults to | ||
# prometheus.global.scrape_interval. | ||
[scrape_interval: <duration> | default = <global_config.scrape_interval>] | ||
|
||
# The timeout before considering the scrape a failure. Defaults to | ||
# prometheus.global.scrape_timeout. | ||
[scrape_timeout: <duration> | default = <global_config.scrape_timeout>] | ||
|
||
# Allows for relabeling labels on the target. | ||
relabel_configs: | ||
[- <relabel_config> ... ] | ||
|
||
# Relabel metrics coming from the integration, allowing to drop series | ||
# from the integration that you don't care about. | ||
metric_relabel_configs: | ||
[ - <relabel_config> ... ] | ||
|
||
# How frequent to truncate the WAL for this integration. | ||
[wal_truncate_frequency: <duration> | default = "60m"] | ||
|
||
# | ||
# cAdvisor-specific configuration options | ||
# | ||
|
||
# Convert container labels and environment variables into labels on prometheus metrics for each container. If false, then only metrics exported are container name, first alias, and image name. | ||
[store_container_labels: <boolean> | default = true] | ||
|
||
# List of container labels to be converted to labels on prometheus metrics for each container. store_container_labels must be set to false for this to take effect. | ||
allowlisted_container_labels: | ||
[ - <string> ] | ||
|
||
# List of environment variable keys matched with specified prefix that needs to be collected for containers, only support containerd and docker runtime for now. | ||
env_metadata_allowlist: | ||
[ - <string> ] | ||
|
||
# List of cgroup path prefix that needs to be collected even when docker_only is specified. | ||
raw_cgroup_prefix_allowlist: | ||
[ - <string> ] | ||
|
||
# Path to a JSON file containing configuration of perf events to measure. Empty value disabled perf events measuring. | ||
[perf_events_config: <boolean>] | ||
|
||
# resctrl mon groups updating interval. Zero value disables updating mon groups. | ||
[resctrl_interval: <int> | default = 0] | ||
|
||
# List of `metrics` to be disabled. | ||
disabled_metrics: | ||
[ - <string> ] | ||
|
||
# List of `metrics` to be enabled. If set, overrides disabled_metrics | ||
enabled_metrics: | ||
[ - <string> ] | ||
|
||
# Length of time to keep data stored in memory | ||
[storage_duration: <duration> | default = "2m"] | ||
|
||
# Containerd endpoint | ||
[containerd: <string> | default = "/run/containerd/containerd.sock"] | ||
|
||
# Containerd namespace | ||
[containerd_namespace: <string> | default = "k8s.io"] | ||
|
||
# Docker endpoint | ||
[docker: <string> | default = "unix:///var/run/docker.sock"] | ||
|
||
# Use TLS to connect to docker | ||
[docker_tls: <boolean> | default = false] | ||
|
||
# Path to client certificate for TLS connection to docker | ||
[docker_tls_cert: <string> | default = "cert.pem"] | ||
|
||
# Path to private key for TLS connection to docker | ||
[docker_tls_key: <string> | default = "key.pem"] | ||
|
||
# Path to a trusted CA for TLS connection to docker | ||
[docker_tls_ca: <string> | default = "ca.pem"] | ||
|
||
# Only report docker containers in addition to root stats | ||
[docker_only: <boolean> | default = false] | ||
``` |
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
Oops, something went wrong.