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

Try to get meaningful metrics from Zookeeper #61

Merged
merged 4 commits into from
Nov 3, 2017

Conversation

solsson
Copy link
Contributor

@solsson solsson commented Aug 8, 2017

Help wanted in order to improve #49. I can get JVM stats, but nothing org.apache.ZooKeeperService.

@yacut
Copy link

yacut commented Nov 2, 2017

I thinks, the "Leader" and "Follower" labels are very useful for the zookeeper metrics:

lowercaseOutputName: true
jmxUrl: service:jmx:rmi:///jndi/rmi://localhost:5555/jmxrmi
ssl: false
whitelistObjectNames: ["org.apache.ZooKeeperService:*","java.lang:*"]
rules:
  - pattern: "org.apache.ZooKeeperService<name0=ReplicatedServer_id(\\d)><>(\\w+)"
    name: "zookeeper_$2"
  - pattern: "org.apache.ZooKeeperService<name0=ReplicatedServer_id(\\d), name1=replica.(\\d)><>(\\w+)"
    name: "zookeeper_$3"
    labels:
      replicaId: "$2"
  - pattern: "org.apache.ZooKeeperService<name0=ReplicatedServer_id(\\d), name1=replica.(\\d), name2=(\\w+)><>(\\w+)"
    name: "zookeeper_$4"
    labels:
      replicaId: "$2"
      memberType: "$3"
  - pattern: "org.apache.ZooKeeperService<name0=ReplicatedServer_id(\\d), name1=replica.(\\d), name2=(\\w+), name3=(\\w+)><>(\\w+)"
    name: "zookeeper_$4_$5"
    labels:
      replicaId: "$2"
      memberType: "$3"
  - pattern : java.lang<type=OperatingSystem><>SystemCpuLoad
  - pattern : java.lang<type=Memory><HeapMemoryUsage>used
  - pattern : java.lang<type=OperatingSystem><>FreePhysicalMemorySize

e.g. the metric rate(zookeeper_packetssent[1m]) shows the memberType and replicaId labels.

@solsson
Copy link
Contributor Author

solsson commented Nov 3, 2017

Thanks @yacut. I'm merging this to #49 as zoo's metrics are now on par with kafka's.

@solsson solsson merged commit b0e6145 into addon-metrics Nov 3, 2017
solsson added a commit that referenced this pull request Nov 4, 2017
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.

None yet

2 participants