From 9154af36520ee2ff4f368daa62f883504d67ac82 Mon Sep 17 00:00:00 2001 From: Robert Fratto Date: Thu, 29 Feb 2024 14:14:01 -0500 Subject: [PATCH 01/47] changelog: cut 0.40.1 (#6568) --- CHANGELOG.md | 3 +++ docs/sources/_index.md | 2 +- internal/static/operator/defaults.go | 2 +- tools/gen-versioned-files/agent-version.txt | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c268fc70b..93b0a46fc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,9 @@ Main (unreleased) - A new `loki.rules.kubernetes` component that discovers `PrometheusRule` Kubernetes resources and loads them into a Loki Ruler instance. (@EStork09) +v0.40.1 (2024-02-27) +-------------------- + ### Bugfixes - Fix an issues where the logging config block would trigger an error when trying to send logs to components that were not running. (@wildum) diff --git a/docs/sources/_index.md b/docs/sources/_index.md index 605655ef6a..556ea167a7 100644 --- a/docs/sources/_index.md +++ b/docs/sources/_index.md @@ -9,7 +9,7 @@ title: Grafana Agent description: Grafana Agent is a flexible, performant, vendor-neutral, telemetry collector weight: 350 cascade: - AGENT_RELEASE: v0.40.0 + AGENT_RELEASE: v0.40.1 OTEL_VERSION: v0.87.0 --- diff --git a/internal/static/operator/defaults.go b/internal/static/operator/defaults.go index d62a46a1ec..e985937bb3 100644 --- a/internal/static/operator/defaults.go +++ b/internal/static/operator/defaults.go @@ -2,7 +2,7 @@ package operator // Supported versions of the Grafana Agent. var ( - DefaultAgentVersion = "v0.40.0" + DefaultAgentVersion = "v0.40.1" DefaultAgentBaseImage = "grafana/agent" DefaultAgentImage = DefaultAgentBaseImage + ":" + DefaultAgentVersion ) diff --git a/tools/gen-versioned-files/agent-version.txt b/tools/gen-versioned-files/agent-version.txt index dbccec6e08..01437515a7 100644 --- a/tools/gen-versioned-files/agent-version.txt +++ b/tools/gen-versioned-files/agent-version.txt @@ -1 +1 @@ -v0.40.0 \ No newline at end of file +v0.40.1 From 0a46ba1bcb0fc6dbad37212b78b0223540523085 Mon Sep 17 00:00:00 2001 From: Erik Baranowski <39704712+erikbaranowski@users.noreply.github.com> Date: Thu, 29 Feb 2024 14:14:49 -0500 Subject: [PATCH 02/47] Update build image to include and nsis plugin (#6567) Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> --- build-image/Dockerfile | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/build-image/Dockerfile b/build-image/Dockerfile index 602e7cbd1a..8e2500f704 100644 --- a/build-image/Dockerfile +++ b/build-image/Dockerfile @@ -26,6 +26,13 @@ RUN apk add --no-cache docker-cli docker-cli-buildx FROM alpine:3.17 as helm RUN apk add --no-cache helm +# Dependency: nsis (for building Windows installers) +FROM alpine:3.17 as nsis +RUN wget -nv https://nsis.sourceforge.io/mediawiki/images/4/4a/AccessControl.zip \ + && unzip AccessControl.zip -d /usr/share/nsis/ \ + && mkdir -p /usr/share/nsis/Plugins/x86-unicode \ + && cp /usr/share/nsis/Plugins/i386-unicode/AccessControl.dll /usr/share/nsis/Plugins/x86-unicode/ + # Dependency: Go and Go dependencies FROM ${GO_RUNTIME} as golang @@ -86,12 +93,13 @@ RUN apt-get update \ && gem install --no-document fpm \ && rm -rf /var/lib/apt/lists/* -COPY --from=golangci /bin/golangci-lint /usr/local/bin -COPY --from=docker /usr/bin/docker /usr/bin/docker -COPY --from=docker /usr/libexec/docker/cli-plugins /usr/libexec/docker/cli-plugins -COPY --from=helm /usr/bin/helm /usr/bin/helm -COPY --from=golang /usr/local/go /usr/local/go -COPY --from=golang /go/bin /go/bin +COPY --from=golangci /bin/golangci-lint /usr/local/bin +COPY --from=docker /usr/bin/docker /usr/bin/docker +COPY --from=docker /usr/libexec/docker/cli-plugins /usr/libexec/docker/cli-plugins +COPY --from=helm /usr/bin/helm /usr/bin/helm +COPY --from=nsis /usr/share/nsis/Plugins/x86-unicode /usr/share/nsis/Plugins/x86-unicode +COPY --from=golang /usr/local/go /usr/local/go +COPY --from=golang /go/bin /go/bin # Git tries to prevent misuse of repositories (CVE-2022-24765), but we don't # care about this for build containers, where it's expected that the repository From 9e4d3b500932fd0992252f1a9ad52b53715ab56e Mon Sep 17 00:00:00 2001 From: Erik Baranowski <39704712+erikbaranowski@users.noreply.github.com> Date: Thu, 29 Feb 2024 15:02:56 -0500 Subject: [PATCH 03/47] Set permissions on the Grafana Agent [Flow] folder... (#6540) * Set permissions on the folder when installing via the windows installer rather than relying on the parent folder permissions. Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> --------- Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> --- .drone/drone.yml | 118 +++++++++--------- CHANGELOG.md | 3 + cmd/grafana-agent-operator/Dockerfile | 2 +- cmd/grafana-agent/Dockerfile | 2 +- cmd/grafana-agent/Dockerfile.windows | 2 +- cmd/grafana-agentctl/Dockerfile | 2 +- cmd/grafana-agentctl/Dockerfile.windows | 2 +- .../windows/install_script.nsis | 15 +++ .../grafana-agent/windows/install_script.nsis | 15 +++ tools/make/build-container.mk | 2 +- tools/make/packaging.mk | 4 +- 11 files changed, 100 insertions(+), 67 deletions(-) diff --git a/.drone/drone.yml b/.drone/drone.yml index 1070b7e0be..c0005abace 100644 --- a/.drone/drone.yml +++ b/.drone/drone.yml @@ -110,7 +110,7 @@ steps: - commands: - apt-get update -y && apt-get install -y libsystemd-dev - make lint - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Lint trigger: event: @@ -128,7 +128,7 @@ steps: - ERR_MSG="Dashboard definitions are out of date. Please run 'make generate-dashboards' and commit changes!" - if [ ! -z "$(git status --porcelain)" ]; then echo $ERR_MSG >&2; exit 1; fi - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Regenerate dashboards trigger: event: @@ -146,7 +146,7 @@ steps: - ERR_MSG="Custom Resource Definitions are out of date. Please run 'make generate-crds' and commit changes!" - if [ ! -z "$(git status --porcelain)" ]; then echo $ERR_MSG >&2; exit 1; fi - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Regenerate crds trigger: event: @@ -161,7 +161,7 @@ platform: steps: - commands: - make GO_TAGS="nodocker" test - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Run Go tests trigger: event: @@ -176,7 +176,7 @@ platform: steps: - commands: - K8S_USE_DOCKER_NETWORK=1 make test - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Run Go tests volumes: - name: docker @@ -199,7 +199,7 @@ platform: steps: - commands: - go test -tags="nodocker,nonetwork" ./... - image: grafana/agent-build-image:0.32.0-windows + image: grafana/agent-build-image:0.33.0-windows name: Run Go tests trigger: ref: @@ -214,7 +214,7 @@ platform: steps: - commands: - make agent-image - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build container volumes: - name: docker @@ -239,7 +239,7 @@ platform: steps: - commands: - make agentctl-image - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build container volumes: - name: docker @@ -264,7 +264,7 @@ platform: steps: - commands: - make operator-image - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build container volumes: - name: docker @@ -290,7 +290,7 @@ platform: steps: - commands: - '& "C:/Program Files/git/bin/bash.exe" ./tools/ci/docker-containers-windows agent' - image: grafana/agent-build-image:0.32.0-windows + image: grafana/agent-build-image:0.33.0-windows name: Build container volumes: - name: docker @@ -316,7 +316,7 @@ platform: steps: - commands: - '& "C:/Program Files/git/bin/bash.exe" ./tools/ci/docker-containers-windows agentctl' - image: grafana/agent-build-image:0.32.0-windows + image: grafana/agent-build-image:0.33.0-windows name: Build container volumes: - name: docker @@ -343,7 +343,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=amd64 GOARM= make agent - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -360,7 +360,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=arm64 GOARM= make agent - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -377,7 +377,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=ppc64le GOARM= make agent - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -394,7 +394,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=s390x GOARM= make agent - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -410,7 +410,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=amd64 GOARM= make agent - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -426,7 +426,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=arm64 GOARM= make agent - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -442,7 +442,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=windows GOARCH=amd64 GOARM= make agent - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -458,7 +458,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=freebsd GOARCH=amd64 GOARM= make agent - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -475,7 +475,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=amd64 GOARM= make agent-flow - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -492,7 +492,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=arm64 GOARM= make agent-flow - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -509,7 +509,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=ppc64le GOARM= make agent-flow - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -526,7 +526,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=s390x GOARM= make agent-flow - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -542,7 +542,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=amd64 GOARM= make agent-flow - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -558,7 +558,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=arm64 GOARM= make agent-flow - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -574,7 +574,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=windows GOARCH=amd64 GOARM= make agent-flow - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -590,7 +590,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=freebsd GOARCH=amd64 GOARM= make agent-flow - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -607,7 +607,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=amd64 GOARM= make agentctl - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -624,7 +624,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=arm64 GOARM= make agentctl - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -641,7 +641,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=ppc64le GOARM= make agentctl - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -658,7 +658,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=s390x GOARM= make agentctl - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -674,7 +674,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=amd64 GOARM= make agentctl - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -690,7 +690,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=arm64 GOARM= make agentctl - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -706,7 +706,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=windows GOARCH=amd64 GOARM= make agentctl - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -722,7 +722,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=freebsd GOARCH=amd64 GOARM= make agentctl - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -739,7 +739,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=amd64 GOARM= make operator - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -756,7 +756,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=arm64 GOARM= make operator - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -773,7 +773,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=ppc64le GOARM= make operator - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -790,7 +790,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=s390x GOARM= make operator - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -806,7 +806,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=amd64 GOARM= make operator - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -822,7 +822,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=arm64 GOARM= make operator - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -838,7 +838,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=windows GOARCH=amd64 GOARM= make operator - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -854,7 +854,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=freebsd GOARCH=amd64 GOARM= make operator - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -871,7 +871,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=amd64 GOARM= GOEXPERIMENT=boringcrypto make agent-boringcrypto - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -888,7 +888,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=arm64 GOARM= GOEXPERIMENT=boringcrypto make agent-boringcrypto - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Build trigger: event: @@ -905,7 +905,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets" GOOS=windows GOARCH=amd64 GOARM= GOEXPERIMENT=cngcrypto make agent-flow-windows-boringcrypto - image: grafana/agent-build-image:0.32.0-boringcrypto + image: grafana/agent-build-image:0.33.0-boringcrypto name: Build trigger: event: @@ -921,7 +921,7 @@ steps: - commands: - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes failure: ignore - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Configure QEMU volumes: - name: docker @@ -941,7 +941,7 @@ steps: from_secret: docker_password GCR_CREDS: from_secret: gcr_admin - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Publish container volumes: - name: docker @@ -965,7 +965,7 @@ steps: - commands: - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes failure: ignore - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Configure QEMU volumes: - name: docker @@ -985,7 +985,7 @@ steps: from_secret: docker_password GCR_CREDS: from_secret: gcr_admin - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Publish container volumes: - name: docker @@ -1009,7 +1009,7 @@ steps: - commands: - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes failure: ignore - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Configure QEMU volumes: - name: docker @@ -1029,7 +1029,7 @@ steps: from_secret: docker_password GCR_CREDS: from_secret: gcr_admin - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Publish container volumes: - name: docker @@ -1053,7 +1053,7 @@ steps: - commands: - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes failure: ignore - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Configure QEMU volumes: - name: docker @@ -1073,7 +1073,7 @@ steps: from_secret: docker_password GCR_CREDS: from_secret: gcr_admin - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Publish container volumes: - name: docker @@ -1102,7 +1102,7 @@ steps: from_secret: docker_login DOCKER_PASSWORD: from_secret: docker_password - image: grafana/agent-build-image:0.32.0-windows + image: grafana/agent-build-image:0.33.0-windows name: Build containers volumes: - name: docker @@ -1131,7 +1131,7 @@ steps: from_secret: docker_login DOCKER_PASSWORD: from_secret: docker_password - image: grafana/agent-build-image:0.32.0-windows + image: grafana/agent-build-image:0.33.0-windows name: Build containers volumes: - name: docker @@ -1248,7 +1248,7 @@ steps: from_secret: gpg_private_key GPG_PUBLIC_KEY: from_secret: gpg_public_key - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Publish release volumes: - name: docker @@ -1273,7 +1273,7 @@ steps: - DOCKER_OPTS="" make dist/grafana-agentctl-linux-amd64 - DOCKER_OPTS="" make dist.temp/grafana-agent-flow-linux-amd64 - DOCKER_OPTS="" make test-packages - image: grafana/agent-build-image:0.32.0 + image: grafana/agent-build-image:0.33.0 name: Test Linux system packages volumes: - name: docker @@ -1369,6 +1369,6 @@ kind: secret name: updater_private_key --- kind: signature -hmac: de5b1d2ea6f503ff78e6ed296cde31239b68c60c75b443cf0f06610a79013682 +hmac: 516cf024f67438d4e3b473cfebc9472b33132bfd92883b858e4a64c7959b7dbe ... diff --git a/CHANGELOG.md b/CHANGELOG.md index 93b0a46fc9..d85189e3e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,9 @@ v0.40.1 (2024-02-27) ### Bugfixes +- Set permissions on the `Grafana Agent [Flow]` folder when installing via the + windows installer rather than relying on the parent folder permissions. (@erikbaranowski) + - Fix an issues where the logging config block would trigger an error when trying to send logs to components that were not running. (@wildum) - Fix an issue where a custom component might be wired to a local declare instead of an import declare when they have the same label. (@wildum) diff --git a/cmd/grafana-agent-operator/Dockerfile b/cmd/grafana-agent-operator/Dockerfile index 3759851610..6090efd568 100644 --- a/cmd/grafana-agent-operator/Dockerfile +++ b/cmd/grafana-agent-operator/Dockerfile @@ -4,7 +4,7 @@ # default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set # in environment variables. -FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.32.0 as build +FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.33.0 as build ARG BUILDPLATFORM ARG TARGETPLATFORM ARG TARGETOS diff --git a/cmd/grafana-agent/Dockerfile b/cmd/grafana-agent/Dockerfile index 9fcdce56b6..f602125dfb 100644 --- a/cmd/grafana-agent/Dockerfile +++ b/cmd/grafana-agent/Dockerfile @@ -4,7 +4,7 @@ # default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set # in environment variables. -FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.32.0 as build +FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.33.0 as build ARG BUILDPLATFORM ARG TARGETPLATFORM ARG TARGETOS diff --git a/cmd/grafana-agent/Dockerfile.windows b/cmd/grafana-agent/Dockerfile.windows index 48b40c3d15..6f99a6138f 100644 --- a/cmd/grafana-agent/Dockerfile.windows +++ b/cmd/grafana-agent/Dockerfile.windows @@ -1,4 +1,4 @@ -FROM grafana/agent-build-image:0.32.0-windows as builder +FROM grafana/agent-build-image:0.33.0-windows as builder ARG VERSION ARG RELEASE_BUILD=1 diff --git a/cmd/grafana-agentctl/Dockerfile b/cmd/grafana-agentctl/Dockerfile index a96ac1a6a8..6f601fb7ee 100644 --- a/cmd/grafana-agentctl/Dockerfile +++ b/cmd/grafana-agentctl/Dockerfile @@ -4,7 +4,7 @@ # default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set # in environment variables. -FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.32.0 as build +FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.33.0 as build ARG BUILDPLATFORM ARG TARGETPLATFORM ARG TARGETOS diff --git a/cmd/grafana-agentctl/Dockerfile.windows b/cmd/grafana-agentctl/Dockerfile.windows index 5345428ce4..8cf3c34a0a 100644 --- a/cmd/grafana-agentctl/Dockerfile.windows +++ b/cmd/grafana-agentctl/Dockerfile.windows @@ -1,4 +1,4 @@ -FROM grafana/agent-build-image:0.32.0-windows as builder +FROM grafana/agent-build-image:0.33.0-windows as builder ARG VERSION ARG RELEASE_BUILD=1 diff --git a/packaging/grafana-agent-flow/windows/install_script.nsis b/packaging/grafana-agent-flow/windows/install_script.nsis index 5e253890c2..a1cd586c2a 100644 --- a/packaging/grafana-agent-flow/windows/install_script.nsis +++ b/packaging/grafana-agent-flow/windows/install_script.nsis @@ -101,6 +101,8 @@ Section "install" # Auto-restart agent on failure. Reset failure counter after 60 seconds without failure nsExec::ExecToLog `sc failure "Grafana Agent Flow" reset= 60 actions= restart/5000 reboot= "Grafana Agent Flow has failed. Restarting in 5 seconds"` Pop $0 + + Call SetFolderPermissions SectionEnd Function CreateConfig @@ -164,6 +166,19 @@ Function InitializeRegistry Return FunctionEnd +Function SetFolderPermissions + # Set permissions on the install directory + SetOutPath $INSTDIR + AccessControl::DisableFileInheritance $INSTDIR + AccessControl::SetFileOwner $INSTDIR "Administrators" + AccessControl::ClearOnFile $INSTDIR "Administrators" "FullAccess" + AccessControl::SetOnFile $INSTDIR "SYSTEM" "FullAccess" + AccessControl::GrantOnFile $INSTDIR "Everyone" "ListDirectory" + AccessControl::GrantOnFile $INSTDIR "Everyone" "GenericExecute" + AccessControl::GrantOnFile $INSTDIR "Everyone" "GenericRead" + AccessControl::GrantOnFile $INSTDIR "Everyone" "ReadAttributes" +FunctionEnd + # Automatically called when uninstalling. Function un.onInit SetShellVarContext all diff --git a/packaging/grafana-agent/windows/install_script.nsis b/packaging/grafana-agent/windows/install_script.nsis index a39ec0d4dc..264222c2d2 100644 --- a/packaging/grafana-agent/windows/install_script.nsis +++ b/packaging/grafana-agent/windows/install_script.nsis @@ -155,6 +155,8 @@ Function Install # Auto-restart agent on failure. Reset failure counter after 60 seconds without failure nsExec::ExecToLog `sc failure "Grafana Agent" reset= 60 actions= restart/5000 reboot= "Grafana Agent has failed. Restarting in 5 seconds"` Pop $0 + + Call SetFolderPermissions FunctionEnd Function WriteConfig @@ -189,6 +191,19 @@ Function WriteConfig Return FunctionEnd +Function SetFolderPermissions + # Set permissions on the install directory + SetOutPath $INSTDIR + AccessControl::DisableFileInheritance $INSTDIR + AccessControl::SetFileOwner $INSTDIR "Administrators" + AccessControl::ClearOnFile $INSTDIR "Administrators" "FullAccess" + AccessControl::SetOnFile $INSTDIR "SYSTEM" "FullAccess" + AccessControl::GrantOnFile $INSTDIR "Everyone" "ListDirectory" + AccessControl::GrantOnFile $INSTDIR "Everyone" "GenericExecute" + AccessControl::GrantOnFile $INSTDIR "Everyone" "GenericRead" + AccessControl::GrantOnFile $INSTDIR "Everyone" "ReadAttributes" +FunctionEnd + # Uninstaller Function un.onInit SetShellVarContext all diff --git a/tools/make/build-container.mk b/tools/make/build-container.mk index 22a502e4d9..409d284e1f 100644 --- a/tools/make/build-container.mk +++ b/tools/make/build-container.mk @@ -34,7 +34,7 @@ # variable names should be passed through to the container. USE_CONTAINER ?= 0 -BUILD_IMAGE_VERSION ?= 0.32.0 +BUILD_IMAGE_VERSION ?= 0.33.0 BUILD_IMAGE ?= grafana/agent-build-image:$(BUILD_IMAGE_VERSION) DOCKER_OPTS ?= -it diff --git a/tools/make/packaging.mk b/tools/make/packaging.mk index 18c8569c4f..47dbd80b79 100644 --- a/tools/make/packaging.mk +++ b/tools/make/packaging.mk @@ -400,7 +400,7 @@ ifeq ($(USE_CONTAINER),1) else cp ./dist/grafana-agent-windows-amd64.exe ./packaging/grafana-agent/windows cp LICENSE ./packaging/grafana-agent/windows - # quotes around mkdir are manadory. ref: https://github.com/grafana/agent/pull/5664#discussion_r1378796371 + # quotes around mkdir are mandatory. ref: https://github.com/grafana/agent/pull/5664#discussion_r1378796371 "mkdir" -p dist makensis -V4 -DVERSION=$(VERSION) -DOUT="../../../dist/grafana-agent-installer.exe" ./packaging/grafana-agent/windows/install_script.nsis endif @@ -410,7 +410,7 @@ dist-agent-flow-installer: dist.temp/grafana-agent-flow-windows-amd64.exe dist.t ifeq ($(USE_CONTAINER),1) $(RERUN_IN_CONTAINER) else - # quotes around mkdir are manadory. ref: https://github.com/grafana/agent/pull/5664#discussion_r1378796371 + # quotes around mkdir are mandatory. ref: https://github.com/grafana/agent/pull/5664#discussion_r1378796371 "mkdir" -p dist makensis -V4 -DVERSION=$(VERSION) -DOUT="../../../dist/grafana-agent-flow-installer.exe" ./packaging/grafana-agent-flow/windows/install_script.nsis endif From 3278e4186ed670f3ba28a83ddf713c9f78358479 Mon Sep 17 00:00:00 2001 From: Robert Fratto Date: Thu, 29 Feb 2024 15:13:44 -0500 Subject: [PATCH 04/47] helm: bump helm chart to use v0.40.1 (#6572) --- operations/helm/charts/grafana-agent/CHANGELOG.md | 8 +++++++- operations/helm/charts/grafana-agent/Chart.yaml | 4 ++-- operations/helm/charts/grafana-agent/README.md | 2 +- .../grafana-agent/templates/controllers/daemonset.yaml | 2 +- .../grafana-agent/templates/controllers/statefulset.yaml | 2 +- .../grafana-agent/templates/controllers/daemonset.yaml | 2 +- .../grafana-agent/templates/controllers/daemonset.yaml | 2 +- .../grafana-agent/templates/controllers/daemonset.yaml | 2 +- .../grafana-agent/templates/controllers/deployment.yaml | 2 +- .../grafana-agent/templates/controllers/deployment.yaml | 2 +- .../grafana-agent/templates/controllers/statefulset.yaml | 2 +- .../grafana-agent/templates/controllers/statefulset.yaml | 2 +- .../grafana-agent/templates/controllers/daemonset.yaml | 2 +- .../grafana-agent/templates/controllers/daemonset.yaml | 2 +- .../grafana-agent/templates/controllers/daemonset.yaml | 2 +- .../grafana-agent/templates/controllers/daemonset.yaml | 2 +- .../grafana-agent/templates/controllers/daemonset.yaml | 2 +- .../grafana-agent/templates/controllers/daemonset.yaml | 2 +- .../grafana-agent/templates/controllers/daemonset.yaml | 2 +- .../grafana-agent/templates/controllers/daemonset.yaml | 2 +- .../grafana-agent/templates/controllers/daemonset.yaml | 2 +- .../grafana-agent/templates/controllers/daemonset.yaml | 2 +- .../grafana-agent/templates/controllers/daemonset.yaml | 2 +- .../grafana-agent/templates/controllers/daemonset.yaml | 2 +- .../grafana-agent/templates/controllers/daemonset.yaml | 2 +- .../grafana-agent/templates/controllers/daemonset.yaml | 2 +- .../grafana-agent/templates/controllers/daemonset.yaml | 2 +- .../grafana-agent/templates/controllers/daemonset.yaml | 2 +- .../grafana-agent/templates/controllers/daemonset.yaml | 2 +- .../grafana-agent/templates/controllers/daemonset.yaml | 2 +- .../grafana-agent/templates/controllers/deployment.yaml | 2 +- 31 files changed, 38 insertions(+), 32 deletions(-) diff --git a/operations/helm/charts/grafana-agent/CHANGELOG.md b/operations/helm/charts/grafana-agent/CHANGELOG.md index b747fb625d..009f7aaab8 100644 --- a/operations/helm/charts/grafana-agent/CHANGELOG.md +++ b/operations/helm/charts/grafana-agent/CHANGELOG.md @@ -10,6 +10,13 @@ internal API changes are not present. Unreleased ---------- +0.35.0 (2024-02-27) +------------------- + +### Enhancements + +- Update Grafana Agent version to v0.40.1. (@rfratto) + 0.34.0 (2024-02-27) ------------------- @@ -17,7 +24,6 @@ Unreleased - Update Grafana Agent version to v0.40.0. (@jcreixell) - 0.33.0 (2024-02-20) ------------------- diff --git a/operations/helm/charts/grafana-agent/Chart.yaml b/operations/helm/charts/grafana-agent/Chart.yaml index 28931463ad..3719a56ee0 100644 --- a/operations/helm/charts/grafana-agent/Chart.yaml +++ b/operations/helm/charts/grafana-agent/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: grafana-agent description: 'Grafana Agent' type: application -version: 0.34.0 -appVersion: 'v0.40.0' +version: 0.35.0 +appVersion: 'v0.40.1' dependencies: - name: crds diff --git a/operations/helm/charts/grafana-agent/README.md b/operations/helm/charts/grafana-agent/README.md index 398bbc5047..a2e6d01835 100644 --- a/operations/helm/charts/grafana-agent/README.md +++ b/operations/helm/charts/grafana-agent/README.md @@ -1,6 +1,6 @@ # Grafana Agent Helm chart -![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.34.0](https://img.shields.io/badge/Version-0.34.0-informational?style=flat-square) ![AppVersion: v0.40.0](https://img.shields.io/badge/AppVersion-v0.40.0-informational?style=flat-square) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.35.0](https://img.shields.io/badge/Version-0.35.0-informational?style=flat-square) ![AppVersion: v0.40.1](https://img.shields.io/badge/AppVersion-v0.40.1-informational?style=flat-square) Helm chart for deploying [Grafana Agent][] to Kubernetes. diff --git a/operations/helm/tests/additional-serviceaccount-label/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/additional-serviceaccount-label/grafana-agent/templates/controllers/daemonset.yaml index 4e845f3b96..e1133e107e 100644 --- a/operations/helm/tests/additional-serviceaccount-label/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/additional-serviceaccount-label/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/clustering/grafana-agent/templates/controllers/statefulset.yaml b/operations/helm/tests/clustering/grafana-agent/templates/controllers/statefulset.yaml index 2a8bd8003f..8ef0fc598e 100644 --- a/operations/helm/tests/clustering/grafana-agent/templates/controllers/statefulset.yaml +++ b/operations/helm/tests/clustering/grafana-agent/templates/controllers/statefulset.yaml @@ -30,7 +30,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/controller-volumes-extra/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/controller-volumes-extra/grafana-agent/templates/controllers/daemonset.yaml index 691e99eec6..4f100297ac 100644 --- a/operations/helm/tests/controller-volumes-extra/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/controller-volumes-extra/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/create-daemonset-hostnetwork/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/create-daemonset-hostnetwork/grafana-agent/templates/controllers/daemonset.yaml index 98941f0501..dbbf2e389a 100644 --- a/operations/helm/tests/create-daemonset-hostnetwork/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/create-daemonset-hostnetwork/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/create-daemonset/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/create-daemonset/grafana-agent/templates/controllers/daemonset.yaml index 4e845f3b96..e1133e107e 100644 --- a/operations/helm/tests/create-daemonset/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/create-daemonset/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/controllers/deployment.yaml b/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/controllers/deployment.yaml index 36f626d99a..211500239d 100644 --- a/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/controllers/deployment.yaml +++ b/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/controllers/deployment.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/create-deployment/grafana-agent/templates/controllers/deployment.yaml b/operations/helm/tests/create-deployment/grafana-agent/templates/controllers/deployment.yaml index 295169981e..577de8eaba 100644 --- a/operations/helm/tests/create-deployment/grafana-agent/templates/controllers/deployment.yaml +++ b/operations/helm/tests/create-deployment/grafana-agent/templates/controllers/deployment.yaml @@ -28,7 +28,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/controllers/statefulset.yaml b/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/controllers/statefulset.yaml index 593704ecb2..c802531899 100644 --- a/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/controllers/statefulset.yaml +++ b/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/controllers/statefulset.yaml @@ -29,7 +29,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/create-statefulset/grafana-agent/templates/controllers/statefulset.yaml b/operations/helm/tests/create-statefulset/grafana-agent/templates/controllers/statefulset.yaml index ddc8c7ea43..37ec2269ee 100644 --- a/operations/helm/tests/create-statefulset/grafana-agent/templates/controllers/statefulset.yaml +++ b/operations/helm/tests/create-statefulset/grafana-agent/templates/controllers/statefulset.yaml @@ -30,7 +30,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/custom-config/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/custom-config/grafana-agent/templates/controllers/daemonset.yaml index 4e845f3b96..e1133e107e 100644 --- a/operations/helm/tests/custom-config/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/custom-config/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/default-values/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/default-values/grafana-agent/templates/controllers/daemonset.yaml index 4e845f3b96..e1133e107e 100644 --- a/operations/helm/tests/default-values/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/default-values/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/controllers/daemonset.yaml index 52affb4758..9e1a171b16 100644 --- a/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/controllers/daemonset.yaml index 4e845f3b96..e1133e107e 100644 --- a/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/envFrom/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/envFrom/grafana-agent/templates/controllers/daemonset.yaml index 9ed3a27054..d041375a53 100644 --- a/operations/helm/tests/envFrom/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/envFrom/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/existing-config/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/existing-config/grafana-agent/templates/controllers/daemonset.yaml index f6f1c39a4a..c0d0123a66 100644 --- a/operations/helm/tests/existing-config/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/existing-config/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/extra-env/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/extra-env/grafana-agent/templates/controllers/daemonset.yaml index 46b51f3d92..58ddce4391 100644 --- a/operations/helm/tests/extra-env/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/extra-env/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/extra-ports/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/extra-ports/grafana-agent/templates/controllers/daemonset.yaml index 80456987d5..776047ed12 100644 --- a/operations/helm/tests/extra-ports/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/extra-ports/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/faro-ingress/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/faro-ingress/grafana-agent/templates/controllers/daemonset.yaml index f587487dfd..a09774a895 100644 --- a/operations/helm/tests/faro-ingress/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/faro-ingress/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/global-image-pullsecrets/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/global-image-pullsecrets/grafana-agent/templates/controllers/daemonset.yaml index 108bb3e253..5c68972c41 100644 --- a/operations/helm/tests/global-image-pullsecrets/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/global-image-pullsecrets/grafana-agent/templates/controllers/daemonset.yaml @@ -32,7 +32,7 @@ spec: - name: global-cred containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/global-image-registry/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/global-image-registry/grafana-agent/templates/controllers/daemonset.yaml index 4b44f5ee23..9cb697abc2 100644 --- a/operations/helm/tests/global-image-registry/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/global-image-registry/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: quay.io/grafana/agent:v0.40.0 + image: quay.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/initcontainers/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/initcontainers/grafana-agent/templates/controllers/daemonset.yaml index 36549588f9..18d0a6cf29 100644 --- a/operations/helm/tests/initcontainers/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/initcontainers/grafana-agent/templates/controllers/daemonset.yaml @@ -45,7 +45,7 @@ spec: name: geoip containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/local-image-pullsecrets/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/local-image-pullsecrets/grafana-agent/templates/controllers/daemonset.yaml index 73542eb06f..4d136c66de 100644 --- a/operations/helm/tests/local-image-pullsecrets/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/local-image-pullsecrets/grafana-agent/templates/controllers/daemonset.yaml @@ -29,7 +29,7 @@ spec: - name: local-cred containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/local-image-registry/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/local-image-registry/grafana-agent/templates/controllers/daemonset.yaml index 4b44f5ee23..9cb697abc2 100644 --- a/operations/helm/tests/local-image-registry/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/local-image-registry/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: quay.io/grafana/agent:v0.40.0 + image: quay.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/nodeselectors-and-tolerations/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/nodeselectors-and-tolerations/grafana-agent/templates/controllers/daemonset.yaml index 69fed945f7..d0b81b73fb 100644 --- a/operations/helm/tests/nodeselectors-and-tolerations/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/nodeselectors-and-tolerations/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/pod_annotations/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/pod_annotations/grafana-agent/templates/controllers/daemonset.yaml index 3d6a45d6ce..0dbbfaeeea 100644 --- a/operations/helm/tests/pod_annotations/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/pod_annotations/grafana-agent/templates/controllers/daemonset.yaml @@ -28,7 +28,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/sidecars/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/sidecars/grafana-agent/templates/controllers/daemonset.yaml index 6fdf122707..b5ea9f12fc 100644 --- a/operations/helm/tests/sidecars/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/sidecars/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/static-mode/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/static-mode/grafana-agent/templates/controllers/daemonset.yaml index 4890f1c902..7469f6fb71 100644 --- a/operations/helm/tests/static-mode/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/static-mode/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - -config.file=/etc/agent/config.yaml diff --git a/operations/helm/tests/topologyspreadconstraints/grafana-agent/templates/controllers/deployment.yaml b/operations/helm/tests/topologyspreadconstraints/grafana-agent/templates/controllers/deployment.yaml index 6e9e4725ef..c49b62f6af 100644 --- a/operations/helm/tests/topologyspreadconstraints/grafana-agent/templates/controllers/deployment.yaml +++ b/operations/helm/tests/topologyspreadconstraints/grafana-agent/templates/controllers/deployment.yaml @@ -28,7 +28,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.0 + image: docker.io/grafana/agent:v0.40.1 imagePullPolicy: IfNotPresent args: - run From d7571b28396ac499a532540ff837dcef5c10a23d Mon Sep 17 00:00:00 2001 From: Erik Baranowski <39704712+erikbaranowski@users.noreply.github.com> Date: Thu, 29 Feb 2024 15:29:49 -0500 Subject: [PATCH 05/47] fix changelog (#6573) Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> --- CHANGELOG.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d85189e3e7..e56497c432 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,14 +17,16 @@ Main (unreleased) - A new `loki.rules.kubernetes` component that discovers `PrometheusRule` Kubernetes resources and loads them into a Loki Ruler instance. (@EStork09) -v0.40.1 (2024-02-27) --------------------- - ### Bugfixes - Set permissions on the `Grafana Agent [Flow]` folder when installing via the windows installer rather than relying on the parent folder permissions. (@erikbaranowski) +v0.40.1 (2024-02-27) +-------------------- + +### Bugfixes + - Fix an issues where the logging config block would trigger an error when trying to send logs to components that were not running. (@wildum) - Fix an issue where a custom component might be wired to a local declare instead of an import declare when they have the same label. (@wildum) From b1a258e1ca4a1a970f3019f13ce96ea492a457ea Mon Sep 17 00:00:00 2001 From: mattdurham Date: Fri, 1 Mar 2024 10:46:23 -0500 Subject: [PATCH 06/47] add doc on setting up windows (#6578) --- docs/developer/contributing.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/developer/contributing.md b/docs/developer/contributing.md index 1abac93a26..3c5ffe9765 100644 --- a/docs/developer/contributing.md +++ b/docs/developer/contributing.md @@ -88,6 +88,11 @@ Compiling Grafana Agent on Linux requires extra dependencies: * [systemd headers](https://packages.debian.org/sid/libsystemd-dev) for Promtail * Can be installed on Debian-based distributions with: ```sudo apt-get install libsystemd-dev``` +### Compile on Windows +Compiling Grafana Agent on Windows requires extra dependencies: + +* [tdm-gcc](https://jmeubank.github.io/tdm-gcc/download/) full 64 bit install for cgo compiliation. + ## Pull Request Checklist Changes should be branched off of the `main` branch. It's recommended to rebase From 47550feeeecb43049822f91d30c22ba62d71d935 Mon Sep 17 00:00:00 2001 From: Wouter van Os Date: Sat, 2 Mar 2024 00:01:07 +0100 Subject: [PATCH 07/47] Correct mistake to `PodLogs` (#6576) It seems `PodLogs` is meant in this peace of text, but `LogInstance` is written. This because in the next line it says LogInstances are deprecated. Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> --- docs/sources/flow/tasks/migrate/from-operator.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/flow/tasks/migrate/from-operator.md b/docs/sources/flow/tasks/migrate/from-operator.md index f035f95484..3880dd3a6f 100644 --- a/docs/sources/flow/tasks/migrate/from-operator.md +++ b/docs/sources/flow/tasks/migrate/from-operator.md @@ -18,7 +18,7 @@ weight: 320 With the release of {{< param "PRODUCT_NAME" >}}, Grafana Agent Operator is no longer the recommended way to deploy {{< param "PRODUCT_ROOT_NAME" >}} in Kubernetes. Some of the Operator functionality has moved into {{< param "PRODUCT_NAME" >}} itself, and the Helm Chart has replaced the remaining functionality. -- The Monitor types (`PodMonitor`, `ServiceMonitor`, `Probe`, and `LogsInstance`) are all supported natively by {{< param "PRODUCT_NAME" >}}. +- The Monitor types (`PodMonitor`, `ServiceMonitor`, `Probe`, and `PodLogs`) are all supported natively by {{< param "PRODUCT_NAME" >}}. You are no longer required to use the Operator to consume those CRDs for dynamic monitoring in your cluster. - The parts of the Operator that deploy the {{< param "PRODUCT_ROOT_NAME" >}} itself (`GrafanaAgent`, `MetricsInstance`, and `LogsInstance` CRDs) are deprecated. Operator users should use the {{< param "PRODUCT_ROOT_NAME" >}} [Helm Chart][] to deploy {{< param "PRODUCT_ROOT_NAME" >}} directly to your clusters. From a0f5d8a525b0cd9969f207936f3c986df9272ba7 Mon Sep 17 00:00:00 2001 From: Paschalis Tsilias Date: Mon, 4 Mar 2024 15:33:25 +0200 Subject: [PATCH 08/47] agent-static-mixin: include custom 'all' value (#6589) Signed-off-by: Paschalis Tsilias --- .../grafana/dashboards/agent-logs-pipeline.json | 8 ++++---- .../grafana/dashboards/agent-remote-write.json | 10 +++++----- .../grafana/dashboards/agent-tracing-pipeline.json | 8 ++++---- operations/agent-static-mixin/dashboards.libsonnet | 13 +++++++++++++ 4 files changed, 26 insertions(+), 13 deletions(-) diff --git a/example/docker-compose/grafana/dashboards/agent-logs-pipeline.json b/example/docker-compose/grafana/dashboards/agent-logs-pipeline.json index 305136a5dd..60680fae2d 100644 --- a/example/docker-compose/grafana/dashboards/agent-logs-pipeline.json +++ b/example/docker-compose/grafana/dashboards/agent-logs-pipeline.json @@ -893,7 +893,7 @@ "type": "datasource" }, { - "allValue": null, + "allValue": ".+", "current": { "text": { "selected": true, @@ -924,7 +924,7 @@ "useTags": false }, { - "allValue": null, + "allValue": ".+", "current": { "text": { "selected": true, @@ -955,7 +955,7 @@ "useTags": false }, { - "allValue": null, + "allValue": ".+", "current": { "text": { "selected": true, @@ -986,7 +986,7 @@ "useTags": false }, { - "allValue": null, + "allValue": ".+", "current": { "text": { "selected": true, diff --git a/example/docker-compose/grafana/dashboards/agent-remote-write.json b/example/docker-compose/grafana/dashboards/agent-remote-write.json index f222774607..c6ac4f751c 100644 --- a/example/docker-compose/grafana/dashboards/agent-remote-write.json +++ b/example/docker-compose/grafana/dashboards/agent-remote-write.json @@ -1332,7 +1332,7 @@ "type": "datasource" }, { - "allValue": null, + "allValue": ".+", "current": { "text": { "selected": true, @@ -1363,7 +1363,7 @@ "useTags": false }, { - "allValue": null, + "allValue": ".+", "current": { "text": { "selected": true, @@ -1394,7 +1394,7 @@ "useTags": false }, { - "allValue": null, + "allValue": ".+", "current": { "text": { "selected": true, @@ -1425,7 +1425,7 @@ "useTags": false }, { - "allValue": null, + "allValue": ".+", "current": { "text": { "selected": true, @@ -1456,7 +1456,7 @@ "useTags": false }, { - "allValue": null, + "allValue": ".+", "current": { }, "datasource": "$datasource", "hide": 0, diff --git a/example/docker-compose/grafana/dashboards/agent-tracing-pipeline.json b/example/docker-compose/grafana/dashboards/agent-tracing-pipeline.json index 3e9415b919..6250d0f4cd 100644 --- a/example/docker-compose/grafana/dashboards/agent-tracing-pipeline.json +++ b/example/docker-compose/grafana/dashboards/agent-tracing-pipeline.json @@ -905,7 +905,7 @@ "type": "datasource" }, { - "allValue": null, + "allValue": ".+", "current": { "text": { "selected": true, @@ -936,7 +936,7 @@ "useTags": false }, { - "allValue": null, + "allValue": ".+", "current": { "text": { "selected": true, @@ -967,7 +967,7 @@ "useTags": false }, { - "allValue": null, + "allValue": ".+", "current": { "text": { "selected": true, @@ -998,7 +998,7 @@ "useTags": false }, { - "allValue": null, + "allValue": ".+", "current": { "text": { "selected": true, diff --git a/operations/agent-static-mixin/dashboards.libsonnet b/operations/agent-static-mixin/dashboards.libsonnet index 834ec51813..37bb1b7e07 100644 --- a/operations/agent-static-mixin/dashboards.libsonnet +++ b/operations/agent-static-mixin/dashboards.libsonnet @@ -286,6 +286,7 @@ local template = grafana.template; value: '$__all', }, includeAll=true, + allValues='.+', ), ) .addTemplate( @@ -300,6 +301,7 @@ local template = grafana.template; value: '$__all', }, includeAll=true, + allValues='.+', ), ) .addTemplate( @@ -314,6 +316,7 @@ local template = grafana.template; value: '$__all', }, includeAll=true, + allValues='.+', ), ) .addTemplate( @@ -328,6 +331,7 @@ local template = grafana.template; value: '$__all', }, includeAll=true, + allValues='.+', ), ) .addTemplate( @@ -337,6 +341,7 @@ local template = grafana.template; 'label_values(prometheus_remote_storage_shards{cluster=~"$cluster", pod=~"$pod"}, url)', refresh='time', includeAll=true, + allValues='.+', ) ) .addRow( @@ -537,6 +542,7 @@ local template = grafana.template; value: '$__all', }, includeAll=true, + allValues='.+', ), ) .addTemplate( @@ -551,6 +557,7 @@ local template = grafana.template; value: '$__all', }, includeAll=true, + allValues='.+', ), ) .addTemplate( @@ -565,6 +572,7 @@ local template = grafana.template; value: '$__all', }, includeAll=true, + allValues='.+', ), ) .addTemplate( @@ -579,6 +587,7 @@ local template = grafana.template; value: '$__all', }, includeAll=true, + allValues='.+', ), ) .addRow( @@ -715,6 +724,7 @@ local template = grafana.template; value: '$__all', }, includeAll=true, + allValues='.+', ), ) .addTemplate( @@ -729,6 +739,7 @@ local template = grafana.template; value: '$__all', }, includeAll=true, + allValues='.+', ), ) .addTemplate( @@ -743,6 +754,7 @@ local template = grafana.template; value: '$__all', }, includeAll=true, + allValues='.+', ), ) .addTemplate( @@ -757,6 +769,7 @@ local template = grafana.template; value: '$__all', }, includeAll=true, + allValues='.+', ), ) .addTemplate( From 2d4acbaf032c2bc17d2100b79716525f9252b547 Mon Sep 17 00:00:00 2001 From: Paschalis Tsilias Date: Mon, 4 Mar 2024 16:58:38 +0200 Subject: [PATCH 09/47] otelconvert: fix panic for pipelines with no processors (#6587) Signed-off-by: Paschalis Tsilias --- .../internal/otelcolconvert/pipeline_group.go | 4 --- .../testdata/inconsistent_processor.river | 25 ++++++++++++++ .../testdata/inconsistent_processor.yaml | 33 +++++++++++++++++++ 3 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 internal/converter/internal/otelcolconvert/testdata/inconsistent_processor.river create mode 100644 internal/converter/internal/otelcolconvert/testdata/inconsistent_processor.yaml diff --git a/internal/converter/internal/otelcolconvert/pipeline_group.go b/internal/converter/internal/otelcolconvert/pipeline_group.go index 85d84ae4e1..51a7d63b8a 100644 --- a/internal/converter/internal/otelcolconvert/pipeline_group.go +++ b/internal/converter/internal/otelcolconvert/pipeline_group.go @@ -180,10 +180,6 @@ func nextInPipeline(pipeline *pipelines.PipelineConfig, fromID component.Instanc // Processors should send to the next processor if one exists or to every // exporter otherwise. processorIndex := slices.Index(pipeline.Processors, fromID.ID) - if processorIndex == -1 { - panic("nextInPipeline: received processor ID not in processor list") - } - if processorIndex+1 < len(pipeline.Processors) { // Send to next processor. return []component.InstanceID{{Kind: component.KindProcessor, ID: pipeline.Processors[processorIndex+1]}} diff --git a/internal/converter/internal/otelcolconvert/testdata/inconsistent_processor.river b/internal/converter/internal/otelcolconvert/testdata/inconsistent_processor.river new file mode 100644 index 0000000000..141cfb7795 --- /dev/null +++ b/internal/converter/internal/otelcolconvert/testdata/inconsistent_processor.river @@ -0,0 +1,25 @@ +otelcol.receiver.otlp "default" { + grpc { } + + http { } + + output { + metrics = [otelcol.exporter.otlp.default.input] + logs = [otelcol.processor.batch.default.input] + traces = [otelcol.exporter.otlp.default.input] + } +} + +otelcol.processor.batch "default" { + output { + metrics = [otelcol.exporter.otlp.default.input] + logs = [otelcol.exporter.otlp.default.input] + traces = [otelcol.exporter.otlp.default.input] + } +} + +otelcol.exporter.otlp "default" { + client { + endpoint = "database:4317" + } +} diff --git a/internal/converter/internal/otelcolconvert/testdata/inconsistent_processor.yaml b/internal/converter/internal/otelcolconvert/testdata/inconsistent_processor.yaml new file mode 100644 index 0000000000..b53b67761c --- /dev/null +++ b/internal/converter/internal/otelcolconvert/testdata/inconsistent_processor.yaml @@ -0,0 +1,33 @@ +receivers: + otlp: + protocols: + grpc: + http: + +processors: + batch: + +exporters: + otlp: + # Our defaults have drifted from upstream, so we explicitly set our + # defaults below (balancer_name and queue_size). + endpoint: database:4317 + balancer_name: pick_first + sending_queue: + queue_size: 5000 + +service: + pipelines: + metrics: + receivers: [otlp] + processors: [] + exporters: [otlp] + logs: + receivers: [otlp] + processors: [batch] + exporters: [otlp] + traces: + receivers: [otlp] + processors: [] + exporters: [otlp] + From 72b08cae804624f444b1c7529aaa4148672b4db8 Mon Sep 17 00:00:00 2001 From: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> Date: Mon, 4 Mar 2024 12:35:15 -0800 Subject: [PATCH 10/47] Fix some broken links and bad markdown syntax (#6596) * Correct canonical URL * Update share syntax * Remove table that was accidentally pasted in from discovery.dns * Update docs/sources/flow/tutorials/flow-by-example/get-started.md Co-authored-by: Jack Baldry * Fix up the H1 --------- Co-authored-by: Jack Baldry --- .../flow/reference/components/loki.rules.kubernetes.md | 8 ++++---- docs/sources/flow/reference/config-blocks/tracing.md | 7 +------ .../sources/flow/tutorials/flow-by-example/get-started.md | 4 ++-- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/docs/sources/flow/reference/components/loki.rules.kubernetes.md b/docs/sources/flow/reference/components/loki.rules.kubernetes.md index ffb932df24..314b7a4159 100644 --- a/docs/sources/flow/reference/components/loki.rules.kubernetes.md +++ b/docs/sources/flow/reference/components/loki.rules.kubernetes.md @@ -135,19 +135,19 @@ The `operator` argument should be one of the following strings: ### basic_auth block -{{< docs/shared lookup="flow/reference/components/basic-auth-block.md" source="agent" >}} +{{< docs/shared lookup="flow/reference/components/basic-auth-block.md" source="agent" version="" >}} ### authorization block -{{< docs/shared lookup="flow/reference/components/authorization-block.md" source="agent" >}} +{{< docs/shared lookup="flow/reference/components/authorization-block.md" source="agent" version="" >}} ### oauth2 block -{{< docs/shared lookup="flow/reference/components/oauth2-block.md" source="agent" >}} +{{< docs/shared lookup="flow/reference/components/oauth2-block.md" source="agent" version="">}} ### tls_config block -{{< docs/shared lookup="flow/reference/components/tls-config-block.md" source="agent" >}} +{{< docs/shared lookup="flow/reference/components/tls-config-block.md" source="agent" version="">}} ## Exported fields diff --git a/docs/sources/flow/reference/config-blocks/tracing.md b/docs/sources/flow/reference/config-blocks/tracing.md index 860c8e4c79..6d4a0a2cf3 100644 --- a/docs/sources/flow/reference/config-blocks/tracing.md +++ b/docs/sources/flow/reference/config-blocks/tracing.md @@ -94,12 +94,7 @@ Name | Type | Description `refresh_interval` | `duration` | Frequency to poll the URL for new sampling strategies. | `"1m"` | no The remote sampling strategies are retrieved from the URL specified by the -`url` argument, and polled for updates on a timer. The frequency for how oftenName | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`names` | `list(string)` | DNS names to look up. | | yes -`port` | `number` | Port to use for collecting metrics. Not used for SRV records. | `0` | no -`refresh_interval` | `duration` | How often to query DNS for updates. | `"30s"` | no -`type` | `string` | Type of DNS record to query. Must be one of SRV, A, AAAA, or MX. | `"SRV"` | no +`url` argument, and polled for updates on a timer. The frequency for how often polling occurs is controlled by the `refresh_interval` argument. Requests to the remote sampling strategies server are made through an HTTP diff --git a/docs/sources/flow/tutorials/flow-by-example/get-started.md b/docs/sources/flow/tutorials/flow-by-example/get-started.md index 5fa1bbd5b5..1f439cd88f 100644 --- a/docs/sources/flow/tutorials/flow-by-example/get-started.md +++ b/docs/sources/flow/tutorials/flow-by-example/get-started.md @@ -4,13 +4,13 @@ aliases: - /docs/grafana-cloud/monitor-infrastructure/agent/flow/tutorials/flow-by-example/faq/ - /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/tutorials/flow-by-example/faq/ - /docs/grafana-cloud/send-data/agent/flow/tutorials/flow-by-example/faq/ -canonical: https://grafana.com/docs/agent/latest/flow/tutorials/flow-by-example/faq/ +canonical: https://grafana.com/docs/agent/latest/flow/tutorials/flow-by-example/get-started/ description: Getting started with Flow-by-Example Tutorials title: Get started weight: 10 --- -## Who is this for? +# Get started This set of tutorials contains a collection of examples that build on each other to demonstrate how to configure and use [{{< param "PRODUCT_NAME" >}}][flow]. It assumes you have a basic understanding of what {{< param "PRODUCT_ROOT_NAME" >}} is and telemetry collection in general. It also assumes a base level of familiarity with Prometheus and PromQL, Loki and LogQL, and basic Grafana navigation. It assumes no knowledge of {{< param "PRODUCT_NAME" >}} or River concepts. From 7ae706760115276eca9fe142a535a6dea62b6edf Mon Sep 17 00:00:00 2001 From: Paschalis Tsilias Date: Tue, 5 Mar 2024 13:03:45 +0200 Subject: [PATCH 11/47] otelconvert: extend framework for connector components (#6585) Signed-off-by: Paschalis Tsilias --- .../connector/spanmetrics/spanmetrics.go | 11 ++ .../converter_spanmetricsconnector.go | 103 ++++++++++++++++++ .../internal/otelcolconvert/otelcolconvert.go | 60 ++++++++-- .../internal/otelcolconvert/pipeline_group.go | 14 ++- .../otelcolconvert/testdata/spanmetrics.river | 27 +++++ .../otelcolconvert/testdata/spanmetrics.yaml | 36 ++++++ .../testdata/spanmetrics_full.river | 49 +++++++++ .../testdata/spanmetrics_full.yaml | 48 ++++++++ 8 files changed, 334 insertions(+), 14 deletions(-) create mode 100644 internal/converter/internal/otelcolconvert/converter_spanmetricsconnector.go create mode 100644 internal/converter/internal/otelcolconvert/testdata/spanmetrics.river create mode 100644 internal/converter/internal/otelcolconvert/testdata/spanmetrics.yaml create mode 100644 internal/converter/internal/otelcolconvert/testdata/spanmetrics_full.river create mode 100644 internal/converter/internal/otelcolconvert/testdata/spanmetrics_full.yaml diff --git a/internal/component/otelcol/connector/spanmetrics/spanmetrics.go b/internal/component/otelcol/connector/spanmetrics/spanmetrics.go index 237cba2229..cc376f6a1f 100644 --- a/internal/component/otelcol/connector/spanmetrics/spanmetrics.go +++ b/internal/component/otelcol/connector/spanmetrics/spanmetrics.go @@ -118,6 +118,17 @@ func convertAggregationTemporality(temporality string) (string, error) { } } +func FromOTelAggregationTemporality(temporality string) string { + switch temporality { + case "AGGREGATION_TEMPORALITY_DELTA": + return AggregationTemporalityDelta + case "AGGREGATION_TEMPORALITY_CUMULATIVE": + return AggregationTemporalityCumulative + default: + return "" + } +} + // Convert implements connector.Arguments. func (args Arguments) Convert() (otelcomponent.Config, error) { dimensions := make([]spanmetricsconnector.Dimension, 0, len(args.Dimensions)) diff --git a/internal/converter/internal/otelcolconvert/converter_spanmetricsconnector.go b/internal/converter/internal/otelcolconvert/converter_spanmetricsconnector.go new file mode 100644 index 0000000000..5b26f953e2 --- /dev/null +++ b/internal/converter/internal/otelcolconvert/converter_spanmetricsconnector.go @@ -0,0 +1,103 @@ +package otelcolconvert + +import ( + "fmt" + "time" + + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/connector/spanmetrics" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector" + "go.opentelemetry.io/collector/component" +) + +func init() { + converters = append(converters, spanmetricsConnectorConverter{}) +} + +type spanmetricsConnectorConverter struct{} + +func (spanmetricsConnectorConverter) Factory() component.Factory { + return spanmetricsconnector.NewFactory() +} + +func (spanmetricsConnectorConverter) InputComponentName() string { + return "otelcol.connector.spanmetrics" +} + +func (spanmetricsConnectorConverter) ConvertAndAppend(state *state, id component.InstanceID, cfg component.Config) diag.Diagnostics { + var diags diag.Diagnostics + + label := state.FlowComponentLabel() + + args := toSpanmetricsConnector(state, id, cfg.(*spanmetricsconnector.Config)) + block := common.NewBlockWithOverride([]string{"otelcol", "connector", "spanmetrics"}, label, args) + + diags.Add( + diag.SeverityLevelInfo, + fmt.Sprintf("Converted %s into %s", stringifyInstanceID(id), stringifyBlock(block)), + ) + + state.Body().AppendBlock(block) + return diags +} + +func toSpanmetricsConnector(state *state, id component.InstanceID, cfg *spanmetricsconnector.Config) *spanmetrics.Arguments { + if cfg == nil { + return nil + } + var ( + nextMetrics = state.Next(id, component.DataTypeMetrics) + ) + + var exponential *spanmetrics.ExponentialHistogramConfig + if cfg.Histogram.Exponential != nil { + exponential = &spanmetrics.ExponentialHistogramConfig{ + MaxSize: cfg.Histogram.Exponential.MaxSize, + } + } + + var explicit *spanmetrics.ExplicitHistogramConfig + if cfg.Histogram.Explicit != nil { + explicit = &spanmetrics.ExplicitHistogramConfig{ + Buckets: cfg.Histogram.Explicit.Buckets, + } + } + + // If none have been explicitly set, assign the upstream default. + if exponential == nil && explicit == nil { + explicit = &spanmetrics.ExplicitHistogramConfig{Buckets: []time.Duration{}} + explicit.SetToDefault() + } + + var dimensions []spanmetrics.Dimension + for _, d := range cfg.Dimensions { + dimensions = append(dimensions, spanmetrics.Dimension{ + Name: d.Name, + Default: d.Default, + }) + } + + return &spanmetrics.Arguments{ + Dimensions: dimensions, + ExcludeDimensions: cfg.ExcludeDimensions, + DimensionsCacheSize: cfg.DimensionsCacheSize, + AggregationTemporality: spanmetrics.FromOTelAggregationTemporality(cfg.AggregationTemporality), + Histogram: spanmetrics.HistogramConfig{ + Disable: cfg.Histogram.Disable, + Unit: cfg.Histogram.Unit.String(), + Exponential: exponential, + Explicit: explicit, + }, + MetricsFlushInterval: cfg.MetricsFlushInterval, + Namespace: cfg.Namespace, + Exemplars: spanmetrics.ExemplarsConfig{ + Enabled: cfg.Exemplars.Enabled, + }, + + Output: &otelcol.ConsumerArguments{ + Metrics: toTokenizedConsumers(nextMetrics), + }, + } +} diff --git a/internal/converter/internal/otelcolconvert/otelcolconvert.go b/internal/converter/internal/otelcolconvert/otelcolconvert.go index 768c9b3e5d..dd61da6963 100644 --- a/internal/converter/internal/otelcolconvert/otelcolconvert.go +++ b/internal/converter/internal/otelcolconvert/otelcolconvert.go @@ -18,6 +18,7 @@ import ( "go.opentelemetry.io/collector/otelcol" "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/receiver" + "golang.org/x/exp/maps" ) // This package is split into a set of [componentConverter] implementations @@ -149,6 +150,19 @@ func appendConfig(file *builder.File, cfg *otelcol.Config) diag.Diagnostics { diags.Add(diag.SeverityLevelCritical, fmt.Sprintf("failed to interpret config: %s", err)) return diags } + // TODO(rfratto): should this be deduplicated to avoid creating factories + // twice? + converterTable := buildConverterTable() + + // Connector components are defined on the top level of the OpenTelemetry + // config, but inside of the pipeline definitions they act like regular + // receiver and exporter component IDs. + // Connector components instances must _always_ be used both as an exporter + // _and_ a receiver for the signal types they're supporting. + // + // Since we want to construct them individually, we'll exclude them from + // the list of receivers and exporters manually. + connectorIDs := maps.Keys(cfg.Connectors) // NOTE(rfratto): here, the same component ID will be instantiated once for // every group it's in. This means that converting receivers in multiple @@ -158,24 +172,25 @@ func appendConfig(file *builder.File, cfg *otelcol.Config) diag.Diagnostics { // This isn't a problem in pure OpenTelemetry Collector because it internally // deduplicates receiver instances, but since Flow don't have this logic we // need to reject these kinds of configs for now. - if duplicateDiags := validateNoDuplicateReceivers(groups); len(duplicateDiags) > 0 { + if duplicateDiags := validateNoDuplicateReceivers(groups, connectorIDs); len(duplicateDiags) > 0 { diags.AddAll(duplicateDiags) return diags } - // TODO(rfratto): should this be deduplicated to avoid creating factories - // twice? - converterTable := buildConverterTable() - for _, group := range groups { + receiverIDs := filterIDs(group.Receivers(), connectorIDs) + processorIDs := group.Processors() + exporterIDs := filterIDs(group.Exporters(), connectorIDs) + componentSets := []struct { kind component.Kind ids []component.ID configLookup map[component.ID]component.Config }{ - {component.KindReceiver, group.Receivers(), cfg.Receivers}, - {component.KindProcessor, group.Processors(), cfg.Processors}, - {component.KindExporter, group.Exporters(), cfg.Exporters}, + {component.KindReceiver, receiverIDs, cfg.Receivers}, + {component.KindProcessor, processorIDs, cfg.Processors}, + {component.KindExporter, exporterIDs, cfg.Exporters}, + {component.KindConnector, connectorIDs, cfg.Connectors}, } for _, componentSet := range componentSets { @@ -211,13 +226,14 @@ func appendConfig(file *builder.File, cfg *otelcol.Config) diag.Diagnostics { // in two different pipeline groups. This is required because Flow does not // allow the same receiver to be instantiated more than once, while this is // fine in OpenTelemetry due to internal deduplication rules. -func validateNoDuplicateReceivers(groups []pipelineGroup) diag.Diagnostics { +func validateNoDuplicateReceivers(groups []pipelineGroup, connectorIDs []component.ID) diag.Diagnostics { var diags diag.Diagnostics usedReceivers := make(map[component.ID]struct{}) for _, group := range groups { - for _, receiver := range group.Receivers() { + receiverIDs := filterIDs(group.Receivers(), connectorIDs) + for _, receiver := range receiverIDs { if _, found := usedReceivers[receiver]; found { diags.Add(diag.SeverityLevelCritical, fmt.Sprintf( "the configuration is unsupported because the receiver %q is used across multiple pipelines with distinct names", @@ -246,6 +262,12 @@ func buildConverterTable() map[converterKey]componentConverter { table[converterKey{Kind: component.KindExporter, Type: fact.Type()}] = conv case connector.Factory: table[converterKey{Kind: component.KindConnector, Type: fact.Type()}] = conv + // We need this so the connector is available as a destination for state.Next + table[converterKey{Kind: component.KindExporter, Type: fact.Type()}] = conv + // Technically, this isn't required to be here since the entry + // won't be required to look up a destination for state.Next, but + // adding to reinforce the idea of how connectors are used. + table[converterKey{Kind: component.KindReceiver, Type: fact.Type()}] = conv case extension.Factory: table[converterKey{Kind: component.KindExtension, Type: fact.Type()}] = conv } @@ -253,3 +275,21 @@ func buildConverterTable() map[converterKey]componentConverter { return table } + +func filterIDs(in []component.ID, rem []component.ID) []component.ID { + var res []component.ID + + for _, set := range in { + exists := false + for _, id := range rem { + if set == id { + exists = true + } + } + if !exists { + res = append(res, set) + } + } + + return res +} diff --git a/internal/converter/internal/otelcolconvert/pipeline_group.go b/internal/converter/internal/otelcolconvert/pipeline_group.go index 51a7d63b8a..3c6f278aad 100644 --- a/internal/converter/internal/otelcolconvert/pipeline_group.go +++ b/internal/converter/internal/otelcolconvert/pipeline_group.go @@ -1,6 +1,7 @@ package otelcolconvert import ( + "cmp" "fmt" "go.opentelemetry.io/collector/component" @@ -95,7 +96,12 @@ func createPipelineGroups(cfg pipelines.Config) ([]pipelineGroup, error) { groups[key] = group } - return maps.Values(groups), nil + res := maps.Values(groups) + slices.SortStableFunc(res, func(a, b pipelineGroup) int { + return cmp.Compare(a.Name, b.Name) + }) + + return res, nil } // Receivers returns a set of unique IDs for receivers across all telemetry @@ -168,9 +174,9 @@ func (group pipelineGroup) NextTraces(fromID component.InstanceID) []component.I func nextInPipeline(pipeline *pipelines.PipelineConfig, fromID component.InstanceID) []component.InstanceID { switch fromID.Kind { - case component.KindReceiver: - // Receivers should either send to the first processor if one exists or to - // every exporter otherwise. + case component.KindReceiver, component.KindConnector: + // Receivers and connectors should either send to the first processor + // if one exists or to every exporter otherwise. if len(pipeline.Processors) > 0 { return []component.InstanceID{{Kind: component.KindProcessor, ID: pipeline.Processors[0]}} } diff --git a/internal/converter/internal/otelcolconvert/testdata/spanmetrics.river b/internal/converter/internal/otelcolconvert/testdata/spanmetrics.river new file mode 100644 index 0000000000..655a859f8e --- /dev/null +++ b/internal/converter/internal/otelcolconvert/testdata/spanmetrics.river @@ -0,0 +1,27 @@ +otelcol.receiver.otlp "default" { + grpc { } + + http { } + + output { + metrics = [otelcol.exporter.otlp.default.input] + logs = [otelcol.exporter.otlp.default.input] + traces = [otelcol.connector.spanmetrics.default.input] + } +} + +otelcol.exporter.otlp "default" { + client { + endpoint = "database:4317" + } +} + +otelcol.connector.spanmetrics "default" { + histogram { + explicit { } + } + + output { + metrics = [otelcol.exporter.otlp.default.input] + } +} diff --git a/internal/converter/internal/otelcolconvert/testdata/spanmetrics.yaml b/internal/converter/internal/otelcolconvert/testdata/spanmetrics.yaml new file mode 100644 index 0000000000..58786875cc --- /dev/null +++ b/internal/converter/internal/otelcolconvert/testdata/spanmetrics.yaml @@ -0,0 +1,36 @@ +receivers: + otlp: + protocols: + grpc: + http: + +exporters: + otlp: + # Our defaults have drifted from upstream, so we explicitly set our + # defaults below (balancer_name and queue_size). + endpoint: database:4317 + balancer_name: pick_first + sending_queue: + queue_size: 5000 + +processors: + batch: + +connectors: + spanmetrics: + +service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [spanmetrics] + metrics: + receivers: [spanmetrics] + processors: [] + exporters: [otlp] + logs: + receivers: [otlp] + processors: [] + exporters: [otlp] + diff --git a/internal/converter/internal/otelcolconvert/testdata/spanmetrics_full.river b/internal/converter/internal/otelcolconvert/testdata/spanmetrics_full.river new file mode 100644 index 0000000000..07665b91f2 --- /dev/null +++ b/internal/converter/internal/otelcolconvert/testdata/spanmetrics_full.river @@ -0,0 +1,49 @@ +otelcol.receiver.otlp "default_traces" { + grpc { } + + http { } + + output { + metrics = [otelcol.exporter.otlp.default_metrics_backend.input] + logs = [] + traces = [otelcol.exporter.otlp.default_traces_backend.input, otelcol.connector.spanmetrics.default.input] + } +} + +otelcol.exporter.otlp "default_metrics_backend" { + client { + endpoint = "database:44317" + } +} + +otelcol.exporter.otlp "default_traces_backend" { + client { + endpoint = "database:34317" + } +} + +otelcol.connector.spanmetrics "default" { + histogram { + explicit { } + } + + output { + metrics = [otelcol.exporter.otlp.default_metrics_backend.input] + } +} + +otelcol.exporter.otlp "foo_metrics_backend_two" { + client { + endpoint = "database:54317" + } +} + +otelcol.connector.spanmetrics "foo_default" { + histogram { + explicit { } + } + + output { + metrics = [otelcol.exporter.otlp.foo_metrics_backend_two.input] + } +} diff --git a/internal/converter/internal/otelcolconvert/testdata/spanmetrics_full.yaml b/internal/converter/internal/otelcolconvert/testdata/spanmetrics_full.yaml new file mode 100644 index 0000000000..b2ebe10cfa --- /dev/null +++ b/internal/converter/internal/otelcolconvert/testdata/spanmetrics_full.yaml @@ -0,0 +1,48 @@ +receivers: + otlp/traces: + protocols: + grpc: + http: + +exporters: + otlp/traces_backend: + # Our defaults have drifted from upstream, so we explicitly set our + # defaults below (balancer_name and queue_size). + endpoint: database:34317 + balancer_name: pick_first + sending_queue: + queue_size: 5000 + + otlp/metrics_backend: + # Our defaults have drifted from upstream, so we explicitly set our + # defaults below (balancer_name and queue_size). + endpoint: database:44317 + balancer_name: pick_first + sending_queue: + queue_size: 5000 + + otlp/metrics_backend_two: + # Our defaults have drifted from upstream, so we explicitly set our + # defaults below (balancer_name and queue_size). + endpoint: database:54317 + balancer_name: pick_first + sending_queue: + queue_size: 5000 + +connectors: + spanmetrics: + histogram: + exponential: + +service: + pipelines: + traces: + receivers: [otlp/traces] + exporters: [otlp/traces_backend, spanmetrics] + metrics: + receivers: [spanmetrics] + exporters: [otlp/metrics_backend] + metrics/foo: + receivers: [spanmetrics] + exporters: [otlp/metrics_backend_two] + From 1a642cfd182af8db8ece56f3c1174ad4092fedb3 Mon Sep 17 00:00:00 2001 From: Piotr <17101802+thampiotr@users.noreply.github.com> Date: Tue, 5 Mar 2024 11:03:52 +0000 Subject: [PATCH 12/47] Port promtail changes part 1 (#6559) * Port promtail changes part 1 * changelog --- CHANGELOG.md | 2 + .../component/common/loki/client/batch.go | 14 ++- .../common/loki/client/batch_test.go | 3 +- .../component/common/loki/client/client.go | 2 +- .../common/loki/client/client_test.go | 12 +++ .../common/loki/client/queue_client.go | 2 +- web/ui/build/asset-manifest.json | 26 ++++++ web/ui/build/favicon.ico | Bin 0 -> 16958 bytes web/ui/build/index.html | 1 + web/ui/build/manifest.json | 15 ++++ web/ui/build/robots.txt | 3 + web/ui/build/static/css/main.d3ff49f0.css | 3 + web/ui/build/static/js/main.180d839c.js | 2 + .../static/js/main.180d839c.js.LICENSE.txt | 81 ++++++++++++++++++ ...e-v21-latin-500.3452777c99809dd85b2a.woff2 | Bin 0 -> 21792 bytes ...1-latin-regular.e662d57ce51fba1f46e3.woff2 | Bin 0 -> 21724 bytes .../logo.c578039fa12bc65fb40a9b7ee1391e66.svg | 1 + ...o-v30-latin-100.30fb0679553d179c3343.woff2 | Bin 0 -> 15764 bytes ...latin-100italic.d3935eb61aa8422388e2.woff2 | Bin 0 -> 17060 bytes ...o-v30-latin-300.c48fb6765a9fcb00b330.woff2 | Bin 0 -> 15740 bytes ...latin-300italic.1128daa312ec555266d5.woff2 | Bin 0 -> 17508 bytes ...o-v30-latin-500.f25d774ecfe0996f8eb5.woff2 | Bin 0 -> 15920 bytes ...latin-500italic.3a43b67e5bbdfb3ab0a6.woff2 | Bin 0 -> 17336 bytes ...o-v30-latin-700.227c93190fe7f82de3f8.woff2 | Bin 0 -> 15860 bytes ...latin-700italic.d92a5d1451f249359639.woff2 | Bin 0 -> 17032 bytes ...o-v30-latin-900.2e8becfcae330421664b.woff2 | Bin 0 -> 15752 bytes ...latin-900italic.5b387ea565e67898ca3a.woff2 | Bin 0 -> 17552 bytes ...30-latin-italic.e10742dbb1d4a0864ba8.woff2 | Bin 0 -> 17368 bytes ...0-latin-regular.b009a76ad6afe4ebd301.woff2 | Bin 0 -> 15744 bytes 29 files changed, 161 insertions(+), 6 deletions(-) create mode 100644 web/ui/build/asset-manifest.json create mode 100644 web/ui/build/favicon.ico create mode 100644 web/ui/build/index.html create mode 100644 web/ui/build/manifest.json create mode 100644 web/ui/build/robots.txt create mode 100644 web/ui/build/static/css/main.d3ff49f0.css create mode 100644 web/ui/build/static/js/main.180d839c.js create mode 100644 web/ui/build/static/js/main.180d839c.js.LICENSE.txt create mode 100644 web/ui/build/static/media/fira-code-v21-latin-500.3452777c99809dd85b2a.woff2 create mode 100644 web/ui/build/static/media/fira-code-v21-latin-regular.e662d57ce51fba1f46e3.woff2 create mode 100644 web/ui/build/static/media/logo.c578039fa12bc65fb40a9b7ee1391e66.svg create mode 100644 web/ui/build/static/media/roboto-v30-latin-100.30fb0679553d179c3343.woff2 create mode 100644 web/ui/build/static/media/roboto-v30-latin-100italic.d3935eb61aa8422388e2.woff2 create mode 100644 web/ui/build/static/media/roboto-v30-latin-300.c48fb6765a9fcb00b330.woff2 create mode 100644 web/ui/build/static/media/roboto-v30-latin-300italic.1128daa312ec555266d5.woff2 create mode 100644 web/ui/build/static/media/roboto-v30-latin-500.f25d774ecfe0996f8eb5.woff2 create mode 100644 web/ui/build/static/media/roboto-v30-latin-500italic.3a43b67e5bbdfb3ab0a6.woff2 create mode 100644 web/ui/build/static/media/roboto-v30-latin-700.227c93190fe7f82de3f8.woff2 create mode 100644 web/ui/build/static/media/roboto-v30-latin-700italic.d92a5d1451f249359639.woff2 create mode 100644 web/ui/build/static/media/roboto-v30-latin-900.2e8becfcae330421664b.woff2 create mode 100644 web/ui/build/static/media/roboto-v30-latin-900italic.5b387ea565e67898ca3a.woff2 create mode 100644 web/ui/build/static/media/roboto-v30-latin-italic.e10742dbb1d4a0864ba8.woff2 create mode 100644 web/ui/build/static/media/roboto-v30-latin-regular.b009a76ad6afe4ebd301.woff2 diff --git a/CHANGELOG.md b/CHANGELOG.md index e56497c432..4aae6baa31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,8 @@ v0.40.1 (2024-02-27) - Fix an issue where flow mode panics if the `logging` config block is given a `null` Loki receiver to write log entries to. (@rfratto) +- Fix an issue where Loki could reject a batch of logs when structured metadata feature is used. (@thampiotr) + v0.40.0 (2024-02-27) -------------------- diff --git a/internal/component/common/loki/client/batch.go b/internal/component/common/loki/client/batch.go index c47d60ee1b..7a15927cee 100644 --- a/internal/component/common/loki/client/batch.go +++ b/internal/component/common/loki/client/batch.go @@ -61,7 +61,7 @@ func newBatch(maxStreams int, entries ...loki.Entry) *batch { // add an entry to the batch func (b *batch) add(entry loki.Entry) error { - b.totalBytes += len(entry.Line) + b.totalBytes += entrySize(entry.Entry) // Append the entry to an already existing stream (if any) labels := labelsMapToString(entry.Labels, ReservedLabelTenantID) @@ -150,8 +150,8 @@ func (b *batch) sizeBytes() int { // sizeBytesAfter returns the size of the batch after the input entry // will be added to the batch itself -func (b *batch) sizeBytesAfter(line string) int { - return b.totalBytes + len(line) +func (b *batch) sizeBytesAfter(entry logproto.Entry) int { + return b.totalBytes + entrySize(entry) } // age of the batch since its creation @@ -201,3 +201,11 @@ func (b *batch) reportAsSentData(h SentDataMarkerHandler) { h.UpdateSentData(seg, data) } } + +func entrySize(entry logproto.Entry) int { + structuredMetadataSize := 0 + for _, label := range entry.StructuredMetadata { + structuredMetadataSize += label.Size() + } + return len(entry.Line) + structuredMetadataSize +} diff --git a/internal/component/common/loki/client/batch_test.go b/internal/component/common/loki/client/batch_test.go index db27075800..255c0d38dc 100644 --- a/internal/component/common/loki/client/batch_test.go +++ b/internal/component/common/loki/client/batch_test.go @@ -57,8 +57,9 @@ func TestBatch_add(t *testing.T) { inputEntries: []loki.Entry{ {Labels: model.LabelSet{}, Entry: logEntries[0].Entry}, {Labels: model.LabelSet{}, Entry: logEntries[1].Entry}, + {Labels: model.LabelSet{}, Entry: logEntries[7].Entry}, }, - expectedSizeBytes: len(logEntries[0].Entry.Line) + len(logEntries[1].Entry.Line), + expectedSizeBytes: entrySize(logEntries[0].Entry) + entrySize(logEntries[0].Entry) + entrySize(logEntries[7].Entry), }, "multiple streams with multiple log entries": { inputEntries: []loki.Entry{ diff --git a/internal/component/common/loki/client/client.go b/internal/component/common/loki/client/client.go index b3726cd6f3..5b6e62f209 100644 --- a/internal/component/common/loki/client/client.go +++ b/internal/component/common/loki/client/client.go @@ -308,7 +308,7 @@ func (c *client) run() { // If adding the entry to the batch will increase the size over the max // size allowed, we do send the current batch and then create a new one - if batch.sizeBytesAfter(e.Line) > c.cfg.BatchSize { + if batch.sizeBytesAfter(e.Entry) > c.cfg.BatchSize { c.sendBatch(tenantID, batch) batches[tenantID] = newBatch(c.maxStreams, e) diff --git a/internal/component/common/loki/client/client_test.go b/internal/component/common/loki/client/client_test.go index 4849562bdd..94f9e182e2 100644 --- a/internal/component/common/loki/client/client_test.go +++ b/internal/component/common/loki/client/client_test.go @@ -9,6 +9,8 @@ import ( "testing" "time" + "github.com/grafana/loki/pkg/push" + "github.com/go-kit/log" "github.com/grafana/dskit/backoff" "github.com/grafana/dskit/flagext" @@ -34,6 +36,16 @@ var logEntries = []loki.Entry{ {Labels: model.LabelSet{"__tenant_id__": "tenant-1"}, Entry: logproto.Entry{Timestamp: time.Unix(5, 0).UTC(), Line: "line5"}}, {Labels: model.LabelSet{"__tenant_id__": "tenant-2"}, Entry: logproto.Entry{Timestamp: time.Unix(6, 0).UTC(), Line: "line6"}}, {Labels: model.LabelSet{}, Entry: logproto.Entry{Timestamp: time.Unix(6, 0).UTC(), Line: "line0123456789"}}, + { + Labels: model.LabelSet{}, + Entry: logproto.Entry{ + Timestamp: time.Unix(7, 0).UTC(), + Line: "line7", + StructuredMetadata: push.LabelsAdapter{ + {Name: "trace_id", Value: "12345"}, + }, + }, + }, } func TestClient_Handle(t *testing.T) { diff --git a/internal/component/common/loki/client/queue_client.go b/internal/component/common/loki/client/queue_client.go index 4f6bef989b..f038242b9b 100644 --- a/internal/component/common/loki/client/queue_client.go +++ b/internal/component/common/loki/client/queue_client.go @@ -344,7 +344,7 @@ func (c *queueClient) appendSingleEntry(segmentNum int, lbs model.LabelSet, e lo // If adding the entry to the batch will increase the size over the max // size allowed, we do send the current batch and then create a new one - if batch.sizeBytesAfter(e.Line) > c.cfg.BatchSize { + if batch.sizeBytesAfter(e) > c.cfg.BatchSize { c.sendQueue.enqueue(queuedBatch{ TenantID: tenantID, Batch: batch, diff --git a/web/ui/build/asset-manifest.json b/web/ui/build/asset-manifest.json new file mode 100644 index 0000000000..2451e3a205 --- /dev/null +++ b/web/ui/build/asset-manifest.json @@ -0,0 +1,26 @@ +{ + "files": { + "main.css": "./public/static/css/main.d3ff49f0.css", + "main.js": "./public/static/js/main.180d839c.js", + "static/media/fira-code-v21-latin-500.woff2": "./public/static/media/fira-code-v21-latin-500.3452777c99809dd85b2a.woff2", + "static/media/fira-code-v21-latin-regular.woff2": "./public/static/media/fira-code-v21-latin-regular.e662d57ce51fba1f46e3.woff2", + "static/media/roboto-v30-latin-900italic.woff2": "./public/static/media/roboto-v30-latin-900italic.5b387ea565e67898ca3a.woff2", + "static/media/roboto-v30-latin-300italic.woff2": "./public/static/media/roboto-v30-latin-300italic.1128daa312ec555266d5.woff2", + "static/media/roboto-v30-latin-italic.woff2": "./public/static/media/roboto-v30-latin-italic.e10742dbb1d4a0864ba8.woff2", + "static/media/roboto-v30-latin-500italic.woff2": "./public/static/media/roboto-v30-latin-500italic.3a43b67e5bbdfb3ab0a6.woff2", + "static/media/roboto-v30-latin-100italic.woff2": "./public/static/media/roboto-v30-latin-100italic.d3935eb61aa8422388e2.woff2", + "static/media/roboto-v30-latin-700italic.woff2": "./public/static/media/roboto-v30-latin-700italic.d92a5d1451f249359639.woff2", + "static/media/roboto-v30-latin-500.woff2": "./public/static/media/roboto-v30-latin-500.f25d774ecfe0996f8eb5.woff2", + "static/media/roboto-v30-latin-700.woff2": "./public/static/media/roboto-v30-latin-700.227c93190fe7f82de3f8.woff2", + "static/media/roboto-v30-latin-100.woff2": "./public/static/media/roboto-v30-latin-100.30fb0679553d179c3343.woff2", + "static/media/roboto-v30-latin-900.woff2": "./public/static/media/roboto-v30-latin-900.2e8becfcae330421664b.woff2", + "static/media/roboto-v30-latin-regular.woff2": "./public/static/media/roboto-v30-latin-regular.b009a76ad6afe4ebd301.woff2", + "static/media/roboto-v30-latin-300.woff2": "./public/static/media/roboto-v30-latin-300.c48fb6765a9fcb00b330.woff2", + "static/media/logo.svg": "./public/static/media/logo.c578039fa12bc65fb40a9b7ee1391e66.svg", + "index.html": "./public/index.html" + }, + "entrypoints": [ + "static/css/main.d3ff49f0.css", + "static/js/main.180d839c.js" + ] +} \ No newline at end of file diff --git a/web/ui/build/favicon.ico b/web/ui/build/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..497d0dd94739e199176c137b5273eecaa1f426bf GIT binary patch literal 16958 zcmeI4Yj9Q76@WLjBb})uwc{uqG*1$Ooz6Iws?%u)>yJ8pIGxTgt<_d-eL#3ed>{x3 z@`x6}pooBYc}SEf(kfO`Ud95N2ndKY)ha~kOn)fk=7xKd+BCc0+WYKt&po-XWa^CC z(D__v@3qf9XMKB}YyY59L-^lSS1JBkq$;jf>H?)y1u&&*K<3S#tCafsg%&%Zl-7EX zK?j39FxUfwJ@9|n1BGvP?F0?C6&~zThBt{xe(2?!19PhIFl(A&Z-NLd@P@|$;sI|j z*^|8rghO2gaCO1qu3y0vxYJ`w!4WejIawoXE#AH6*|L}HyWe}x>qO=Xj=|9s_A=J+ zqtLutcXPqpHu125ay(87|~Ldp5!P#kq5Eg!(xX7y-SYp$hE0Mwl}e|8nkq>%W-%czkX%POVq%U+*^_#bss=l1tCa%#Y{Z zi`mcinyX(N&@aZ(n_VM_y`JYPZ_ecL>H2Cd*W&p&=NH4FhKO+~d!Wr9RoyaywCbTqJWvQoEe}zC;0Q8$qYVdKI^sX(pF1ecd+VK;FT= ztMqG2LVD0SoyN8873mq*H*X|Xn>G6rC#WR`8a7E?MX$ncTVoM5!c@@E1K%)fnwa04 zm~G~9=c4CPTxKTe(m74WphsC39EYz{o!)ECPCUGxxDY<^oX;Sd^W=SPU(0V*bK)t_ z`QMA060M-&El@?fV0)Yh;^NiBQ=s7kGk%5nrbMkbC-X_HM{$`Q>(hG6a-G#<(6PAM z%RAYglwNq>>(@=DU!{&$K>Ai3y_PuSx!q5lvx|1ewP9C$SeSpA1IRA zcgKH1)O~0Q%*nNnaVviN5_FgAI+s(M|FP-MJ&F0IC#~Cs=G^RAN!)j3Y_`mX6=skJF_+&H&h z-@!p6oCx&m0pn^1HEoX<7yUVY7_?zKQIK(C{2#daCdj%Q%)HCHDDLvX`gNYu$6QW> z`Sf0|H+|X^zl2`>(DZL#mq&3^Zd}QkN^OmCRlF_!3-}1Mp)o!g2j=&HvE=KD8_9*> zUh!moIfuETbC)gV<21NN{O*X?nR@KED&O)1=rKLJGyV}h`%B};eGm3rRgu*9C&LD! zhNCj}yr|-rOfKT(bn(lq$%XTnErwi%-4@#(?2p@syfgLM-*EXY-yYxV_3Z|totNKw zDBgO;@*>ev&zy$8`Z>2|>zRnjy+q!CgO_q(U5d}la@Jbd@ih4aho0AFY9vom3*pO=~36qF1DC8FURZY zSvP0n7HUhSp0S2jfBp}wu|$YEE7qO(%T6Yb!TDT1gZZRW>Ct3g+v^t3x%75Qu4MBW z6{4Q8hSt!$tc#R9Pc9#DSmNRN6sPIQ<<#YKIhFhie51*Jb$#37^=y4OSJFWJsnj#p z(CW`W%Nk3BsMGQs^Z8=^isQcI<2JM=N1`q=feDtV?eOg(cNTK(K6 z)>y77*>t8BFEb3Ah=Lo318W4AcVicmJuAK2;`MAj(e<*8Pq9ZT&oI{T zmOsDIU$c<89%#+TMsk_3PQ`0(o@Pydu>IOY&n`55>%7>w2TvNF_I-Kz(si9G#0JK? zbbaRsFvQPoVBPx82uMzsZpaf{mU`e!yk=%2xqPtwDLtBwi0Mf=GwEyFd+!l7Z1Bcz zUX@0uE0qO|wa52L*N}fAX4kBx{MM~{PicMab3ckPpZ=h^NM$r^OD}a(s#bG zvlhQ9h^bF%Oj68s4`}!|j5GC%gC{%Jg3e0PopYEuX7ZSAK9}Ehyra}Etn2(44!ZrG zUEf(QPEuG+U45Bcx++7SEQ^II#D>66 zVJ=LEL!h(rc&r0oWz=W(8Toij_E8c`*Vs9np3Rz*0k0>`+!KMill5C?tJrfD4pKcQ zy(fG15YMiHYPgnXo@HFx@1ei-`|m#TF=|*Ii-69;$K=lE9hG42c{Da+Ct4LM$Gf2&jfKE+%wqwa-F&V z&6$l{Y3f!Zml2my|1zE}JQ5%|zL7dz-HJ7e@mA2#Y{oJt^^1q)vFqUH(i>)6M|>D0 zx;eMrjUS8M>R9HI_+T%RS_J3H$%v0#SmGLQ zjqz;GU;0V@oyh;s3uD&Go?+ZOE%u%*&tKB97<5{ecHB|M8hK~)?hmp4;f{s4(*d3{ zYuK|)kTrrlLvUlFD1NTBT?|&LJbbC>*mqQiQ2-F;=j=Af|N&R2N^&EH*YCJ0OxjEo8=vR7k z8n}M7y&LcvbS&2yYftZF4C}SegIwpPmo?+zC@ytcoKwlW>%|?VT#pZo#hoR&COPMF z4|R<3-1$9}b-V}%{o@4dbsuUwPL|bn9Dz1C4kzGWu+DQlk?S7#03?5$`5^Bzeiynx zyuJX(K(7DE+&jcJI07dj=|1W8c&J~){o8lEAgapx#}d|S3-7SNr=e`2=Tf4(t_}2< zc$RTC7In-?Yl@#P|e;+*Fo>Pd|q@M;JKg3 zyAF(I?$dp^kGcDzZOnhCd=`7>OYj|}RyhZWGCzmC=CY@A+&4BGZ{n`MWIK=Sxyv|9 zosn7OW<_6xrLX`NL2X86lM`k|A24fYM`xPx?C2hRTF=(4_ziOzb80}`)2_+~$f zCxRYzPrGK1{Fuo)AL^KyhHPHLxmnSP_{zV}LTg9e)vgB2-Q0U;`%2J;yNLNB-ZD_m zyiazoD{;y1%)l9N?atesIJl#|0dxv880Uj?mo27u+Az?*4c_-ZslN&b)7w{o&Po;e zdPIyaT9t>m6c?!_hbtIu)$;y_j0ZWvA+2UV~Iv_}JR z28_eeaI?PB^Y_K7Us0cRam(p36}M3Tt%i}*ZgY|sUthHPU0t_P+iwluC2EgL%$($s z-;H(fMLB=YboB4w##5G?PJMgyO{cWSXn+3Jz}ZU=d=cuW4paN})c)%fj*R}zsiU9_ zl9M&J1p44pu7B|Fe-8fr*TEhb?18}^_`mG|jz0fCg@w9psP67A9M+@M*eJ10si6{U z_zw*b&z1kO!1V6Ib0l8cT{v9g@a}WJCh;rNYc7>|&XAfSiC-Sl)+TZ2&<-0P?sv4W z?%x;n_VMDd=*?`e&K}k+L8(ICy1S4!?^S1Y7dEMCs<~(^73sEN1=UfB1;ccAFe>#W zC1bgr7?uC5!Z2c?j$SEon2t^-c5~bGLLzqBh&@BJt{F>|`-r^~t2KYcm_GzvgD;6q jN}VOK&1^3ZknPQlVmrY`)+ literal 0 HcmV?d00001 diff --git a/web/ui/build/index.html b/web/ui/build/index.html new file mode 100644 index 0000000000..06f88a55db --- /dev/null +++ b/web/ui/build/index.html @@ -0,0 +1 @@ +Grafana Agent
\ No newline at end of file diff --git a/web/ui/build/manifest.json b/web/ui/build/manifest.json new file mode 100644 index 0000000000..deb995a2d1 --- /dev/null +++ b/web/ui/build/manifest.json @@ -0,0 +1,15 @@ +{ + "short_name": "Grafana Agent", + "name": "Grafana Agent", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/web/ui/build/robots.txt b/web/ui/build/robots.txt new file mode 100644 index 0000000000..e9e57dc4d4 --- /dev/null +++ b/web/ui/build/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/web/ui/build/static/css/main.d3ff49f0.css b/web/ui/build/static/css/main.d3ff49f0.css new file mode 100644 index 0000000000..88c5c8534f --- /dev/null +++ b/web/ui/build/static/css/main.d3ff49f0.css @@ -0,0 +1,3 @@ +.Navbar_navbar__-GvMT{background-color:#fff;border-bottom:1px solid #e4e5e6;display:flex;height:30px;padding:10px 16px;position:relative}.Navbar_navbar__-GvMT header,.Navbar_navbar__-GvMT header img{display:block;height:26px;margin-top:1px}.Navbar_navbar__-GvMT header img:hover{cursor:pointer}.Navbar_navbar__-GvMT ul{display:flex;flex-direction:row;list-style-type:none;margin:0;padding-left:1.5em}.Navbar_navbar__-GvMT ul li{display:list-item;margin-right:1em}.Navbar_navbar__-GvMT a,.Navbar_navbar__-GvMT ul li{color:#25292e;font-family:Roboto,sans-serif;line-height:225%;text-decoration:none}.Table_table__eD24h{border-collapse:collapse;width:100%}.Table_table__eD24h td,.Table_table__eD24h th{border:none;padding:0 8px}.Table_table__eD24h tr:nth-child(odd){background-color:#f4f5f5}.Table_table__eD24h tr:nth-child(2n){background-color:#fff}.Table_table__eD24h tr:hover{background-color:#ddd}.Table_table__eD24h th{background-color:#f4f5f5;color:#24292ebf;padding:8px;text-align:left}.Table_table__eD24h td:first-child{width:25%}.PeerList_list__qS4-l{border:1px solid #e4e5e6;border-radius:3px;box-sizing:border-box;color:#24292ebf}.PeerList_list__qS4-l .PeerList_viewButton__hSIX9{background:none;background-color:#3885dc;border:1px solid #3885dc;border-radius:3px;color:#fff;font-size:.8em;line-height:24px;margin-left:auto;padding:0 15px;text-decoration:none}.PeerList_idColumn__lw0IS{align-items:center;display:flex;flex-wrap:wrap}.PeerList_idName__89ysn{word-wrap:break-word;display:inline-block;width:80%}div.Page_page__67sBm{display:flex;flex-direction:column;height:100%;margin-left:auto;margin-right:auto;max-width:1440px}div.Page_page__67sBm main{background-color:#fff;border:1px solid #e4e5e6;border-radius:3px;box-sizing:border-box;flex-grow:1;margin:0 16px 16px;overflow:auto;padding:8px}.Page_header__n4dYu{align-items:center;display:flex;font-family:Roboto,sans-serif;height:50px;padding:24px}.Page_header__n4dYu .Page_icon__2jrfd{margin-right:10px;width:50px}.Page_header__n4dYu .Page_icon__2jrfd svg{color:#24292ebf;height:35px;width:100%}.Page_header__n4dYu h1,.Page_header__n4dYu h2{margin:0;padding:0}.Page_header__n4dYu h1{color:#24292e;font-size:24px;font-weight:400;margin-bottom:4px}.Page_header__n4dYu h2{color:#24292ebf;font-size:14px;font-weight:400}.Table_table__2oeKX{border-collapse:collapse;table-layout:fixed;width:100%}.Table_table__2oeKX td,.Table_table__2oeKX th{border:none;padding:0 8px}.Table_table__2oeKX tr:nth-child(odd){background-color:#f4f5f5}.Table_table__2oeKX tr:nth-child(2n){background-color:#fff}.Table_table__2oeKX tr:hover{background-color:#ddd}.Table_table__2oeKX th{background-color:#f4f5f5;color:#24292ebf;padding:8px;text-align:left}.Table_table__2oeKX td:first-child{width:2%}.Table_table__2oeKX tr th[data-sort-order=desc]{box-shadow:none!important;cursor:pointer;&:before{content:"â–¼";float:right}}.Table_table__2oeKX tr th[data-sort-order=asc]{box-shadow:none!important;cursor:pointer;&:before{content:"â–²";float:right}}.ComponentView_page__gf0nL{display:flex;font-family:Roboto,sans-serif;height:100%}.ComponentView_page__gf0nL nav{border-radius:3px;font-size:.9em;margin:15px;min-width:250px;overflow-y:auto;width:250px}.ComponentView_page__gf0nL nav h1{color:#545556;font-size:.8em;font-weight:700;margin:0}.ComponentView_page__gf0nL nav ul{list-style-type:none;padding-left:16px}.ComponentView_page__gf0nL nav hr{border:none;border-top:1px solid #545556}.ComponentView_page__gf0nL nav a,.ComponentView_page__gf0nL nav li{color:#545556;margin:20px 0;text-decoration:none}.ComponentView_page__gf0nL nav a:focus,.ComponentView_page__gf0nL nav a:hover{text-decoration:underline}.ComponentView_page__gf0nL .ComponentView_content__t7uJn{margin-left:auto;margin-right:auto;max-width:1440px;overflow-y:auto;padding:20px}.ComponentView_content__t7uJn h1 .ComponentView_icon__XK\+wx{margin-right:5px}.ComponentView_content__t7uJn h1 span.ComponentView_healthLabel__5bkMr{position:relative;top:-3px}.ComponentView_content__t7uJn h1 span.ComponentView_healthLabel__5bkMr>*{transform:scale(.75)}.ComponentView_content__t7uJn h1 .ComponentView_icon__XK\+wx svg{color:#24292ebf;position:relative;top:2px;width:21px}.ComponentView_content__t7uJn h1,h2,h3,h4,h5,h6{color:#24292e;font-size:1.4em;font-weight:400;margin-bottom:8px}.ComponentView_content__t7uJn h2,h3,h4,h5,h6{font-size:1.2em}.ComponentView_content__t7uJn .ComponentView_docsLink__W1YK5{background-color:#3885dc;border:1px solid #3885dc;border-radius:3px;color:#fff;display:block;font-size:10px;height:-moz-fit-content;height:fit-content;padding:5px;width:-moz-fit-content;width:fit-content}.ComponentView_docsLink__W1YK5 a{color:#fff;text-decoration:none}.ComponentView_content__t7uJn blockquote{border:1px solid #e4e5e6;border-radius:3px;color:#555;margin:20px 0;padding:20px}.ComponentView_content__t7uJn blockquote h1{color:#555;font-size:12px;font-weight:700;margin:0}.ComponentView_content__t7uJn blockquote p{font-family:Fira Code,monospace;margin-bottom:0}.ComponentView_content__t7uJn div.ComponentView_sectionContent__fuwHV{background-color:#fff;border:1px solid #e4e5e6;border-radius:3px;padding:16px}.ComponentView_content__t7uJn section.ComponentView_nested__-EvB0{margin-left:32px}em.ComponentView_informative__CNCGB{color:#555;font-size:14px}.ComponentView_list__QIdqN{border:1px solid #e4e5e6;border-radius:3px;box-sizing:border-box;color:#24292ebf}td.ComponentView_nameColumn__DGBw9{color:#000;font-family:Fira Code,monospace;font-size:14px;padding:6px;vertical-align:top}.ComponentView_pre__S2vse{font-size:14px;margin:0}span.HealthLabel_health__Eu\+ej{background-color:#595c60;border:1px solid #595c60;border-radius:3px;color:#fff;display:inline-block;font-size:12px;font-weight:600;line-height:1.2em;min-width:64px;padding:4px 8px;text-align:center;text-transform:capitalize}span.HealthLabel_health__Eu\+ej.HealthLabel_state-ok__N9y\+C{background-color:#3b8160;border-color:#3b8160;color:#fff}span.HealthLabel_health__Eu\+ej.HealthLabel_state-error__1XT86{background-color:#d2476d;border-color:#d2476d;color:#fff}span.HealthLabel_health__Eu\+ej.HealthLabel_state-warn__FRpNr{background-color:#f5d65b;border-color:#f5d65b;color:#000}.ComponentList_list__edZFH{border:1px solid #e4e5e6;border-radius:3px;box-sizing:border-box;color:#24292ebf}.ComponentList_list__edZFH .ComponentList_viewButton__RgzV6{background:none;background-color:#3885dc;border:1px solid #3885dc;border-radius:3px;color:#fff;font-size:.8em;line-height:24px;margin-left:auto;padding:0 15px;text-decoration:none}.ComponentList_idColumn__Sh4hu{align-items:center;display:flex;flex-wrap:wrap}.ComponentList_idName__kQnvD{word-wrap:break-word;display:inline-block;width:80%}.App_app__zr1wm{display:flex;flex-direction:column;height:100%}.App_app__zr1wm main{flex-grow:1;overflow-y:hidden} + +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.15}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:initial;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:initial}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:initial}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}@font-face{font-display:swap;font-family:Roboto;font-style:normal;font-weight:100;src:url(../../static/media/roboto-v30-latin-100.30fb0679553d179c3343.woff2) format("woff2")x}@font-face{font-display:swap;font-family:Roboto;font-style:italic;font-weight:100;src:url(../../static/media/roboto-v30-latin-100italic.d3935eb61aa8422388e2.woff2) format("woff2")}@font-face{font-display:swap;font-family:Roboto;font-style:normal;font-weight:300;src:url(../../static/media/roboto-v30-latin-300.c48fb6765a9fcb00b330.woff2) format("woff2")}@font-face{font-display:swap;font-family:Roboto;font-style:italic;font-weight:300;src:url(../../static/media/roboto-v30-latin-300italic.1128daa312ec555266d5.woff2) format("woff2")}@font-face{font-display:swap;font-family:Roboto;font-style:normal;font-weight:400;src:url(../../static/media/roboto-v30-latin-regular.b009a76ad6afe4ebd301.woff2) format("woff2")}@font-face{font-display:swap;font-family:Roboto;font-style:italic;font-weight:400;src:url(../../static/media/roboto-v30-latin-italic.e10742dbb1d4a0864ba8.woff2) format("woff2")}@font-face{font-display:swap;font-family:Roboto;font-style:normal;font-weight:500;src:url(../../static/media/roboto-v30-latin-500.f25d774ecfe0996f8eb5.woff2) format("woff2")}@font-face{font-display:swap;font-family:Roboto;font-style:italic;font-weight:500;src:url(../../static/media/roboto-v30-latin-500italic.3a43b67e5bbdfb3ab0a6.woff2) format("woff2")}@font-face{font-display:swap;font-family:Roboto;font-style:normal;font-weight:700;src:url(../../static/media/roboto-v30-latin-700.227c93190fe7f82de3f8.woff2) format("woff2")}@font-face{font-display:swap;font-family:Roboto;font-style:italic;font-weight:700;src:url(../../static/media/roboto-v30-latin-700italic.d92a5d1451f249359639.woff2) format("woff2")}@font-face{font-display:swap;font-family:Roboto;font-style:normal;font-weight:900;src:url(../../static/media/roboto-v30-latin-900.2e8becfcae330421664b.woff2) format("woff2")}@font-face{font-display:swap;font-family:Roboto;font-style:italic;font-weight:900;src:url(../../static/media/roboto-v30-latin-900italic.5b387ea565e67898ca3a.woff2) format("woff2")}@font-face{font-display:swap;font-family:Fira Code;font-style:normal;font-weight:400;src:url(../../static/media/fira-code-v21-latin-regular.e662d57ce51fba1f46e3.woff2) format("woff2")}@font-face{font-display:swap;font-family:Fira Code;font-style:normal;font-weight:500;src:url(../../static/media/fira-code-v21-latin-500.3452777c99809dd85b2a.woff2) format("woff2")}#root,body,html{height:100%}body{background-color:#f4f4f5;font-family:Roboto,sans-serif}.app-navbar{background-color:#fff;border-bottom:1px solid #e4e5e5}.app-navbar .navbar-brand img:hover{cursor:pointer}.app-navbar div[role=menu]{border:1px solid #e4e5e5}.app-navbar a{color:#25292e}code,pre{font-family:Fira Code,monospace} \ No newline at end of file diff --git a/web/ui/build/static/js/main.180d839c.js b/web/ui/build/static/js/main.180d839c.js new file mode 100644 index 0000000000..7c7195dad5 --- /dev/null +++ b/web/ui/build/static/js/main.180d839c.js @@ -0,0 +1,2 @@ +/*! For license information please see main.180d839c.js.LICENSE.txt */ +(()=>{var e={2047:(e,t)=>{"use strict";t.Q=function(e){var t,a=[],i=String(e||r),o=i.indexOf(n),s=0,l=!1;for(;!l;)-1===o&&(o=i.length,l=!0),!(t=i.slice(s,o).trim())&&l||a.push(t),s=o+1,o=i.indexOf(n,s);return a};var n=",",a=" ",r=""},3656:e=>{"use strict";e.exports=function(e,n){var a,r,i,o=e||"",s=n||"div",l={},u=0;for(;u{"use strict";var a=n(5971),r=n(695),i=n(3656),o=n(2954).Q,s=n(2047).Q;e.exports=function(e,t,n){var r=n?function(e){var t,n=e.length,a=-1,r={};for(;++a{"use strict";var a=n(3294),r=n(3389)(a,"div");r.displayName="html",e.exports=r},9762:(e,t,n)=>{"use strict";e.exports=n(9073)},7631:e=>{"use strict";e.exports=function(e){var t="string"===typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}},9319:(e,t,n)=>{"use strict";var a=n(7631),r=n(4597);e.exports=function(e){return a(e)||r(e)}},4597:e=>{"use strict";e.exports=function(e){var t="string"===typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}},6422:e=>{"use strict";e.exports=function(e){var t="string"===typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}},9718:e=>{"use strict";var t;e.exports=function(e){var n,a="&"+e+";";if((t=t||document.createElement("i")).innerHTML=a,59===(n=t.textContent).charCodeAt(n.length-1)&&"semi"!==e)return!1;return n!==a&&n}},7898:(e,t,n)=>{"use strict";var a=n(7452),r=n(3580),i=n(4597),o=n(6422),s=n(9319),l=n(9718);e.exports=function(e,t){var n,i,o={};t||(t={});for(i in p)n=t[i],o[i]=null===n||void 0===n?p[i]:n;(o.position.indent||o.position.start)&&(o.indent=o.position.indent||[],o.position=o.position.start);return function(e,t){var n,i,o,p,$,z,G,j,H,V,W,q,Y,K,X,Z,Q,J,ee,te=t.additional,ne=t.nonTerminated,ae=t.text,re=t.reference,ie=t.warning,oe=t.textContext,se=t.referenceContext,le=t.warningContext,ue=t.position,ce=t.indent||[],de=e.length,pe=0,fe=-1,me=ue.column||1,ge=ue.line||1,he="",be=[];"string"===typeof te&&(te=te.charCodeAt(0));Z=ye(),j=ie?ve:d,pe--,de++;for(;++pe65535&&(V+=c((z-=65536)>>>10|55296),z=56320|1023&z),z=V+c(z))):K!==A&&j(L,J)),z?(Ee(),Z=ye(),pe=ee-1,me+=ee-Y+1,be.push(z),(Q=ye()).offset++,re&&re.call(se,z,{start:Z,end:Q},e.slice(Y-1,ee)),Z=Q):(p=e.slice(Y-1,ee),he+=p,me+=p.length,pe=ee-1)}else 10===$&&(ge++,fe++,me=0),$===$?(he+=c($),me++):Ee();return be.join("");function ye(){return{line:ge,column:me,offset:pe+(ue.offset||0)}}function ve(e,t){var n=ye();n.column+=t,n.offset+=t,ie.call(le,F[e],n,e)}function Ee(){he&&(be.push(he),ae&&ae.call(oe,he,{start:Z,end:ye()}),he="")}}(e,o)};var u={}.hasOwnProperty,c=String.fromCharCode,d=Function.prototype,p={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},f=9,m=10,g=12,h=32,b=38,y=59,v=60,E=61,S=35,w=88,_=120,T=65533,A="named",k="hexadecimal",I="decimal",x={};x[k]=16,x[I]=10;var N={};N[A]=s,N[I]=i,N[k]=o;var R=1,C=2,O=3,L=4,D=5,P=6,M=7,F={};function U(e){return e>=55296&&e<=57343||e>1114111}function B(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||65535===(65535&e)||65534===(65535&e)}F[R]="Named character references must be terminated by a semicolon",F[C]="Numeric character references must be terminated by a semicolon",F[O]="Named character references cannot be empty",F[L]="Numeric character references cannot be empty",F[D]="Named character references must be known",F[P]="Numeric character references cannot be disallowed",F[M]="Numeric character references cannot be outside the permissible Unicode range"},1729:(e,t,n)=>{"use strict";var a=n(9165);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,o){if(o!==a){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},5192:(e,t,n)=>{e.exports=n(1729)()},9165:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5971:(e,t,n)=>{"use strict";var a=n(695),r=n(9079),i=n(8018),o="data";e.exports=function(e,t){var n=a(t),p=t,f=i;if(n in e.normal)return e.property[e.normal[n]];n.length>4&&n.slice(0,4)===o&&s.test(t)&&("-"===t.charAt(4)?p=function(e){var t=e.slice(5).replace(l,d);return o+t.charAt(0).toUpperCase()+t.slice(1)}(t):t=function(e){var t=e.slice(4);if(l.test(t))return e;t=t.replace(u,c),"-"!==t.charAt(0)&&(t="-"+t);return o+t}(t),f=r);return new f(p,t)};var s=/^data[-\w.:]+$/i,l=/-[a-z]/g,u=/[A-Z]/g;function c(e){return"-"+e.toLowerCase()}function d(e){return e.charAt(1).toUpperCase()}},3294:(e,t,n)=>{"use strict";var a=n(5237),r=n(7848),i=n(9698),o=n(4720),s=n(2410),l=n(9403);e.exports=a([i,r,o,s,l])},2410:(e,t,n)=>{"use strict";var a=n(1210),r=n(3096),i=a.booleanish,o=a.number,s=a.spaceSeparated;e.exports=r({transform:function(e,t){return"role"===t?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:i,ariaAutoComplete:null,ariaBusy:i,ariaChecked:i,ariaColCount:o,ariaColIndex:o,ariaColSpan:o,ariaControls:s,ariaCurrent:null,ariaDescribedBy:s,ariaDetails:null,ariaDisabled:i,ariaDropEffect:s,ariaErrorMessage:null,ariaExpanded:i,ariaFlowTo:s,ariaGrabbed:i,ariaHasPopup:null,ariaHidden:i,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:s,ariaLevel:o,ariaLive:null,ariaModal:i,ariaMultiLine:i,ariaMultiSelectable:i,ariaOrientation:null,ariaOwns:s,ariaPlaceholder:null,ariaPosInSet:o,ariaPressed:i,ariaReadOnly:i,ariaRelevant:null,ariaRequired:i,ariaRoleDescription:s,ariaRowCount:o,ariaRowIndex:o,ariaRowSpan:o,ariaSelected:i,ariaSetSize:o,ariaSort:null,ariaValueMax:o,ariaValueMin:o,ariaValueNow:o,ariaValueText:null,role:null}})},9403:(e,t,n)=>{"use strict";var a=n(1210),r=n(3096),i=n(3809),o=a.boolean,s=a.overloadedBoolean,l=a.booleanish,u=a.number,c=a.spaceSeparated,d=a.commaSeparated;e.exports=r({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:i,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:d,acceptCharset:c,accessKey:c,action:null,allow:null,allowFullScreen:o,allowPaymentRequest:o,allowUserMedia:o,alt:null,as:null,async:o,autoCapitalize:null,autoComplete:c,autoFocus:o,autoPlay:o,capture:o,charSet:null,checked:o,cite:null,className:c,cols:u,colSpan:null,content:null,contentEditable:l,controls:o,controlsList:c,coords:u|d,crossOrigin:null,data:null,dateTime:null,decoding:null,default:o,defer:o,dir:null,dirName:null,disabled:o,download:s,draggable:l,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:o,formTarget:null,headers:c,height:u,hidden:o,high:u,href:null,hrefLang:null,htmlFor:c,httpEquiv:c,id:null,imageSizes:null,imageSrcSet:d,inputMode:null,integrity:null,is:null,isMap:o,itemId:null,itemProp:c,itemRef:c,itemScope:o,itemType:c,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:o,low:u,manifest:null,max:null,maxLength:u,media:null,method:null,min:null,minLength:u,multiple:o,muted:o,name:null,nonce:null,noModule:o,noValidate:o,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextMenu:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:o,optimum:u,pattern:null,ping:c,placeholder:null,playsInline:o,poster:null,preload:null,readOnly:o,referrerPolicy:null,rel:c,required:o,reversed:o,rows:u,rowSpan:u,sandbox:c,scope:null,scoped:o,seamless:o,selected:o,shape:null,size:u,sizes:null,slot:null,span:u,spellCheck:l,src:null,srcDoc:null,srcLang:null,srcSet:d,start:u,step:null,style:null,tabIndex:u,target:null,title:null,translate:null,type:null,typeMustMatch:o,useMap:null,value:l,width:u,wrap:null,align:null,aLink:null,archive:c,axis:null,background:null,bgColor:null,border:u,borderColor:null,bottomMargin:u,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:o,declare:o,event:null,face:null,frame:null,frameBorder:null,hSpace:u,leftMargin:u,link:null,longDesc:null,lowSrc:null,marginHeight:u,marginWidth:u,noResize:o,noHref:o,noShade:o,noWrap:o,object:null,profile:null,prompt:null,rev:null,rightMargin:u,rules:null,scheme:null,scrolling:l,standby:null,summary:null,text:null,topMargin:u,valueType:null,version:null,vAlign:null,vLink:null,vSpace:u,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:o,disableRemotePlayback:o,prefix:null,property:null,results:u,security:null,unselectable:null}})},3809:(e,t,n)=>{"use strict";var a=n(9717);e.exports=function(e,t){return a(e,t.toLowerCase())}},9717:e=>{"use strict";e.exports=function(e,t){return t in e?e[t]:t}},3096:(e,t,n)=>{"use strict";var a=n(695),r=n(1385),i=n(9079);e.exports=function(e){var t,n,o=e.space,s=e.mustUseProperty||[],l=e.attributes||{},u=e.properties,c=e.transform,d={},p={};for(t in u)n=new i(t,c(l,t),u[t],o),-1!==s.indexOf(t)&&(n.mustUseProperty=!0),d[t]=n,p[a(t)]=t,p[a(n.attribute)]=t;return new r(d,p,o)}},9079:(e,t,n)=>{"use strict";var a=n(8018),r=n(1210);e.exports=s,s.prototype=new a,s.prototype.defined=!0;var i=["boolean","booleanish","overloadedBoolean","number","commaSeparated","spaceSeparated","commaOrSpaceSeparated"],o=i.length;function s(e,t,n,s){var u,c=-1;for(l(this,"space",s),a.call(this,e,t);++c{"use strict";e.exports=n;var t=n.prototype;function n(e,t){this.property=e,this.attribute=t}t.space=null,t.attribute=null,t.property=null,t.boolean=!1,t.booleanish=!1,t.overloadedBoolean=!1,t.number=!1,t.commaSeparated=!1,t.spaceSeparated=!1,t.commaOrSpaceSeparated=!1,t.mustUseProperty=!1,t.defined=!1},5237:(e,t,n)=>{"use strict";var a=n(5307),r=n(1385);e.exports=function(e){var t,n,i=e.length,o=[],s=[],l=-1;for(;++l{"use strict";e.exports=n;var t=n.prototype;function n(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}t.space=null,t.normal={},t.property={}},1210:(e,t)=>{"use strict";var n=0;function a(){return Math.pow(2,++n)}t.boolean=a(),t.booleanish=a(),t.overloadedBoolean=a(),t.number=a(),t.spaceSeparated=a(),t.commaSeparated=a(),t.commaOrSpaceSeparated=a()},7848:(e,t,n)=>{"use strict";var a=n(3096);e.exports=a({space:"xlink",transform:function(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}})},9698:(e,t,n)=>{"use strict";var a=n(3096);e.exports=a({space:"xml",transform:function(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}})},4720:(e,t,n)=>{"use strict";var a=n(3096),r=n(3809);e.exports=a({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:r,properties:{xmlns:null,xmlnsXLink:null}})},695:e=>{"use strict";e.exports=function(e){return e.toLowerCase()}},534:(e,t,n)=>{"use strict";var a=n(7313),r=n(2224);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n