ebean - How to get the cluster status/health?

45 Views Asked by At

I'm configuring ebean clustering for cache invalidation (with ebean-k8scache to be specific) and I want to monitor and report the cluster's health. Digging through ebean's API I couldn't find a way to access clustering information.

Does ebean expose this information in any way? (metrics, functions etc.)

1

There are 1 best solutions below

0
Omar Hussien On

you can use dumpMetricsOnShutdown see monitoring ,The fast way to see what metrics are collected is to have them dumped when the server is shutdown , set below in configuration file:

dumpMetricsOnShutdown: true
dumpMetricsOptions: loc,sql,hash
  • loc - include profile location
  • hash - include the hash of the sql query
  • sql - include the sql for queries

You can track the log see logging , using the logger entries below :

<!-- L2 logging -->
<logger name="io.ebean.cache.QUERY" level="TRACE"/>
<logger name="io.ebean.cache.BEAN" level="TRACE"/>
<logger name="io.ebean.cache.COLL" level="TRACE"/>
<logger name="io.ebean.cache.NATKEY" level="TRACE"/>