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

Fix config for zookeeper standalone #457

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rafitadiaz
Copy link

The metrics from the JMX exporter have this format:

org.apache.ZooKeeperService<name0=StandaloneServer_port-1><>MinRequestLatency)

So the regexp needs a - after port.

@brian-brazil
Copy link
Contributor

Hmm, did this change at some point? It'd seem odd that you'd be the first person to notice such an obvious breakage.

@rafitadiaz
Copy link
Author

Not sure, I just did this setup in my staging like 3 weeks ago and I found this.
In my case the versions that I'm using are:

zookeeper-3.4.6-1.el7.x86_64
jmx_prometheus_javaagent-0.12.0.jar

And debugging the Mbeans with jconsole I found a tree like this

> org.apache.ZooKeeperService
  > StandaloneServer_port-1
    > ....

I'm not familiar with Mbeans or Java processes so maybe it's a misconfiguration in the zookeeper server for Centos7 (I'm using the RPM package with the default conf)

@brian-brazil
Copy link
Contributor

No, this shouldn't be affected by configuration. Hmm could it be that the port in this case is -1, that is negative?

@rafitadiaz
Copy link
Author

Oh, I understood that the port was 1... like port-(\\d)
I don't think that I've never seen a negative port before. 🤔 and it sounds like a really weird default value but it could be.

If for another people is working without the - we also can go for a more generic implementation for the regexp with:

    org.apache.ZooKeeperService<name0=StandaloneServer_port-*(\\d*)><>AvgRequestLatency)

That should work for metrics with and without -

@brian-brazil
Copy link
Contributor

If it's part of the number we should capture it. We need to know where this is coming from though, as this is not what is documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants