I need to use metrics mentioned in https://cwiki.apache.org/confluence/display/KAFKA/KIP-471%3A+Expose+RocksDB+Metrics+in+Kafka+Stream in java. Is there any sample document available for printing the default values using java code ? In case any different values need to be set then what will be code snippet ? I need to print default values for those metrics.
Asked
Active
Viewed 41 times
0

OneCricketeer
- 179,855
- 19
- 132
- 245

shalaka
- 1
- 2
-
I'm not sure I understand the question. Metrics would mostly all have default values of zero. Are you asking about the ConfigSetter? – OneCricketeer Aug 11 '23 at 12:57
-
@OneCricketeer I need to print the default values of them in my code. – shalaka Aug 14 '23 at 05:22
-
As mentioned, there is no "default". Count/Average/Rate metrics would all start at zero for example. Also, you typically wouldn't write code to read the metrics. You can use tools like Prometheus JMX Exporter or Jolokia to expose the metrics, or otherwise use [JMX remote monitoring](https://docs.oracle.com/en/java/javase/11/management/monitoring-and-management-using-jmx-technology.html#GUID-F08985BB-629A-4FBF-A0CB-8762DF7590E0) ... You also don't have access to "set custom metrics" internal to the RocksDB API. For that, you need to add MBeans to your app, such as by using MicroMeter. – OneCricketeer Aug 14 '23 at 20:41
-
How to populate these matrix on Grafana ? – shalaka Sep 01 '23 at 12:11
-
Metrics... Not matrix... I don't know what you want to plot. But here's one that's for apps running in Kubernetes https://grafana.com/grafana/dashboards/13966-kafka-streams-dashboard/ – OneCricketeer Sep 01 '23 at 13:29