This section documents all the metrics available from lens server, admin rest end points and more on query statistics.
Lens server emits following metrics for query service
Lens server also emits following metrics for other services
Lens server can be configured to emit metrics for resource methods. By default it's disabled, can be enabled by the property lens.server.enable.resource.method.metering. Metrics for resource methods are created lazily(as and when required) and consist of the following things:
A timer can provide running averages, statistical values like mean/median/quartiles etc, histograms.
Lens server also emits jvm, gc, memory and thread level metrics.
Supported reporting methods for the metrics emitted are the following:
Reporting to the chosen reporting methods will happen periodically. That period can be configured by: lens.server.metrics.reporting.period
When resource method metering is enabled you would see different metrics upto 1000 being emitted and might be confusing to admins - which one to look at.
Along with jvm, memory, thread count gauges, the following are some critical metrics that admin can monitor
For all timers, admin can look at mean or/and p99 values and exception.timer count. For example :
Lens server provides admin endpoint at host:port/admin. It provides end points for ping, metrics, threads and healthcheck.
Lens Server can be configured to emit query related statistics to a hive table QueryExecutionStatistics.The statistics service can be configured by providing values to lens.statistics.warehouse.dir set to a HDFS location where your query statistics log file will be persisted, lens.statistics.db the database which will contain all statistics related tables and lens.log.rollover.interval time interval which service will be monitoring for rollover in log file.The statistics can be disabled by setting, lens.server.statistics.store.class to empty string. The statistics service works by monitoring for rollups of query-stats.log file and adds an appropriate partition based on the rolled over file. The statistics can be queried using Hive queries.