Skip to content

Commit

Permalink
Standardize default scrape interval to 1m (grafana#939)
Browse files Browse the repository at this point in the history
* Set default scrape_interval to 1m

* Add envsubst to drone

* Update changelog
  • Loading branch information
mattdurham committed Sep 27, 2021
1 parent cefcbcb commit 52c55ae
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ steps:
- apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release
- curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
- add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian buster stable"
- apt-get update && apt-get install -y rubygems rpm nsis docker-ce docker-ce-cli containerd.io
- apt-get update && apt-get install -y rubygems rpm nsis docker-ce docker-ce-cli containerd.io envsubst
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
- gem install --no-document fpm
- mkdir -p /usr/local/go/bin
Expand All @@ -174,6 +174,6 @@ volumes:
path: /var/run/docker.sock
---
kind: signature
hmac: cc7f41904fd7d2422d034650f4445f681a19d68a85062297d30c972cf4deff76
hmac: 1c517e225e5c4e218528072d5772a15d1e084e46cd773a71fc7573b6484d8fcd

...
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ consult the
[upgrade guide](https://github.com/grafana/agent/blob/main/docs/upgrade-guide/_index.md)
for specific instructions.

- [ENHANCEMENT] Update jsonnet-libs to 1.21 for Kubernetes 1.21+ compatability. (@MurzNN)

- [FEATURE] Added [Github exporter](https://github.com/infinityworks/github-exporter) integration. (@rgeyer)

- [FEATURE] Add TLS config options for tempo `remote_write`s. (@mapno)
Expand All @@ -31,6 +29,8 @@ for specific instructions.
- [ENHANCEMENT] Add HOSTNAME environment variable to service file to allow for expanding
the $HOSTNAME variable in agent config. (@dfrankel33)

- [ENHANCEMENT] Update jsonnet-libs to 1.21 for Kubernetes 1.21+ compatability. (@MurzNN)

- [BUGFIX] Regex capture groups like `${1}` will now be kept intact when
using `-config.expand-env`. (@rfratto)

Expand Down Expand Up @@ -58,6 +58,8 @@ for specific instructions.

- [BUGFIX] Fix warn-level logging of dropped targets. (@james-callahan)

- [BUGFIX] Standardize scrape_interval to 1m in examples. (@mattdurham)

- [CHANGE] Breaking change: reduced verbosity of tracing autologging
by not logging `STATUS_CODE_UNSET` status codes. (@mapno)

Expand Down
2 changes: 1 addition & 1 deletion cmd/agent/agent-local-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ server:

prometheus:
global:
scrape_interval: 5s
scrape_interval: 1m
configs:
- name: test
host_filter: false
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/create-config-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ server:
prometheus:
global:
scrape_interval: 5s
scrape_interval: 1m
configs:
- name: agent
scrape_configs:
Expand Down Expand Up @@ -138,7 +138,7 @@ server:
prometheus:
global:
scrape_interval: 5s
scrape_interval: 1m
remote_write:
- url: http://localhost:9009/api/prom/push
configs:
Expand Down
2 changes: 1 addition & 1 deletion docs/scraping-service/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ server:
prometheus:
global:
scrape_interval: 5s
scrape_interval: 1m
scraping_service:
enabled: true
kvstore:
Expand Down
2 changes: 1 addition & 1 deletion example/docker-compose/agent/config/agent-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ server:
prometheus:
wal_directory: /tmp/agent
global:
scrape_interval: 5s
scrape_interval: 1m
remote_write:
- url: http://localhost:9009/api/prom/push
configs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ server:

prometheus:
global:
scrape_interval: 5s
scrape_interval: 1m
scraping_service:
enabled: true
kvstore:
Expand Down
2 changes: 1 addition & 1 deletion example/docker-compose/agent/config/agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ server:

prometheus:
global:
scrape_interval: 30s
scrape_interval: 1m
configs:
- name: test
host_filter: false
Expand Down
2 changes: 1 addition & 1 deletion example/k3d/environment/main.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ local images = {
grafana_agent.withPrometheusConfig({
wal_directory: '/var/lib/agent/data',
global: {
scrape_interval: '15s',
scrape_interval: '1m',
external_labels: {
cluster: cluster_label,
},
Expand Down
4 changes: 2 additions & 2 deletions example/k3d/smoke/main.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ local smoke = {

prometheus: {
global: {
scrape_interval: '15s',
scrape_interval: '1m',
external_labels: {
cluster: 'grafana-agent',
},
Expand Down Expand Up @@ -142,7 +142,7 @@ local smoke = {

prometheus: {
global: {
scrape_interval: '15s',
scrape_interval: '1m',
external_labels: {
cluster: 'grafana-agent-cluster',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local agent_prometheus = import 'grafana-agent/v1/lib/prometheus.libsonnet';
{
config: {
global: {
scrape_interval: '15s',
scrape_interval: '1m',
},
scrape_configs: agent_prometheus.scrapeInstanceKubernetes.scrape_configs,
},
Expand Down
2 changes: 1 addition & 1 deletion packaging/grafana-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ server:

prometheus:
global:
scrape_interval: 15s
scrape_interval: 1m
wal_directory: '/var/lib/grafana-agent'
configs:
# Example Prometheus scrape configuration to scrape the agent itself for metrics.
Expand Down
2 changes: 1 addition & 1 deletion packaging/windows/install_script.nsis
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Function WriteConfig
FileWrite $9 `prometheus:$\n`
FileWrite $9 ` wal_directory: $APPDATA\grafana-agent-wal$\n`
FileWrite $9 ` global:$\n`
FileWrite $9 ` scrape_interval: 15s$\n`
FileWrite $9 ` scrape_interval: 1m$\n`
FileWrite $9 ` configs:$\n`
FileWrite $9 ` - name: integrations$\n`
${If} $EnableExporterValue == "true"
Expand Down
2 changes: 1 addition & 1 deletion production/tanka/grafana-agent/config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ local k8s_v2 = import './v2/internal/helpers/k8s.libsonnet';

prometheus: {
global: {
scrape_interval: '15s',
scrape_interval: '1m',
},

wal_directory: $._config.agent_wal_dir,
Expand Down

0 comments on commit 52c55ae

Please sign in to comment.