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

prometheus.exporter.kafka: fix for config option is ignored #5991

Merged
merged 3 commits into from
Jan 10, 2024

Conversation

akhmatov-s
Copy link
Contributor

PR Description

prometheus.exporter.kafka instance option is ignored in river.config.

Which issue(s) this PR fixes

I'm trying to start grafana-agent with a simple config, where kafka_uris has more than 1 node:

prometheus.exporter.kafka "LABEL" {
    kafka_uris = ["kafka1:9092", "kafka2:9092"]
    instance = "test-instance"
}

Getting error message:

Error: /etc/agent/config.river:1:1: Failed to build component: building component: an automatic value for `instance` cannot be determined from 2 kafka servers, manually provide one for this integration

1 |   prometheus.exporter.kafka "LABEL" {
  |  _^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 | |     kafka_uris = ["kafka1:9092", "kafka2:9092"]
3 | |     instance = "test-instance"
4 | | }
  | |_^
5 |

instance option is ignored.

The proposed PR fixes things for me.

@CLAassistant
Copy link

CLAassistant commented Dec 16, 2023

CLA assistant check
All committers have signed the CLA.

@tpaschalis
Copy link
Member

Hey there @akhmatov-s, good catch!

Do you mind updating the docs for this new field as well?

@akhmatov-s
Copy link
Contributor Author

Hey there @akhmatov-s, good catch!

Do you mind updating the docs for this new field as well?

The field is not new, it's already in the docs: the problem is the agent doesn't behave according to docs ignoring this option from config.

@erikbaranowski
Copy link
Contributor

Thanks for the fix. Can you add a record in the CHANGELOG.md for this bug fix and fix up the tests/lint in CI?

@tpaschalis
Copy link
Member

FYI @akhmatov-s I've created a CHANGELOG entry for you so we can move ahead with the PR.

Thank you for your contribution!

Signed-off-by: Paschalis Tsilias <[email protected]>
@tpaschalis tpaschalis merged commit f70a0cd into grafana:main Jan 10, 2024
10 checks passed
BarunKGP pushed a commit to BarunKGP/grafana-agent that referenced this pull request Feb 20, 2024
@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
frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants