Skip to content

Commit

Permalink
Merge branch 'master' into eui/14.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
thompsongl committed Nov 13, 2019
2 parents c447f29 + cf435b8 commit c4bf0fc
Show file tree
Hide file tree
Showing 6 changed files with 1,637 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function logstashClusterPipelinesRoute(server) {
}

const { pageOfPipelines, totalPipelineCount } =
await getPaginatedPipelines(req, lsIndexPattern, {}, metricSet, pagination, sort, queryText);
await getPaginatedPipelines(req, lsIndexPattern, { clusterUuid }, metricSet, pagination, sort, queryText);

// Just the IDs for the rest
const pipelineIds = pageOfPipelines.map(pipeline => pipeline.id);
Expand Down
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
Expand Up @@ -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.
Loading

0 comments on commit c4bf0fc

Please sign in to comment.