chore: Modernize mongodb-mixin#1629
Conversation
|
|
Dasomeone
left a comment
There was a problem hiding this comment.
Seeing myself blind on these queries, going to have to get back to this PR on Monday, but for now here's my comments so far :)
…ons/modernize-mongodb-mixin
…ons/modernize-mongodb-mixin
Dasomeone
left a comment
There was a problem hiding this comment.
Thanks for the updates Maria! We'll definitely want to update the sample-app in lockstep with this as currently it doesn't cover appropriately to test/validate
| }, | ||
| replicaSetState: { | ||
| name: 'Replica set state', | ||
| description: 'An integer between 0 and 10 that represents the replica state of the current member.', |
There was a problem hiding this comment.
This would benefit to a link to the source/definition of what the 0-10 states mean or represent
…ons/modernize-mongodb-mixin
…ons/modernize-mongodb-mixin
…ons/modernize-mongodb-mixin
Dasomeone
left a comment
There was a problem hiding this comment.
Great progress, but we'll need to iron out the customAllValue as it's causing some issues. Basically we'll probably want to either have hardcoded values, or a very specific customAllValues just for the logs lib as it currently affects the main mixin, but not the logs lib for whatever reason
| '1': { index: 1, text: 'PRIMARY' }, | ||
| '2': { index: 2, text: 'SECONDARY' }, |
There was a problem hiding this comment.
Much nicer now, but I just realised I'd forgotten to comment that there's a duplicate "replica set states" on each set. Might want to drop it since it's already in the title
| + g.panel.stat.options.reduceOptions.withCalcs(['lastNotNull']) | ||
| + g.panel.stat.options.withGraphMode('none'), | ||
|
|
||
| replicasetVersions: |
| ) | ||
| + g.panel.timeSeries.standardOptions.withUnit('s'), | ||
|
|
||
| replicasetMemberPing: |
| overviewInstanceStates: | ||
| commonlib.panels.generic.statusHistory.base.new( | ||
| 'Instance states', | ||
| targets=[signals.overview.replicaSetStateByInstance.asTarget()], | ||
| description='Replica set state per instance over time.' | ||
| ) | ||
| + g.panel.statusHistory.standardOptions.withMappings([replicaSetStateMappings]) | ||
| + g.panel.statusHistory.options.withShowValue('auto'), | ||
|
|
There was a problem hiding this comment.
This entire dashboard is broken due to the .+ allvalue currently
|
@Dasomeone Thank you for the thorough review 🙏 I applied the requested changes 🙇 |
Dasomeone
left a comment
There was a problem hiding this comment.
Couple more comments, I think some of this is just due to sample-app loadgen/coverage but the cluster dashboard definitely is still broken
|
|
||
| replicasetAvgLag: | ||
| commonlib.panels.generic.stat.base.new( | ||
| 'Average replica set lag', |
| replicasetMembers: | ||
| commonlib.panels.generic.stat.base.new( | ||
| 'Replica set members', |
|
|
||
| replicasetOplogRecoveryWindow: | ||
| commonlib.panels.generic.timeSeries.base.new( | ||
| 'Oplog recovery window', |
| percona_mongodb: 'mongodb_up', | ||
| }, | ||
| signals: { | ||
| uptime: { |
| }, | ||
| }, | ||
| }, | ||
| replicaSetState: { |
| commonlib.panels.generic.stat.base.new( | ||
| 'Latency', | ||
| targets=[signals.instance.commandLatency.asTarget()], | ||
| description='Average command latency.' |
| description='Average command latency.' | ||
| ) | ||
| + g.panel.stat.standardOptions.withUnit('µs') | ||
| + g.panel.stat.options.reduceOptions.withCalcs(['lastNotNull']) | ||
| + g.panel.stat.options.withGraphMode('none'), | ||
|
|
||
| instanceReplicaSetStateGauge: | ||
| commonlib.panels.generic.stat.base.new( | ||
| 'Current replica set state', | ||
| targets=[signals.instance.replicaSetState.asTarget()], | ||
| description='Current state of the replica set member.' | ||
| ) | ||
| + g.panel.stat.standardOptions.withMappings([replicaSetStateMappings]) | ||
| + g.panel.stat.standardOptions.withDisplayName('${__field.labels.service_name}') | ||
| + g.panel.stat.options.withGraphMode('none') | ||
| + g.panel.stat.standardOptions.color.withMode('thresholds') | ||
| + g.panel.stat.standardOptions.thresholds.withSteps([ | ||
| g.panel.stat.standardOptions.threshold.step.withColor('green') | ||
| + g.panel.stat.standardOptions.threshold.step.withValue(null), | ||
| g.panel.stat.standardOptions.threshold.step.withColor('green') | ||
| + g.panel.stat.standardOptions.threshold.step.withValue(1), | ||
| g.panel.stat.standardOptions.threshold.step.withColor('blue') | ||
| + g.panel.stat.standardOptions.threshold.step.withValue(2), | ||
| g.panel.stat.standardOptions.threshold.step.withColor('orange') | ||
| + g.panel.stat.standardOptions.threshold.step.withValue(3), | ||
| g.panel.stat.standardOptions.threshold.step.withColor('red') | ||
| + g.panel.stat.standardOptions.threshold.step.withValue(8), | ||
| ]) | ||
| + g.panel.stat.options.reduceOptions.withCalcs(['lastNotNull']), | ||
|
|
||
| instanceCommandOps: | ||
| commonlib.panels.generic.timeSeries.base.new( | ||
| 'Command operations', | ||
| targets=[ | ||
| signals.instance.opCountersTotal.asTarget(), | ||
| signals.instance.opCountersReplTotal.asTarget(), | ||
| signals.instance.ttlDeletedDocuments.asTarget(), | ||
| ], | ||
| description='Rate of command operations by type.' | ||
| ) | ||
| + withStacking | ||
| + g.panel.timeSeries.standardOptions.withUnit('ops'), | ||
|
|
||
| instanceConnections: |
| commonlib.panels.generic.timeSeries.base.new( | ||
| 'Shard services QPS - $shard', | ||
| targets=[signals.cluster.shardServicesQps.asTarget()], | ||
| description='Queries per second for shard services.' | ||
| ) | ||
| + withTableLegend | ||
| + g.panel.timeSeries.standardOptions.withUnit('ops') | ||
| + g.panel.timeSeries.panelOptions.withRepeat('shard'), | ||
|
|
There was a problem hiding this comment.
Nothing wrong here, just wanted to comment and say I like it. Only downside is this can result in some whitespace on odd configurations/amounts of replicasets but that's acceptable













Update the MongoDB mixin to match the modernized mixins: