Skip to content

Ranger Usersync

Collect Ranger Usersync metrics

Configuration

1. Ranger Usersync Configuration

1.1 Download jmx-exporter

Download link: https://github.com/prometheus/jmx_exporter

1.2 Download jmx script

Download link: https://github.com/lrwh/jmx-exporter/blob/main/common.yml

1.3 Ranger Usersync Startup Parameters Adjustment

Add the following to the Ranger Usersync startup parameters:

{JAVA_GC_ARGS} -javaagent:/opt/jmx/jmx_exporter-1.0.1.jar=localhost:17145:/opt/jmx/common.yml

1.4 Restart Ranger Usersync

2. DataKit Collector Configuration

2.1 Install DataKit

2.2 Configure the Collector

Since jmx-exporter can directly expose the metrics URL, it can be collected directly using the prom collector.

Navigate to the conf.d/prom directory under the DataKit installation directory, and copy prom.conf.sample to ranger-usersync.conf.

cp prom.conf.sample ranger-usersync.conf

Adjust the content of ranger_usersync.conf as follows:

  urls = ["http://localhost:17145/metrics"]
  source ="ranger-usersync"
  [inputs.prom.tags]
    component = "ranger-usersync" 
  interval = "10s"

Adjust other configurations as needed, parameter adjustment explanation:

  • urls: jmx-exporter metrics URL, fill in the metrics URL exposed by the corresponding component here
  • source: Collector alias, it is recommended to distinguish it
  • keep_exist_metric_name: Keep the metric name
  • interval: Collection interval
  • inputs.prom.tags: Add additional tags

3. Restart DataKit

Restart Datakit

Metrics

Hadoop Measurement

Ranger Usersync metrics are located under the Hadoop measurement, here we mainly introduce the Ranger Usersync related metrics description

Metrics Description Unit
hadoop_usersync_addgroupcountsuccess Number of successful user group additions count
hadoop_usersync_addusercountsuccess Number of successful user additions count
hadoop_usersync_auditcountsuccess Number of successful audit executions count
hadoop_usersync_countgroup Total number of user groups count
hadoop_usersync_countgroupuser Total number of users in user groups count
hadoop_usersync_countuser Total number of users count
hadoop_usersync_droppedpuball Total number of dropped publish events count
hadoop_usersync_gccounttotal Total number of garbage collections (GC) count
hadoop_usersync_gctimemax Maximum time spent on garbage collection (GC) count
hadoop_usersync_gctimetotal Total time spent on garbage collection (GC) count
hadoop_usersync_getgroupsavgtime Average time to get user groups count
hadoop_usersync_getgroupsnumops Number of operations to get user groups count
hadoop_usersync_groupusercountsuccess Number of successful user group user counts count
hadoop_usersync_loginfailureavgtime Average time spent on login failures ms
hadoop_usersync_loginfailurenumops Number of login failures count
hadoop_usersync_loginsuccessavgtime Average time spent on successful logins ms
hadoop_usersync_loginsuccessnumops Number of successful logins count
hadoop_usersync_memorycurrent Current memory usage byte
hadoop_usersync_memorymax Maximum memory usage byte
hadoop_usersync_numactivesinks Number of active sinks count
hadoop_usersync_numactivesources Number of active sources count
hadoop_usersync_numallsinks Total number of all sinks count
hadoop_usersync_numallsources Total number of all sources count
hadoop_usersync_processorsavailable Number of available processors count
hadoop_usersync_publishavgtime Average time spent on publish operations ms
hadoop_usersync_publishnumops Number of publish operations count
hadoop_usersync_renewalfailures Number of renewal failures count
hadoop_usersync_sink_jsonavgtime Average time spent on JSON sinks count
hadoop_usersync_sink_jsondropped Number of messages dropped by JSON sinks count
hadoop_usersync_sink_jsonnumops Number of JSON sink operations count
hadoop_usersync_sink_jsonqsize Queue size of JSON sinks count
hadoop_usersync_sink_prometheusavgtime Average time spent on Prometheus sinks count
hadoop_usersync_sink_prometheusdropped Number of messages dropped by Prometheus sinks count
hadoop_usersync_sink_prometheusnumops Number of Prometheus sink operations count
hadoop_usersync_sink_prometheusqsize Queue size of Prometheus sinks count
hadoop_usersync_snapshotavgtime Average time spent on snapshot operations ms
hadoop_usersync_snapshotnumops Number of snapshot operations count
hadoop_usersync_systemloadavg System load average count
hadoop_usersync_threadsblocked Number of blocked threads count
hadoop_usersync_threadsremaining Number of remaining threads count
hadoop_usersync_threadswaiting Number of waiting threads count