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] Fix logstash pipelines page in multi-cluster environment #50166

Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add test
chrisronline committed Nov 11, 2019
commit 4ddb262c13b10ac4306e03538b248fafa037e6bc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"pipelines":[{"id":"uno","metrics":{"throughput":{"bucket_size":"10 seconds","timeRange":{"min":1573485225266,"max":1573485425399},"metric":{"app":"logstash","field":"logstash_stats.pipelines.events.out","label":"Pipeline Throughput","description":"Number of events emitted per second by the Logstash pipeline at the outputs stage.","units":"e/s","format":"0,0.[00]","hasCalculation":true,"isDerivative":false},"data":[[1573485230000,0]]},"nodesCount":{"bucket_size":"10 seconds","timeRange":{"min":1573485225266,"max":1573485425399},"metric":{"app":"logstash","field":"logstash_stats.logstash.uuid","label":"Pipeline Node Count","description":"Number of nodes on which the Logstash pipeline is running.","units":"","format":"0,0.[00]","hasCalculation":true,"isDerivative":false},"data":[[1573485230000,1]]}},"latestThroughput":0,"latestNodesCount":1}],"clusterStatus":{"node_count":1,"events_in_total":0,"events_out_total":0,"avg_memory":1037959168,"avg_memory_used":203687512,"max_uptime":863288,"pipeline_count":1,"queue_types":{"memory":1,"persisted":0},"versions":["8.0.0"]},"totalPipelineCount":1}
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ export default function ({ loadTestFile }) {
loadTestFile(require.resolve('./overview'));
loadTestFile(require.resolve('./nodes'));
loadTestFile(require.resolve('./node_detail'));
loadTestFile(require.resolve('./multicluster_pipelines'));
});
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import expect from '@kbn/expect';
import fixture from './fixtures/multicluster_pipelines';

export default function ({ getService }) {
const supertest = getService('supertest');
const esArchiver = getService('esArchiver');

describe('pipelines listing multicluster', () => {
const archive = 'monitoring/logstash_pipelines_multicluster';
const timeRange = {
min: '2019-11-11T15:13:45.266Z',
max: '2019-11-11T15:17:05.399Z'
};
const pagination = {
size: 10,
index: 0
};

before('load archive', () => {
return esArchiver.load(archive);
});

after('unload archive', () => {
return esArchiver.unload(archive);
});

it('should get the pipelines', async () => {
const { body } = await supertest
.post('/api/monitoring/v1/clusters/hJS0FZ7wR9GGdYs8RNW8pw/logstash/pipelines')
.set('kbn-xsrf', 'xxx')
.send({ timeRange, pagination })
.expect(200);

expect(body).to.eql(fixture);
});
});
}
Binary file not shown.

Large diffs are not rendered by default.