Skip to content
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

[Monitoring] CCR UI fixes #23922

Merged
merged 3 commits into from
Oct 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ exports[`Ccr that it renders normally 1`] = `
"sortable": true,
},
Object {
"field": "opsSynced",
"name": "Ops synced",
"field": "syncLagOps",
"name": "Sync Lag (ops)",
"sortable": true,
},
Object {
Expand All @@ -38,8 +38,8 @@ exports[`Ccr that it renders normally 1`] = `
"sortable": true,
},
Object {
"field": "syncLagOps",
"name": "Sync Lag (ops)",
"field": "opsSynced",
"name": "Ops synced",
"sortable": true,
},
Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,6 @@ export class Ccr extends Component {
{
render: () => null
},
{
field: 'opsSynced',
name: 'Ops synced'
},
{
field: 'syncLagTime',
name: 'Last fetch time',
render: syncLagTime => <span>{toSeconds(syncLagTime)}</span>
},
{
field: 'syncLagOps',
name: 'Sync Lag (ops)',
Expand All @@ -97,6 +88,15 @@ export class Ccr extends Component {
</span>
)
},
{
field: 'syncLagTime',
name: 'Last fetch time',
render: syncLagTime => <span>{toSeconds(syncLagTime)}</span>
},
{
field: 'opsSynced',
name: 'Ops synced'
},
{
field: 'error',
name: 'Error',
Expand Down Expand Up @@ -160,9 +160,9 @@ export class Ccr extends Component {
name: 'Follows'
},
{
field: 'opsSynced',
field: 'syncLagOps',
sortable: true,
name: 'Ops synced'
name: 'Sync Lag (ops)',
},
{
field: 'syncLagTime',
Expand All @@ -171,9 +171,9 @@ export class Ccr extends Component {
render: syncLagTime => <span>{toSeconds(syncLagTime)}</span>
},
{
field: 'syncLagOps',
field: 'opsSynced',
sortable: true,
name: 'Sync Lag (ops)',
name: 'Ops synced'
},
{
field: 'error',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export class CcrShard extends PureComponent {
renderCharts() {
const { metrics } = this.props;
const seriesToShow = [
metrics.ccr_sync_lag_time,
metrics.ccr_sync_lag_ops
metrics.ccr_sync_lag_ops,
metrics.ccr_sync_lag_time
];

const charts = seriesToShow.map((data, index) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,6 @@ function buildRequest(req, config, esIndexPattern) {
field: 'ccr_stats.number_of_operations_indexed'
}
},

last_fetch_time_max: {
max: {
field: 'ccr_stats.time_since_last_fetch_millis'
}
},
last_fetch_time_min: {
min: {
field: 'ccr_stats.time_since_last_fetch_millis'
}
},
lag_ops_leader_max: {
max: {
field: 'ccr_stats.leader_max_seq_no'
Expand Down Expand Up @@ -79,7 +68,6 @@ function buildRequest(req, config, esIndexPattern) {
}
},

last_fetch_time: getBucketScript('last_fetch_time_max', 'last_fetch_time_min'),
ops_synced: getBucketScript('ops_synced_max', 'ops_synced_min'),
lag_ops_leader: getBucketScript('lag_ops_leader_max', 'lag_ops_leader_min'),
lag_ops_global: getBucketScript('lag_ops_global_max', 'lag_ops_global_min'),
Expand All @@ -96,10 +84,10 @@ function buildRequest(req, config, esIndexPattern) {
'hits.hits.inner_hits.by_shard.hits.hits._source.ccr_stats.fetch_exceptions',
'hits.hits.inner_hits.by_shard.hits.hits._source.ccr_stats.follower_index',
'hits.hits.inner_hits.by_shard.hits.hits._source.ccr_stats.shard_id',
'hits.hits.inner_hits.by_shard.hits.hits._source.ccr_stats.time_since_last_fetch_millis',
'aggregations.by_follower_index.buckets.key',
'aggregations.by_follower_index.buckets.leader_index.buckets.key',
'aggregations.by_follower_index.buckets.by_shard_id.buckets.key',
'aggregations.by_follower_index.buckets.by_shard_id.buckets.last_fetch_time.value',
'aggregations.by_follower_index.buckets.by_shard_id.buckets.ops_synced.value',
'aggregations.by_follower_index.buckets.by_shard_id.buckets.lag_ops.value',
'aggregations.by_follower_index.buckets.by_shard_id.buckets.leader_lag_ops.value',
Expand Down Expand Up @@ -231,7 +219,7 @@ export function ccrRoute(server) {
shardId: shardBucket.key,
error: fullStat.fetch_exceptions.length ? fullStat.fetch_exceptions[0].exception.type : null,
opsSynced: get(shardBucket, 'ops_synced.value'),
syncLagTime: get(shardBucket, 'last_fetch_time.value'),
syncLagTime: fullStat.time_since_last_fetch_millis,
syncLagOps: get(shardBucket, 'lag_ops.value'),
syncLagOpsLeader: get(shardBucket, 'leader_lag_ops.value'),
syncLagOpsFollower: get(shardBucket, 'follower_lag_ops.value'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,45 @@
"shardId": 0,
"error": null,
"opsSynced": 52,
"syncLagTime": 59881,
"syncLagTime": 4900,
"syncLagOps": 0,
"syncLagOpsLeader": 0,
"syncLagOpsFollower": 0
}, {
"shardId": 1,
"error": null,
"opsSynced": 47,
"syncLagTime": 59959,
"syncLagTime": 9919,
"syncLagOps": 0,
"syncLagOpsLeader": 0,
"syncLagOpsFollower": 0
}, {
"shardId": 2,
"error": null,
"opsSynced": 51,
"syncLagTime": 55229,
"syncLagTime": 14929,
"syncLagOps": 0,
"syncLagOpsLeader": 0,
"syncLagOpsFollower": 0
}, {
"shardId": 3,
"error": null,
"opsSynced": 50,
"syncLagTime": 50483,
"syncLagTime": 39933,
"syncLagOps": 0,
"syncLagOpsLeader": 0,
"syncLagOpsFollower": 0
}, {
"shardId": 4,
"error": null,
"opsSynced": 55,
"syncLagTime": 55554,
"syncLagTime": 49923,
"syncLagOps": 0,
"syncLagOpsLeader": 0,
"syncLagOpsFollower": 0
}],
"opsSynced": 255,
"syncLagTime": 59959,
"syncLagTime": 49923,
"syncLagOps": 0
}, {
"id": "follower",
Expand All @@ -55,29 +55,29 @@
"shardId": 0,
"error": null,
"opsSynced": 85,
"syncLagTime": 45513,
"syncLagTime": 19886,
"syncLagOps": 0,
"syncLagOpsLeader": 0,
"syncLagOpsFollower": 0
}, {
"shardId": 1,
"error": null,
"opsSynced": 94,
"syncLagTime": 55205,
"syncLagTime": 4901,
"syncLagOps": 0,
"syncLagOpsLeader": 0,
"syncLagOpsFollower": 0
}, {
"shardId": 2,
"error": null,
"opsSynced": 76,
"syncLagTime": 50003,
"syncLagTime": 14899,
"syncLagOps": 0,
"syncLagOpsLeader": 0,
"syncLagOpsFollower": 0
}],
"opsSynced": 255,
"syncLagTime": 55205,
"syncLagTime": 19886,
"syncLagOps": 0
}]
}