Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ steps:
depends_on:
- Lint


---
kind: pipeline
type: docker
Expand Down Expand Up @@ -113,6 +114,7 @@ steps:
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- docker buildx create --name multiarch --driver docker-container --use
- export RELEASE_TAG=${DRONE_TAG}
- export IMAGE_BRANCH_TAG=${DRONE_BRANCH}
- make DRONE=true CROSS_BUILD=true BUILD_IN_CONTAINER=true RELEASE_BUILD=true agent-image
- make DRONE=true CROSS_BUILD=true BUILD_IN_CONTAINER=true RELEASE_BUILD=true agentctl-image
- make DRONE=true CROSS_BUILD=true BUILD_IN_CONTAINER=true RELEASE_BUILD=true agent-operator-image
Expand Down Expand Up @@ -240,6 +242,6 @@ get:
name: pat
---
kind: signature
hmac: c32fd61018bef3703edb694acd0c7312be8cb07898c2cb42eb0e84fee84efb67
hmac: 11038ae4592a13955388dff643b35bb1f07e53a659cdca946e863c9f2ac77066

...
5 changes: 3 additions & 2 deletions .github/depcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
# obtained from the listing in go.mod.
go_modules:
- github.com/cortexproject/cortex
- github.com/drone/envsubst/v2
- github.com/grafana/loki
- github.com/prometheus-community/elasticsearch_exporter
- github.com/oliver006/redis_exporter
- github.com/prometheus-community/elasticsearch_exporter
- github.com/prometheus/consul_exporter
- github.com/prometheus/memcached_exporter
- github.com/prometheus/node_exporter
- github.com/prometheus/statsd_exporter
- github.com/weaveworks/common
- github.com/drone/envsubst/v2
- go.opentelemetry.io/collector
- sigs.k8s.io/controller-runtime

Expand Down
143 changes: 0 additions & 143 deletions .github/workflows/force_release.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/.pkg
/.cache
/.vscode
/vendor
vendor

/cmd/agent/agent
/cmd/agentctl/agentctl
Expand Down
51 changes: 48 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Main (unreleased)

# v0.22.0 (2022-01-13)

