Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid default flow config on Debian #5802

Closed
bricewge opened this issue Nov 17, 2023 · 1 comment · Fixed by #5809
Closed

Invalid default flow config on Debian #5802

bricewge opened this issue Nov 17, 2023 · 1 comment · Fixed by #5809
Labels
bug Something isn't working frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. good first issue Good issue for new contributors

Comments

@bricewge
Copy link
Contributor

What's wrong?

After installing grafana-agent-flow on Debian 12, the service won't start because the default flow config is invalid.

I had to make the folowing changes to cat /etc/grafana-agent-flow.river :

--- grafana-agent-flow.river.orig       2023-11-17 18:17:29.927141344 +0100
+++ grafana-agent-flow.river    2023-11-17 18:02:52.020537699 +0100
@@ -5,14 +5,14 @@
        level = "warn"
 }

-prometheus.exporter.unix {
+prometheus.exporter.unix "default" {
        include_exporter_metrics = true
        disable_collectors       = ["mdadm"]
 }

 prometheus.scrape "default" {
        targets = concat(
-               prometheus.exporter.unix.targets,
+               prometheus.exporter.unix.default.targets,
                [{
                        // Self-collect metrics
                        job         = "agent",

As a noob, it wasn't trivial as reading the documentation about syntax language because it doesn't contain a pattern on how to access labeled block; the textual description « In these cases the label will be used to disambiguate between multiple top-level blocks of the same name. » didn't helped.

Steps to reproduce

apt-get install grafana-agent-flow
systemctl start grafana-agent-flow.service
journalctl -u grafana-agent-flow.service 

System information

Debian GNU/Linux 12 (bookworm)

Software version

Grafana Agent Flow v0.37.4

Configuration

No response

Logs

Nov 17 17:37:49 test-multiphp-v2 systemd[1]: Started grafana-agent-flow.service - Vendor-neutral programmable observability pipelines..
Nov 17 17:37:49 test-multiphp-v2 grafana-agent-flow[4036870]: ts=2023-11-17T16:37:49.286196808Z level=info "boringcrypto enabled"=false
Nov 17 17:37:49 test-multiphp-v2 grafana-agent-flow[4036870]: Error: /etc/grafana-agent-flow.river:8:1: Component "prometheus.exporter.unix" must have
Nov 17 17:37:49 example systemd[1]: Started grafana-agent-flow.service - Vendor-neutral programmable observability pipelines..
Nov 17 17:37:49 example grafana-agent-flow[4036870]: ts=2023-11-17T16:37:49.286196808Z level=info "boringcrypto enabled"=false                        Nov 17 17:37:49 example grafana-agent-flow[4036870]: Error: /etc/grafana-agent-flow.river:8:1: Component "prometheus.exporter.unix" must have a label
Nov 17 17:37:49 example grafana-agent-flow[4036870]: 7 |
Nov 17 17:37:49 example grafana-agent-flow[4036870]: 8 | prometheus.exporter.unix {
Nov 17 17:37:49 example grafana-agent-flow[4036870]:   | ^^^^^^^^^^^^^^^^^^^^^^^^
Nov 17 17:37:49 example grafana-agent-flow[4036870]: 9 |     include_exporter_metrics = true
Nov 17 17:37:49 example grafana-agent-flow[4036870]: Error: /etc/grafana-agent-flow.river:15:3: component "prometheus.exporter.unix.targets" does not exist
Nov 17 17:37:49 example grafana-agent-flow[4036870]: 14 |     targets = concat(
Nov 17 17:37:49 example grafana-agent-flow[4036870]: 15 |         prometheus.exporter.unix.targets,
Nov 17 17:37:49 example grafana-agent-flow[4036870]:    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 17 17:37:49 example grafana-agent-flow[4036870]: 16 |         [{
Nov 17 17:37:49 example grafana-agent-flow[4036870]: Error: could not perform the initial load successfully
Nov 17 17:37:49 example systemd[1]: grafana-agent-flow.service: Main process exited, code=exited, status=1/FAILURE
Nov 17 17:37:49 example systemd[1]: grafana-agent-flow.service: Failed with result 'exit-code'.
@bricewge bricewge added the bug Something isn't working label Nov 17, 2023
@rfratto rfratto added the good first issue Good issue for new contributors label Nov 17, 2023
@paguardiolle
Copy link

paguardiolle commented Nov 19, 2023

Same issue on Debian 12.
Thanks for the workaround.

bricewge added a commit to bricewge/agent that referenced this issue Nov 19, 2023
Add needed label in default `grafana-agent-flow.river` default configuration used in downstream packages.
tpaschalis pushed a commit that referenced this issue Nov 20, 2023
* packaging: fix grafana-agent-flow.river (#5802)

Add needed label in default `grafana-agent-flow.river` default configuration used in downstream packages.

* Update CHANGELOG.md
rfratto added a commit to rfratto/agent that referenced this issue Nov 20, 2023
PR grafana#5802 accidentally added the changelog entry to a published release.
rfratto added a commit that referenced this issue Nov 20, 2023
PR #5802 accidentally added the changelog entry to a published release.
rfratto pushed a commit to rfratto/agent that referenced this issue Nov 20, 2023
* packaging: fix grafana-agent-flow.river (grafana#5802)

Add needed label in default `grafana-agent-flow.river` default configuration used in downstream packages.

* Update CHANGELOG.md

(cherry picked from commit eac661f)
rfratto added a commit to rfratto/agent that referenced this issue Nov 20, 2023
PR grafana#5802 accidentally added the changelog entry to a published release.

(cherry picked from commit bc3babc)
rfratto added a commit that referenced this issue Nov 20, 2023
* packaging: fix grafana-agent-flow.river (#5802) (#5809)

* packaging: fix grafana-agent-flow.river (#5802)

Add needed label in default `grafana-agent-flow.river` default configuration used in downstream packages.

* Update CHANGELOG.md

(cherry picked from commit eac661f)

* misc: fix changelog entry (#5812)

PR #5802 accidentally added the changelog entry to a published release.

(cherry picked from commit bc3babc)

* feat(module/git): allow module.git use cached content when failed to fetch (#5712)

Signed-off-by: hainenber <[email protected]>
(cherry picked from commit 39b78a8)

* Fix converter output for prometheus.exporter.windows to not unnecessarily add empty blocks (#5817)

(cherry picked from commit 165914b)

* delete obsolete broken windows test (#5818)

(cherry picked from commit bcbc7ab)

* prepare for release v0.38.0-rc.1 (#5821)

(cherry picked from commit 7d775c1)

---------

Co-authored-by: Brice Waegeneire <[email protected]>
Co-authored-by: Đỗ Trọng Hải <[email protected]>
Co-authored-by: Erik Baranowski <[email protected]>
hainenber pushed a commit to hainenber/agent that referenced this issue Nov 25, 2023
PR grafana#5802 accidentally added the changelog entry to a published release.
hainenber pushed a commit to hainenber/agent that referenced this issue Nov 25, 2023
PR grafana#5802 accidentally added the changelog entry to a published release.
rfratto added a commit that referenced this issue Jan 2, 2024
* feat(exporter/elasticsearch): add Basic Auth support

Signed-off-by: hainenber <[email protected]>

* misc: fix changelog entry (#5812)

PR #5802 accidentally added the changelog entry to a published release.

* fix(exporter/elasticsearch): only add Auth header when needed

Signed-off-by: hainenber <[email protected]>

* doc(exporter/elasticsearch): add Basic Auth block desc

Signed-off-by: hainenber <[email protected]>

* feat(exporter/elasticsearch): add Basic Auth support

Signed-off-by: hainenber <[email protected]>

* feat(exporter/elasticsearch): support Basic Auth for static config

Signed-off-by: hainenber <[email protected]>

* chore(CHANGELOG): remove merge conflict artifact

Signed-off-by: hainenber <[email protected]>

* misc: fix changelog entry

Signed-off-by: hainenber <[email protected]>

* feat(converter): map ES exporter's BasicAuth flow from static to flow

Signed-off-by: hainenber <[email protected]>

* fix(converter): nil check for ES exporter's Basic Auth

Signed-off-by: hainenber <[email protected]>

* lint

Signed-off-by: erikbaranowski <[email protected]>

---------

Signed-off-by: hainenber <[email protected]>
Signed-off-by: erikbaranowski <[email protected]>
Co-authored-by: Robert Fratto <[email protected]>
Co-authored-by: erikbaranowski <[email protected]>
hainenber added a commit to hainenber/agent that referenced this issue Jan 6, 2024
* feat(exporter/elasticsearch): add Basic Auth support

Signed-off-by: hainenber <[email protected]>

* misc: fix changelog entry (grafana#5812)

PR grafana#5802 accidentally added the changelog entry to a published release.

* fix(exporter/elasticsearch): only add Auth header when needed

Signed-off-by: hainenber <[email protected]>

* doc(exporter/elasticsearch): add Basic Auth block desc

Signed-off-by: hainenber <[email protected]>

* feat(exporter/elasticsearch): add Basic Auth support

Signed-off-by: hainenber <[email protected]>

* feat(exporter/elasticsearch): support Basic Auth for static config

Signed-off-by: hainenber <[email protected]>

* chore(CHANGELOG): remove merge conflict artifact

Signed-off-by: hainenber <[email protected]>

* misc: fix changelog entry

Signed-off-by: hainenber <[email protected]>

* feat(converter): map ES exporter's BasicAuth flow from static to flow

Signed-off-by: hainenber <[email protected]>

* fix(converter): nil check for ES exporter's Basic Auth

Signed-off-by: hainenber <[email protected]>

* lint

Signed-off-by: erikbaranowski <[email protected]>

---------

Signed-off-by: hainenber <[email protected]>
Signed-off-by: erikbaranowski <[email protected]>
Co-authored-by: Robert Fratto <[email protected]>
Co-authored-by: erikbaranowski <[email protected]>
BarunKGP pushed a commit to BarunKGP/grafana-agent that referenced this issue Feb 20, 2024
* feat(exporter/elasticsearch): add Basic Auth support

Signed-off-by: hainenber <[email protected]>

* misc: fix changelog entry (grafana#5812)

PR grafana#5802 accidentally added the changelog entry to a published release.

* fix(exporter/elasticsearch): only add Auth header when needed

Signed-off-by: hainenber <[email protected]>

* doc(exporter/elasticsearch): add Basic Auth block desc

Signed-off-by: hainenber <[email protected]>

* feat(exporter/elasticsearch): add Basic Auth support

Signed-off-by: hainenber <[email protected]>

* feat(exporter/elasticsearch): support Basic Auth for static config

Signed-off-by: hainenber <[email protected]>

* chore(CHANGELOG): remove merge conflict artifact

Signed-off-by: hainenber <[email protected]>

* misc: fix changelog entry

Signed-off-by: hainenber <[email protected]>

* feat(converter): map ES exporter's BasicAuth flow from static to flow

Signed-off-by: hainenber <[email protected]>

* fix(converter): nil check for ES exporter's Basic Auth

Signed-off-by: hainenber <[email protected]>

* lint

Signed-off-by: erikbaranowski <[email protected]>

---------

Signed-off-by: hainenber <[email protected]>
Signed-off-by: erikbaranowski <[email protected]>
Co-authored-by: Robert Fratto <[email protected]>
Co-authored-by: erikbaranowski <[email protected]>
@github-actions github-actions bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Feb 21, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. good first issue Good issue for new contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants