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

improve mntr regex to match user specific keys #25851

Closed
freyayunfu opened this issue Aug 17, 2023 · 4 comments
Closed

improve mntr regex to match user specific keys #25851

freyayunfu opened this issue Aug 17, 2023 · 4 comments
Assignees

Comments

@freyayunfu
Copy link

freyayunfu commented Aug 17, 2023

Component(s)

receiver/zookeeper

What happened?

Description

Seeing below warning messages from zookeeperreceiver

{"level":"warn","ts":1692234961.9064589,"caller":"[email protected]/scraper.go:144","msg":"unexpected line in response","kind":"receiver","name":"receiver_creator/zookeeper","data_type":"metrics","name":"zookeeper//receiver_creator/zookeeper{endpoint=\"10.212.193.34:2181\"}/k8s_observer/9d39a24e-2e8d-46bf-bffd-2b45edc90a75","command":"mntr","line":"zk_max_pkc-supreme-fox_write_per_namespace\t42343"}

Steps to Reproduce

Currently, if the line includes uses specific keys, like zk_max_pkc-supreme-fox_write_per_namespace\t42343, our regex would not be able to parse it. And would give unexpected line in response warning message.

Expected Result

If we update the regex into

	var zookeeperFormatRE = regexp.MustCompile(`^(zk_\w[\w\.\-]*)\s+([\w\.\-]+)`)

Then line zk_max_pkc-supreme-fox_write_per_namespace\t42343 would be successfully split into

key: zk_max_pkc-supreme-fox_write_per_namespace
value: 42343

Similar issue handled by the other repo: influxdata/telegraf#7533

Collector version

v0.82.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@freyayunfu freyayunfu added bug Something isn't working needs triage New item requiring triage labels Aug 17, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@crobert-1
Copy link
Member

Since the code owner has commented positively on the PR I'll remove the needs triage label, and assign to @freyayunfu as a PR has been opened. Please let me know if this is incorrect.

@crobert-1 crobert-1 removed the needs triage New item requiring triage label Sep 8, 2023
Copy link
Contributor

github-actions bot commented Nov 8, 2023

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Nov 8, 2023
Copy link
Contributor

github-actions bot commented Jan 7, 2024

This issue has been closed as inactive because it has been stale for 120 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants