|
| 1 | +# Apache HBase mixin |
| 2 | + |
| 3 | +The Apache HBase mixin is a set of configurable Grafana dashboards and alerts. |
| 4 | + |
| 5 | +The Apache HBase mixin contains the following dashboards: |
| 6 | + |
| 7 | +- Apache HBase cluster overview |
| 8 | +- Apache HBase RegionServer overview |
| 9 | +- Apache HBase logs |
| 10 | + |
| 11 | +and the following alerts: |
| 12 | + |
| 13 | +- HBaseHighHeapMemUsage |
| 14 | +- HBaseHighNonHeapMemUsage |
| 15 | +- HBaseDeadRegionServer |
| 16 | +- HBaseOldRegionsInTransition |
| 17 | +- HBaseHighMasterAuthFailureRate |
| 18 | +- HBaseHighRSAuthFailureRate |
| 19 | + |
| 20 | +## Apache HBase overview |
| 21 | +The Apache HBase cluster overview dashboard provides details on integration status/alerts, current RegionServers, JVM memory usage, cluster connections, master queue performance, and transitioning regions. |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | +## Apache HBase RegionServer overview |
| 27 | +The Apache HBase RegionServer overview dashboard provides details on data regions, storage, connections, and request handling performance for a RegionServer node. |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | +## Apache HBase logs |
| 34 | +The Apache HBase logs dashboard provides details on incoming system logs. |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | +Apache HBase system logs are enabled by default in the `config.libsonnet` and can be removed by setting `enableLokiLogs` to `false`. Then run `make` again to regenerate the dashboard: |
| 39 | + |
| 40 | +``` |
| 41 | +{ |
| 42 | + _config+:: { |
| 43 | + enableLokiLogs: false, |
| 44 | + }, |
| 45 | +} |
| 46 | +``` |
| 47 | + |
| 48 | +In order for the selectors to properly work for system logs ingested into your logs datasource, please also include the matching `instance`, `job`, and `apache_hbase_cluster` labels onto the [scrape_configs](https://grafana.com/docs/loki/latest/clients/promtail/configuration/#scrape_configs) as to match the labels for ingested metrics. |
| 49 | + |
| 50 | +```yaml |
| 51 | +scrape_configs: |
| 52 | + - job_name: integrations/apache-hbase |
| 53 | + static_configs: |
| 54 | + - targets: [localhost] |
| 55 | + labels: |
| 56 | + job: integrations/apache-hbase |
| 57 | + hbase_cluster: "<your-cluster-name>" |
| 58 | + instance: "<your-instance-name>" |
| 59 | + __path__: {hbase-home}/logs/*.log |
| 60 | + pipeline_stages: |
| 61 | + - multiline: |
| 62 | + firstline: '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2},\d{3}' |
| 63 | + - regex: |
| 64 | + expression: '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2},\d{3} (?P<level>\w+) \[(?P<context>.*)\] (?P<message>(?s:.*))$' |
| 65 | + - labels: |
| 66 | + level: |
| 67 | + logger: |
| 68 | +``` |
| 69 | +
|
| 70 | +## Alerts overview |
| 71 | +
|
| 72 | +- ApacheHBaseHighHeapMemUsage: There is a limited amount of heap memory available to the JVM. |
| 73 | +- ApacheHBaseHighNonHeapMemUsage: There is a limited amount of non-heap memory available to the JVM. |
| 74 | +- ApacheHBaseDeadRegionServer: One or more RegionServer(s) has become unresponsive. |
| 75 | +- ApacheHBaseOldRegionsInTransition: RegionServers are in transition for longer than expected. |
| 76 | +- ApacheHBaseHighMasterAuthFailureRate: A high percentage of authentication attempts to the master are failing. |
| 77 | +- ApacheHBaseHighRSAuthFailureRate: A high percentage of authentication attempts to a RegionServer are failing. |
| 78 | +
|
| 79 | +Default thresholds can be configured in `config.libsonnet`. |
| 80 | + |
| 81 | +```js |
| 82 | +{ |
| 83 | + _config+:: { |
| 84 | + alertsHighHeapMemUsage: 80 // percentage |
| 85 | + alertsHighNonHeapMemUsage: 80 // percentage |
| 86 | + alertsDeadRegionServer: 0 // count |
| 87 | + alertsOldRegionsInTransition: 50 // percentage |
| 88 | + alertsHighMasterAuthFailRate: 35 // percentage |
| 89 | + alertsHighRSAuthFailRate: 35 // percentage |
| 90 | + }, |
| 91 | +} |
| 92 | +``` |
| 93 | + |
| 94 | +## Install tools |
| 95 | + |
| 96 | +```bash |
| 97 | +go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest |
| 98 | +go install github.com/monitoring-mixins/mixtool/cmd/mixtool@latest |
| 99 | +``` |
| 100 | + |
| 101 | +For linting and formatting, you would also need `jsonnetfmt` installed. If you |
| 102 | +have a working Go development environment, it's easiest to run the following: |
| 103 | + |
| 104 | +```bash |
| 105 | +go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest |
| 106 | +``` |
| 107 | + |
| 108 | +The files in `dashboards_out` need to be imported |
| 109 | +into your Grafana server. The exact details will be depending on your environment. |
| 110 | + |
| 111 | +`prometheus_alerts.yaml` needs to be imported into Prometheus. |
| 112 | + |
| 113 | +## Generate dashboards and alerts |
| 114 | + |
| 115 | +Edit `config.libsonnet` if required and then build JSON dashboard files for Grafana: |
| 116 | + |
| 117 | +```bash |
| 118 | +make |
| 119 | +``` |
| 120 | + |
| 121 | +For more advanced uses of mixins, see |
| 122 | +https://github.com/monitoring-mixins/docs. |
0 commit comments