-
Notifications
You must be signed in to change notification settings - Fork 177
chore: Aerospike Mixin Modernization #1475
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
Merged
Dasomeone
merged 9 commits into
grafana:master
from
schmikei:chore/aerospike-mixin-modernization
Sep 5, 2025
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
02f9bd0
make aerospike mixin more modernized
schmikei 368869c
make fmt
schmikei 19043e3
attempt to fix lint
schmikei 53a1e23
Merge branch 'master' into chore/aerospike-mixin-modernization
schmikei 484a36e
Merge branch 'master' into chore/aerospike-mixin-modernization
schmikei 977f6c0
update signals to share panels
schmikei 5ca247f
Merge branch 'chore/aerospike-mixin-modernization' of github.com:schm…
schmikei b691b24
pr feedback: config usage of filteringSelector, sum by groupLabels &&…
schmikei b9c23f4
Merge branch 'master' into chore/aerospike-mixin-modernization
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,25 +1,41 @@ | ||
| { | ||
| _config+:: { | ||
| enableMultiCluster: false, | ||
| aerospikeSelector: if self.enableMultiCluster then 'job=~"$job", cluster=~"$cluster"' else 'job=~"$job"', | ||
| multiclusterSelector: 'job=~"$job"', | ||
| filterSelector: 'job=~"integrations/aerospike"', | ||
| local this = self, | ||
| filteringSelector: 'job="integrations/aerospike"', | ||
| groupLabels: ['job', 'aerospike_cluster', 'cluster'], | ||
| logLabels: ['job', 'cluster', 'instance'], | ||
| instanceLabels: ['instance', 'ns'], // ns == namespace | ||
|
|
||
| dashboardTags: ['aerospike-mixin'], | ||
| dashboardPeriod: 'now-30m', | ||
| dashboardTimezone: 'default', | ||
| dashboardRefresh: '1m', | ||
| dashboardTags: [self.uid], | ||
| uid: 'aerospike', | ||
| dashboardNamePrefix: 'Aerospike', | ||
| dashboardPeriod: 'now-30m', | ||
| dashboardTimezone: 'default', | ||
| dashboardRefresh: '1m', | ||
| metricsSource: [ | ||
| 'prometheusAerospike7', // For queries that are required for Aerospike 7.0+ with metric changes | ||
| 'prometheus', // For Aerospike < 7.0 | ||
| ], | ||
|
|
||
| // alerts thresholds | ||
| alertsCriticalNodeHighMemoryUsage: 80, // % | ||
| alertsCriticalNamespaceHighDiskUsage: 80, // % | ||
| alertsCriticalUnavailablePartitions: 0, // count | ||
| alertsCriticalDeadPartitions: 0, // count | ||
| alertsCriticalSystemRejectingWrites: 0, // count | ||
| alertsWarningHighClientReadErrorRate: 25, // % | ||
| alertsWarningHighClientWriteErrorRate: 25, // % | ||
| alertsWarningHighClientUDFErrorRate: 25, // % | ||
| // Logging configuration | ||
| enableLokiLogs: true, | ||
| extraLogLabels: ['level'], // Required by logs-lib | ||
| logsVolumeGroupBy: 'level', | ||
| showLogsVolume: true, | ||
|
|
||
| enableLokiLogs: true, | ||
| // Alerts thresholds | ||
| alertsCriticalNodeHighMemoryUsage: 80, // % | ||
| alertsCriticalNamespaceHighDiskUsage: 80, // % | ||
| alertsCriticalUnavailablePartitions: 0, // count | ||
| alertsCriticalDeadPartitions: 0, // count | ||
| alertsCriticalSystemRejectingWrites: 0, // count | ||
| alertsWarningHighClientReadErrorRate: 25, // % | ||
| alertsWarningHighClientWriteErrorRate: 25, // % | ||
| alertsWarningHighClientUDFErrorRate: 25, // % | ||
|
|
||
| // Signals configuration | ||
| signals+: { | ||
| overview: (import './signals/overview.libsonnet')(this), | ||
| namespace: (import './signals/namespace.libsonnet')(this), | ||
| instance: (import './signals/instance.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,135 @@ | ||
| 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; | ||
| { | ||
| 'aerospike-overview.json': | ||
| g.dashboard.new(prefix + ' overview') | ||
| + g.dashboard.withPanels( | ||
| g.util.panel.resolveCollapsedFlagOnRows( | ||
| g.util.grid.wrapPanels( | ||
| [ | ||
| this.grafana.rows.clusterOverview, | ||
| ] | ||
| ) | ||
| ) | ||
| ) + root.applyCommon( | ||
| vars.multiInstance + [ | ||
| g.dashboard.variable.custom.new( | ||
| 'k', | ||
| values=['2', '4', '6', '8', '10'], | ||
| ) + g.dashboard.variable.custom.generalOptions.withCurrent('2') | ||
| + g.dashboard.variable.custom.generalOptions.withLabel('Top node count') | ||
| + g.dashboard.variable.custom.selectionOptions.withMulti(false) | ||
| + g.dashboard.variable.custom.selectionOptions.withIncludeAll(false), | ||
| ], | ||
| uid + '_overview', | ||
| tags, | ||
| links { aerospikeOverview:: {} }, | ||
| annotations, | ||
| timezone, | ||
| refresh, | ||
| period, | ||
| ), | ||
|
|
||
|
|
||
| 'aerospike-instance-overview.json': | ||
| g.dashboard.new(prefix + ' instance overview') | ||
| + g.dashboard.withPanels( | ||
| g.util.panel.resolveCollapsedFlagOnRows( | ||
| g.util.grid.wrapPanels( | ||
| [ | ||
| this.grafana.rows.instanceOverview, | ||
| ] | ||
| ) | ||
| ) | ||
| ) + root.applyCommon( | ||
| vars.multiInstance, | ||
| uid + '_instance_overview', | ||
| tags, | ||
| links { aerospikeInstanceOverview:: {} }, | ||
| annotations, | ||
| timezone, | ||
| refresh, | ||
| period, | ||
| ), | ||
|
|
||
| 'aerospike-namespace-overview.json': | ||
| g.dashboard.new(prefix + ' namespace overview') | ||
| + g.dashboard.withPanels( | ||
| g.util.panel.resolveCollapsedFlagOnRows( | ||
| g.util.grid.wrapPanels( | ||
| [ | ||
| this.grafana.rows.namespaceOverview, | ||
| ] | ||
| ) | ||
| ) | ||
| ) + root.applyCommon( | ||
| vars.multiInstance, | ||
| uid + '_namespace_overview', | ||
| tags, | ||
| links { aerospikeNamespaceOverview:: {} }, | ||
| annotations, | ||
| timezone, | ||
| refresh, | ||
| period, | ||
| ), | ||
| } | ||
| + | ||
| if this.config.enableLokiLogs then | ||
| { | ||
| 'aerospike-logs-overview.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.groupLabels + this.config.extraLogLabels, | ||
| formatParser=null, | ||
| showLogsVolume=this.config.showLogsVolume, | ||
| ) | ||
| { | ||
| 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.
Uh oh!
There was an error while loading. Please reload this page.