Sentry uses Codahale to present the metrics.
Table of Contents |
---|
Enabling metrics and configuration parameters
You need to enable the sentry web server in order to view the sentry metrics.
...
Config Property | Value | Default | RequiredComment | |||
---|---|---|---|---|---|---|
sentry.service.reporter | JMX or Console | Console | No | |||
JMX | ||||||
LOG | YES | Log metrics to LOG4j | ||||
JSON | Log metrics to json file (/tmp/sentry-metrics.json by default) | |||||
sentry.service.reporter.interval.sec | 300 | Interval between metric updates in seconds | ||||
sentry.service.reporter.file | /tmp/sentry-metrics.json | Destination for JSON metricsYes |
HDFS Sync related metrics
(Defined in SentryHdfsMetricsUtil.java)
API end point metrics
Metric type | Metric name | Details |
---|---|---|
Histogram | org.apache.sentry.hdfs.SentryHDFSServiceProcessor.handle-hms-notification | Time taken for Sentry end point to process path updates from HMS |
Histogram | org.apache.sentry.hdfs.SentryHDFSServiceProcessor.get-all-authz-updates-from | Time taken for Sentry to serve NN requests for updates |
Internal routine metrics
...
Scale metrics - HMS
Metric type | Metric name | Details | ||||||
---|---|---|---|---|---|---|---|---|
Histogram | Time taken for an API call | Histogram | org.apache.sentry.hdfs.SentryHDFSServiceProcessor.handlepaths-hmsupdates-notification | Time taken for Sentry end point to process path updates from HMS | Time taken for an API call | size | The size of path updates for each get_all_authz_updates_from | |
Histogram | org.apache.sentry.hdfs.SentryHDFSServiceProcessor. | get-allperm- | authz-updates- | fromTime taken for Sentry to serve NN requests for updates | Time taken for an internal routine | size | The size of perm updates for each get_all_authz_updates_from | |
Histogram | org.apache.sentry.hdfs.MetastorePluginSentryHDFSServiceProcessor.notify-sentry-HMS-update Time taken for HMS to send an update to Sentry handle-hms-notification.path-changes-size | The size of path changes for each handle_hms_notification | ||||||
Histogram | Time taken for an internal routine | org.apache.sentry.hdfs.MetastorePlugin.apply-local-update Time taken for HMS to apply the path update locally | .path-change-size | The size of path changes for each apply local |
Scale metrics - Sentry
Metric type | Metric name | Details | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Histogram | org.apache.sentry.hdfs. | SentryHDFSServiceProcessor.paths-updates-size SentryPlugin$PermImageRetriever.retrieve-full-image.privilege-changes-size | The size of | path updates privilege changes for each | get_all_authz_updates_fromretrieveFullImage | ||||||
Histogram | org.apache.sentry.hdfs. | SentryHDFSServiceProcessorSentryPlugin$PermImageRetriever. | handleretrieve- | hmsfull- | notificationimage. | pathrole-changes-size | The size of | pathrole changes for each | handle_hms_notificationretrieveFullImage call |
Internal routine metrics - HMS
Metric type | Metric name | Details | ||||||
---|---|---|---|---|---|---|---|---|
Timer | org.apache.sentry.hdfs.MetastorePlugin.applynotify-sentry-localHMS-update.path-change-size | Error counters | Time taken for HMS to send an update to Sentry | |||||
Timer | org.apache.sentry.hdfs.MetastorePlugin.apply-local-update | Time taken for HMS to apply the path update locally |
Error and special case counters
Metric type | Metric name | Details | ||||
---|---|---|---|---|---|---|
Counter | "org.apache.sentry.hdfs.MetastorePlugin.notify-sentry-HMS-update.failed-num" | Number of failed attempts of notifying Sentry | ||||
Counter | "org.apache.sentry.hdfs.SentryHDFSServiceProcessor.handle-hms-notification.failed-num" | The number of failed handle_hms_notification | ||||
Counter | "org.apache.sentry.hdfs.SentryHDFSServiceProcessor.handle-hms-notification.has-full-image-num" |
...
The number of handle_hms_notification calls with full image update |
Sentry Service related metrics
...
(See SentryMetrics.java)Gauges- A gauge is an instantaneous measurement of a value
Sentry Service Gauges
...
Gauge | Type | Comment |
---|---|---|
org.apache.sentry.service.thrift.SentryService.is_active | boolean | Sentry service is processing HMS notifications |
org.apache.sentry.service.thrift.SentryService. is_haactivated | Long | Number of times the Sentry Service became activeboolean |
Sentry Store Gauges
...
Gauge | Type | Comment |
---|---|---|
org.apache.sentry.provider.db.service.persistent.SentryStore.group_count | Long | Number of Sentry groups |
org.apache.sentry.provider.db.service.persistent.SentryStore.privilege_count | Long | Number of Sentry Privileges |
org.apache.sentry.provider.db.service.persistent.SentryStore.role_count | Long | Number of Sentry roles |
Gauges for HMS notifications processing
Gauge | Type | Comment |
---|---|---|
org.apache.sentry.provider.db.service.persistent.SentryStore.hms.notification.id | Long | Current HMS notification ID |
Sample metrics page
Legend
Gauges - A gauge is an instantaneous measurement of a value