This release has deprecations. Please read [DEPRECATION] entries and consult
the [upgrade guide](https://github.com/grafana/agent/blob/main/docs/upgrade-guide/_index.md)
for detailed information.

- [FEATURE] (beta) Enable experimental config urls for fetching remote configs. Currently,
only HTTP/S is supported. Pass the `-enable-features=remote-configs` flag to turn this on. (@rlankfo)

Expand All @@ -9,6 +15,11 @@

- [FEATURE] Traces: Support jaeger/grpc exporter (@nicoche)

- [FEATURE] (beta) Enable an experimental integrations subsystem revamp. Pass
`integrations-next` to `-enable-features` to turn this on. Reading the
documentation for the revamp is recommended; enabling it causes breaking
config changes. (@rfratto)

- [ENHANCEMENT] Traces: Improved pod association in PromSD processor (@mapno)

- [ENHANCEMENT] Updated OTel to v0.40.0 (@mapno)
Expand All @@ -17,18 +28,52 @@

- [ENHANCEMENT] Remote write dashboard: add mean latency (@bboreham)

- [ENHANCEMENT] Update node_exporter dependency to v1.3.1. (@rfratto)

- [ENHANCEMENT] Cherry-pick Prometheus PR #10102 into our Prometheus dependency (@rfratto).

- [BUGFIX] Fix usage of POSTGRES_EXPORTER_DATA_SOURCE_NAME when using postgres_exporter integration (@f11r)

- [BUGFIX] Change ordering of the entrypoint for windows service so that it accepts commands immediately (@mattdurham)

- [BUGFIX] Only stop WAL cleaner when it has been started (@56quarters)

- [BUGFIX] Fix issue with unquoted install path on Windows, that could allow escalation or running an arbitrary executable (@mattdurham)

- [CHANGE] Remove log-level flag from systemd unit file (@jpkrohling)
- [BUGFIX] Fix issue with unquoted install path on Windows, that could allow escalation or running an arbitrary executable (@mattdurham)

- [BUGFIX] Fix cAdvisor so it collects all defined metrics instead of the last (@pkoenig10)

- [BUGFIX] Fix panic when using 'stdout' in automatic logging (@mapno)

- [BUGFIX] Grafana Agent Operator: The /-/ready and /-/healthy endpoints will
no longer always return 404 (@rfratto).

- [DEPRECATION] The node_exporter integration's `netdev_device_whitelist` field
is deprecated in favor of `netdev_device_include`. Support for the old field
name will be removed in a future version. (@rfratto)

- [DEPRECATION] The node_exporter integration's `netdev_device_blacklist` field
is deprecated in favor of `netdev_device_include`. Support for the old field
name will be removed in a future version. (@rfratto)

- [DEPRECATION] The node_exporter integration's `systemd_unit_whitelist` field
is deprecated in favor of `systemd_unit_include`. Support for the old field
name will be removed in a future version. (@rfratto)

- [DEPRECATION] The node_exporter integration's `systemd_unit_blacklist` field
is deprecated in favor of `systemd_unit_exclude`. Support for the old field
name will be removed in a future version. (@rfratto)

- [DEPRECATION] The node_exporter integration's
`filesystem_ignored_mount_points` field is deprecated in favor of
`filesystem_mount_points_exclude`. Support for the old field name will be
removed in a future version. (@rfratto)

- [DEPRECATION] The node_exporter integration's `filesystem_ignored_fs_types`
field is deprecated in favor of `filesystem_fs_types_exclude`. Support for
the old field name will be removed in a future version. (@rfratto)

- [CHANGE] Remove log-level flag from systemd unit file (@jpkrohling)

# v0.21.2 (2021-12-08)

- [SECURITY] This release contains a fix for
Expand Down
20 changes: 14 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ SHELL = /usr/bin/env bash

# Docker image info
IMAGE_PREFIX ?= grafana
IMAGE_BRANCH_TAG ?= main
ifeq ($(RELEASE_TAG),)
IMAGE_TAG ?= $(shell ./tools/image-tag)
# If RELEASE_TAG has a valid value it will be the same as IMAGE_TAG
# If it does not then we should use the IMAGE_TAG
RELEASE_TAG = $(IMAGE_TAG)
else
IMAGE_TAG ?= $(RELEASE_TAG)
IMAGE_BRANCH_TAG = latest
endif
DRONE ?= false

Expand Down Expand Up @@ -199,13 +201,13 @@ cmd/grafana-agent-crow/grafana-agent-crow: cmd/grafana-agent-crow/main.go
$(NETGO_CHECK)

agent-image:
$(docker-build) -t $(IMAGE_PREFIX)/agent:latest -t $(IMAGE_PREFIX)/agent:$(IMAGE_TAG) -f cmd/agent/$(DOCKERFILE) .
$(docker-build) -t $(IMAGE_PREFIX)/agent:$(IMAGE_BRANCH_TAG) -t $(IMAGE_PREFIX)/agent:$(IMAGE_TAG) -f cmd/agent/$(DOCKERFILE) .
agentctl-image:
$(docker-build) -t $(IMAGE_PREFIX)/agentctl:latest -t $(IMAGE_PREFIX)/agentctl:$(IMAGE_TAG) -f cmd/agentctl/$(DOCKERFILE) .
$(docker-build) -t $(IMAGE_PREFIX)/agentctl:$(IMAGE_BRANCH_TAG) -t $(IMAGE_PREFIX)/agentctl:$(IMAGE_TAG) -f cmd/agentctl/$(DOCKERFILE) .
agent-operator-image:
$(docker-build) -t $(IMAGE_PREFIX)/agent-operator:latest -t $(IMAGE_PREFIX)/agent-operator:$(IMAGE_TAG) -f cmd/agent-operator/$(DOCKERFILE) .
$(docker-build) -t $(IMAGE_PREFIX)/agent-operator:$(IMAGE_BRANCH_TAG) -t $(IMAGE_PREFIX)/agent-operator:$(IMAGE_TAG) -f cmd/agent-operator/$(DOCKERFILE) .
grafana-agent-crow-image:
$(docker-build) -t $(IMAGE_PREFIX)/agent-crow:latest -t $(IMAGE_PREFIX)/agent-crow:$(IMAGE_TAG) -f cmd/grafana-agent-crow/$(DOCKERFILE) .
$(docker-build) -t $(IMAGE_PREFIX)/agent-crow:$(IMAGE_BRANCH_TAG) -t $(IMAGE_PREFIX)/agent-crow:$(IMAGE_TAG) -f cmd/grafana-agent-crow/$(DOCKERFILE) .

install:
CGO_ENABLED=1 go install $(CGO_FLAGS) ./cmd/agent
Expand All @@ -229,6 +231,12 @@ test:
CGO_ENABLED=1 go test $(CGO_FLAGS) -tags=has_network -race -cover -coverprofile=cover.out -p=4 ./...
CGO_ENABLED=1 go test $(CGO_FLAGS) -tags=has_network -cover -coverprofile=cover-norace.out -p=4 ./pkg/integrations/node_exporter ./pkg/logs

e2e/lint:
$(MAKE) -C e2e lint

e2e/test:
$(MAKE) -C e2e test

clean:
rm -rf cmd/agent/agent
go clean ./...
Expand All @@ -237,8 +245,8 @@ example-kubernetes:
cd production/kubernetes/build && bash build.sh

example-dashboards:
cd example/docker-compose/grafana/dashboards && \
jsonnet template.jsonnet -J ../../vendor -m .
cd example/docker-compose && jb install && \
cd grafana/dashboards && jsonnet template.jsonnet -J ../../vendor -m .

#############
# Releasing #
Expand Down
8 changes: 8 additions & 0 deletions cmd/agent-operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/grafana/agent/pkg/operator/logutil"
"github.com/prometheus/common/version"
controller "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/healthz"

// Needed for clients.
_ "k8s.io/client-go/plugin/pkg/client/auth"
Expand All @@ -33,6 +34,13 @@ func main() {
os.Exit(1)
}

if err := m.AddReadyzCheck("running", healthz.Ping); err != nil {
level.Warn(logger).Log("msg", "failed to set up 'running' readyz check", "err", err)
}
if err := m.AddHealthzCheck("running", healthz.Ping); err != nil {
level.Warn(logger).Log("msg", "failed to set up 'running' healthz check", "err", err)
}

if err := operator.New(logger, cfg, m); err != nil {
level.Error(logger).Log("msg", "unable to create operator", "err", err)
os.Exit(1)
Expand Down
2 changes: 1 addition & 1 deletion cmd/agent/DEVELOPERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ before releasing the Grafana Agent.

#### Prerelease testing

For testing a release, run the [K3d example](../example/k3d/README.md) locally.
For testing a release, run the [K3d example](../../example/k3d/README.md) locally.
Let it run for about 90 minutes, keeping an occasional eye on the Agent
Operational dashboard (noting that metrics from the scraping service will take
time to show up). After 90 minutes, if nothing has crashed and you see metrics
Expand Down
Loading