-
Notifications
You must be signed in to change notification settings - Fork 178
chore: Apache HBase modernization #1537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
schmikei
wants to merge
6
commits into
grafana:master
Choose a base branch
from
schmikei:chore/apache-hbase-modernization
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4aef755
modernize the hbase mixin
schmikei 8f982c5
Merge branch 'master' of github.com:grafana/jsonnet-libs into chore/a…
schmikei d9f61a3
remove prometheusv2 from config.libsonnet
schmikei 13c0386
pr feedback
schmikei b96a680
make lint
schmikei 9a53be1
Merge branch 'master' of github.com:grafana/jsonnet-libs into chore/a…
schmikei File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,35 @@ | ||
| { | ||
| _config+:: { | ||
| filterSelector: 'job="integrations/apache-hbase"', | ||
| local this = self, | ||
| filteringSelector: 'job="integrations/apache-hbase"', | ||
| groupLabels: ['job', 'hbase_cluster'], | ||
| instanceLabels: ['instance'], | ||
| logLabels: ['job', 'hbase_cluster', 'instance'], | ||
|
|
||
| dashboardTags: ['apache-hbase-mixin'], | ||
| dashboardPeriod: 'now-30m', | ||
| dashboardTimezone: 'default', | ||
| dashboardRefresh: '1m', | ||
| dashboardTags: [self.uid + '-mixin'], | ||
| uid: 'apache-hbase', | ||
| dashboardNamePrefix: 'Apache HBase', | ||
| dashboardPeriod: 'now-30m', | ||
| dashboardTimezone: 'default', | ||
| dashboardRefresh: '1m', | ||
| metricsSource: ['prometheus'], | ||
|
|
||
| // alerts thresholds | ||
| alertsHighHeapMemUsage: 80, // percentage | ||
| alertsHighNonHeapMemUsage: 80, // percentage | ||
| alertsDeadRegionServer: 0, // count | ||
| alertsOldRegionsInTransition: 50, // percentage | ||
| alertsHighMasterAuthFailRate: 35, // percentage | ||
| alertsHighRSAuthFailRate: 35, // percentage | ||
| // Logging configuration | ||
| enableLokiLogs: true, | ||
| extraLogLabels: ['level'], | ||
| logsVolumeGroupBy: 'level', | ||
| showLogsVolume: true, | ||
|
|
||
| enableLokiLogs: true, | ||
| // Alerts thresholds | ||
| alertsHighHeapMemUsage: 80, // percentage | ||
| alertsHighNonHeapMemUsage: 80, // percentage | ||
| alertsDeadRegionServer: 0, // count | ||
| alertsOldRegionsInTransition: 50, // percentage | ||
| alertsHighMasterAuthFailRate: 35, // percentage | ||
| alertsHighRSAuthFailRate: 35, // percentage | ||
|
|
||
| // Signals configuration | ||
| signals+: { | ||
| cluster: (import './signals/cluster.libsonnet')(this), | ||
| regionserver: (import './signals/regionserver.libsonnet')(this), | ||
| }, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| local g = import './g.libsonnet'; | ||
| local commonlib = import 'common-lib/common/main.libsonnet'; | ||
| local logslib = import 'logs-lib/logs/main.libsonnet'; | ||
|
|
||
| { | ||
| local root = self, | ||
| new(this):: | ||
| local prefix = this.config.dashboardNamePrefix; | ||
| local links = this.grafana.links; | ||
| local tags = this.config.dashboardTags; | ||
| local uid = g.util.string.slugify(this.config.uid); | ||
| local vars = this.grafana.variables; | ||
| local annotations = this.grafana.annotations; | ||
| local refresh = this.config.dashboardRefresh; | ||
| local period = this.config.dashboardPeriod; | ||
| local timezone = this.config.dashboardTimezone; | ||
| { | ||
| 'apache-hbase-cluster-overview.json': | ||
| g.dashboard.new(prefix + ' cluster overview') | ||
| + g.dashboard.withPanels( | ||
| g.util.panel.resolveCollapsedFlagOnRows( | ||
| g.util.grid.wrapPanels( | ||
| [ | ||
| this.grafana.rows.clusterOverview, | ||
| ] | ||
| ) | ||
| ) | ||
| ) + root.applyCommon( | ||
| vars.multiInstance, | ||
| uid + '-cluster-overview', | ||
| tags, | ||
| links { clusterOverview:: {} }, | ||
| annotations, | ||
| timezone, | ||
| refresh, | ||
| period, | ||
| ), | ||
|
|
||
| 'apache-hbase-regionserver-overview.json': | ||
| g.dashboard.new(prefix + ' RegionServer overview') | ||
| + g.dashboard.withPanels( | ||
| g.util.panel.resolveCollapsedFlagOnRows( | ||
| g.util.grid.wrapPanels( | ||
| [ | ||
| this.grafana.rows.regionServerOverview, | ||
| ] | ||
| ) | ||
| ) | ||
| ) + root.applyCommon( | ||
| vars.multiInstance, | ||
| uid + '-regionserver-overview', | ||
| tags, | ||
| links { regionServerOverview:: {} }, | ||
| annotations, | ||
| timezone, | ||
| refresh, | ||
| period, | ||
| ), | ||
| } | ||
| + | ||
| if this.config.enableLokiLogs then | ||
| { | ||
| 'apache-hbase-logs.json': | ||
| logslib.new( | ||
| prefix + ' logs', | ||
| datasourceName=this.grafana.variables.datasources.loki.name, | ||
| datasourceRegex=this.grafana.variables.datasources.loki.regex, | ||
| filterSelector=this.config.filteringSelector, | ||
| labels=this.config.logLabels + this.config.extraLogLabels, | ||
| formatParser=null, | ||
| showLogsVolume=this.config.showLogsVolume, | ||
| logsVolumeGroupBy=this.config.logsVolumeGroupBy, | ||
| ) | ||
| { | ||
| dashboards+: | ||
| { | ||
| logs+: | ||
| root.applyCommon(super.logs.templating.list, uid=uid + '-logs', tags=tags, links=links { logs+:: {} }, annotations=annotations, timezone=timezone, refresh=refresh, period=period), | ||
| }, | ||
| panels+: | ||
| { | ||
| logs+: | ||
| g.panel.logs.options.withEnableLogDetails(true) | ||
| + g.panel.logs.options.withShowTime(false) | ||
| + g.panel.logs.options.withWrapLogMessage(false), | ||
| }, | ||
| variables+: { | ||
| toArray+: [ | ||
| this.grafana.variables.datasources.prometheus { hide: 2 }, | ||
| ], | ||
| }, | ||
| }.dashboards.logs, | ||
| } | ||
| else {}, | ||
|
|
||
| applyCommon(vars, uid, tags, links, annotations, timezone, refresh, period): | ||
| g.dashboard.withTags(tags) | ||
| + g.dashboard.withUid(uid) | ||
| + g.dashboard.withLinks(std.objectValues(links)) | ||
| + g.dashboard.withTimezone(timezone) | ||
| + g.dashboard.withRefresh(refresh) | ||
| + g.dashboard.time.withFrom(period) | ||
| + g.dashboard.withVariables(vars) | ||
| + g.dashboard.withAnnotations(std.objectValues(annotations)), | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this use the
filteringSelector?