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

[6.x] [Monitoring] Rename ccr fields based on changes in ES (#24519) #24593

Merged
merged 1 commit into from
Oct 25, 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 @@ -66,13 +66,13 @@ exports[`CcrShard that it renders normally 1`] = `
formattedLeader="leader on remote"
oldestStat={
Object {
"number_of_failed_fetches": 0,
"number_of_operations_indexed": 2976,
"failed_read_requests": 0,
"operations_written": 2976,
}
}
stat={
Object {
"fetch_exceptions": Array [],
"failed_read_requests": 0,
"follower_global_checkpoint": 3049,
"follower_index": "follower",
"follower_max_seq_no": 3049,
Expand All @@ -84,14 +84,14 @@ exports[`CcrShard that it renders normally 1`] = `
"number_of_concurrent_reads": 1,
"number_of_concurrent_writes": 0,
"number_of_failed_bulk_operations": 0,
"number_of_failed_fetches": 0,
"number_of_operations_indexed": 3050,
"number_of_queued_writes": 0,
"number_of_successful_bulk_operations": 3050,
"number_of_successful_fetches": 3050,
"operations_received": 3050,
"operations_written": 3050,
"read_exceptions": Array [],
"shard_id": 0,
"time_since_last_fetch_millis": 9402,
"time_since_last_read_millis": 9402,
"total_fetch_time_millis": 44128980,
"total_index_time_millis": 41827,
"total_transferred_bytes": 234156,
Expand Down Expand Up @@ -183,7 +183,7 @@ exports[`CcrShard that it renders normally 1`] = `
language="json"
>
{
"fetch_exceptions": [],
"read_exceptions": [],
"follower_global_checkpoint": 3049,
"follower_index": "follower",
"follower_max_seq_no": 3049,
Expand All @@ -195,14 +195,14 @@ exports[`CcrShard that it renders normally 1`] = `
"number_of_concurrent_reads": 1,
"number_of_concurrent_writes": 0,
"number_of_failed_bulk_operations": 0,
"number_of_failed_fetches": 0,
"number_of_operations_indexed": 3050,
"failed_read_requests": 0,
"operations_written": 3050,
"number_of_queued_writes": 0,
"number_of_successful_bulk_operations": 3050,
"number_of_successful_fetches": 3050,
"operations_received": 3050,
"shard_id": 0,
"time_since_last_fetch_millis": 9402,
"time_since_last_read_millis": 9402,
"total_fetch_time_millis": 44128980,
"total_index_time_millis": 41827,
"total_transferred_bytes": 234156
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class CcrShard extends PureComponent {

renderErrors() {
const { stat } = this.props;
if (stat.fetch_exceptions && stat.fetch_exceptions.length > 0) {
if (stat.read_exceptions && stat.read_exceptions.length > 0) {
return (
<Fragment>
<EuiPanel>
Expand All @@ -61,7 +61,7 @@ export class CcrShard extends PureComponent {
</EuiTitle>
<EuiSpacer size="s"/>
<EuiBasicTable
items={stat.fetch_exceptions}
items={stat.read_exceptions}
columns={[
{
name: 'Type',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('CcrShard', () => {
formattedLeader: 'leader on remote',
metrics: [],
stat: {
fetch_exceptions: [],
read_exceptions: [],
follower_global_checkpoint: 3049,
follower_index: 'follower',
follower_max_seq_no: 3049,
Expand All @@ -25,21 +25,21 @@ describe('CcrShard', () => {
number_of_concurrent_reads: 1,
number_of_concurrent_writes: 0,
number_of_failed_bulk_operations: 0,
number_of_failed_fetches: 0,
number_of_operations_indexed: 3050,
failed_read_requests: 0,
operations_written: 3050,
number_of_queued_writes: 0,
number_of_successful_bulk_operations: 3050,
number_of_successful_fetches: 3050,
operations_received: 3050,
shard_id: 0,
time_since_last_fetch_millis: 9402,
time_since_last_read_millis: 9402,
total_fetch_time_millis: 44128980,
total_index_time_millis: 41827,
total_transferred_bytes: 234156,
},
oldestStat: {
number_of_failed_fetches: 0,
number_of_operations_indexed: 2976
failed_read_requests: 0,
operations_written: 2976
},
timestamp: '2018-09-27T13:32:09.412Z'
};
Expand All @@ -54,7 +54,7 @@ describe('CcrShard', () => {
...props,
stat: {
...props.stat,
fetch_exceptions: [
read_exceptions: [
{
type: 'something_is_wrong',
reason: 'not sure but something happened'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ export function Status({ stat, formattedLeader, oldestStat }) {
const {
follower_index: followerIndex,
shard_id: shardId,
number_of_operations_indexed: operationsReceived,
number_of_failed_fetches: failedFetches
operations_written: operationsReceived,
failed_read_requests: failedFetches
} = stat;

const {
number_of_operations_indexed: oldestOperationsReceived,
number_of_failed_fetches: oldestFailedFetches
operations_written: oldestOperationsReceived,
failed_read_requests: oldestFailedFetches
} = oldestStat;

const metrics = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1823,7 +1823,7 @@ Object {
"calculation": [Function],
"derivative": false,
"description": "The amount of time the follower index is lagging behind the leader.",
"field": "ccr_stats.time_since_last_fetch_millis",
"field": "ccr_stats.time_since_last_read_millis",
"format": "0.[00]",
"label": "Fetch delay",
"metricAgg": "max",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ export const metrics = {
ccr_sync_lag_time: new MillisecondsToSecondsMetric({
title: 'Fetch delay', // title to use for the chart
type: 'ccr',
field: 'ccr_stats.time_since_last_fetch_millis',
field: 'ccr_stats.time_since_last_read_millis',
label: 'Fetch delay',
description: 'The amount of time the follower index is lagging behind the leader.',
format: SMALL_FLOAT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ function buildRequest(req, config, esIndexPattern) {
const aggs = {
ops_synced_max: {
max: {
field: 'ccr_stats.number_of_operations_indexed'
field: 'ccr_stats.operations_written'
}
},
ops_synced_min: {
min: {
field: 'ccr_stats.number_of_operations_indexed'
field: 'ccr_stats.operations_written'
}
},
lag_ops_leader_max: {
Expand Down Expand Up @@ -81,10 +81,10 @@ function buildRequest(req, config, esIndexPattern) {
index: esIndexPattern,
size: maxBucketSize,
filterPath: [
'hits.hits.inner_hits.by_shard.hits.hits._source.ccr_stats.fetch_exceptions',
'hits.hits.inner_hits.by_shard.hits.hits._source.ccr_stats.read_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',
'hits.hits.inner_hits.by_shard.hits.hits._source.ccr_stats.time_since_last_read_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',
Expand Down Expand Up @@ -217,9 +217,9 @@ export function ccrRoute(server) {
const fullStat = get(fullStats[`${bucket.key}:${shardBucket.key}`], '[0]', {});
const shardStat = {
shardId: shardBucket.key,
error: fullStat.fetch_exceptions.length ? fullStat.fetch_exceptions[0].exception.type : null,
error: fullStat.read_exceptions.length ? fullStat.read_exceptions[0].exception.type : null,
opsSynced: get(shardBucket, 'ops_synced.value'),
syncLagTime: fullStat.time_since_last_fetch_millis,
syncLagTime: fullStat.time_since_last_read_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 @@ -32,8 +32,8 @@ async function getCcrStat(req, esIndexPattern, filters) {
filterPath: [
'hits.hits._source.ccr_stats',
'hits.hits._source.timestamp',
'hits.hits.inner_hits.oldest.hits.hits._source.ccr_stats.number_of_operations_indexed',
'hits.hits.inner_hits.oldest.hits.hits._source.ccr_stats.number_of_failed_fetches',
'hits.hits.inner_hits.oldest.hits.hits._source.ccr_stats.operations_written',
'hits.hits.inner_hits.oldest.hits.hits._source.ccr_stats.failed_read_requests',
],
body: {
sort: [{ timestamp: { order: 'desc' } }],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function ({ getService }) {
const supertest = getService('supertest');
const esArchiver = getService('esArchiver');

describe('ccr', () => {
describe.skip('ccr', () => {
const archive = 'monitoring/ccr';
const timeRange = {
min: '2018-09-19T00:00:00.000Z',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function ({ getService }) {
const supertest = getService('supertest');
const esArchiver = getService('esArchiver');

describe('ccr shard', () => {
describe.skip('ccr shard', () => {
const archive = 'monitoring/ccr';
const timeRange = {
min: '2018-09-19T00:00:00.000Z',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"metric": {
"app": "elasticsearch",
"field": "ccr_stats.time_since_last_fetch_millis",
"field": "ccr_stats.time_since_last_read_millis",
"metricAgg": "max",
"label": "Fetch delay",
"title": "Fetch delay",
Expand Down Expand Up @@ -57,19 +57,19 @@
"mapping_version": 2,
"total_fetch_time_millis": 1265908,
"number_of_successful_fetches": 86,
"number_of_failed_fetches": 0,
"failed_read_requests": 0,
"operations_received": 86,
"total_transferred_bytes": 6602,
"total_index_time_millis": 1096,
"number_of_successful_bulk_operations": 86,
"number_of_failed_bulk_operations": 0,
"number_of_operations_indexed": 86,
"fetch_exceptions": [],
"time_since_last_fetch_millis": 19886
"operations_written": 86,
"read_exceptions": [],
"time_since_last_read_millis": 19886
},
"timestamp": "2018-09-19T20:01:00.440Z",
"oldestStat": {
"number_of_failed_fetches": 0,
"number_of_operations_indexed": 1
"failed_read_requests": 0,
"operations_written": 1
}
}
Binary file modified x-pack/test/functional/es_archives/monitoring/ccr/data.json.gz
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"properties": {
"ccr_stats": {
"properties": {
"fetch_exceptions": {
"read_exceptions": {
"type": "nested",
"properties": {
"exception": {
Expand Down Expand Up @@ -72,10 +72,10 @@
"number_of_failed_bulk_operations": {
"type": "long"
},
"number_of_failed_fetches": {
"failed_read_requests": {
"type": "long"
},
"number_of_operations_indexed": {
"operations_written": {
"type": "long"
},
"number_of_queued_writes": {
Expand All @@ -93,7 +93,7 @@
"shard_id": {
"type": "integer"
},
"time_since_last_fetch_millis": {
"time_since_last_read_millis": {
"type": "long"
},
"total_fetch_time_millis": {
Expand Down