Skip to content

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 solsson force-pushed the metrics-jmx-zookeeper branch from b31e825 to 42d1b1a Compare November 3, 2017 12:56
@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.

2 participants