mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
* logstash overview functional test * logstash nodes listing functional tests * node detail tests Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Sandra G <neptunian@users.noreply.github.com>
This commit is contained in:
parent
57a764f057
commit
2562763b08
21 changed files with 772 additions and 29 deletions
|
@ -64,10 +64,12 @@ export const AlertsStatus: React.FC<Props> = (props: Props) => {
|
|||
{showOnlyCount ? (
|
||||
count
|
||||
) : (
|
||||
<FormattedMessage
|
||||
id="xpack.monitoring.alerts.status.clearText"
|
||||
defaultMessage="Clear"
|
||||
/>
|
||||
<span data-test-subj="alertStatusText">
|
||||
<FormattedMessage
|
||||
id="xpack.monitoring.alerts.status.clearText"
|
||||
defaultMessage="Clear"
|
||||
/>
|
||||
</span>
|
||||
)}
|
||||
</EuiHealth>
|
||||
</EuiToolTip>
|
||||
|
|
|
@ -63,6 +63,7 @@ export const LogstashTemplate: React.FC<LogstashTemplateProps> = ({
|
|||
defaultMessage: 'Pipelines',
|
||||
}),
|
||||
route: `/logstash/node/${instance.nodeSummary?.uuid}/pipelines`,
|
||||
testSubj: 'logstashNodeDetailPipelinesLink',
|
||||
});
|
||||
tabs.push({
|
||||
id: 'advanced',
|
||||
|
@ -70,6 +71,7 @@ export const LogstashTemplate: React.FC<LogstashTemplateProps> = ({
|
|||
defaultMessage: 'Advanced',
|
||||
}),
|
||||
route: `/logstash/node/${instance.nodeSummary?.uuid}/advanced`,
|
||||
testSubj: 'logstashNodeDetailAdvancedLink',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,16 +105,18 @@ export const LogStashNodePipelinesPage: React.FC<ComponentProps> = ({ clusters }
|
|||
cluster={cluster}
|
||||
>
|
||||
{data.pipelines && (
|
||||
<PipelineListing
|
||||
className="monitoringLogstashPipelinesTable"
|
||||
onBrush={onBrush}
|
||||
zoomInfo={zoomInfo}
|
||||
stats={data.nodeSummary}
|
||||
data={data.pipelines}
|
||||
statusComponent={DetailStatus}
|
||||
{...getPaginationTableProps()}
|
||||
upgradeMessage={makeUpgradeMessage(data.nodeSummary.version)}
|
||||
/>
|
||||
<div data-test-subj="logstashPipelinesListing">
|
||||
<PipelineListing
|
||||
className="monitoringLogstashPipelinesTable"
|
||||
onBrush={onBrush}
|
||||
zoomInfo={zoomInfo}
|
||||
stats={data.nodeSummary}
|
||||
data={data.pipelines}
|
||||
statusComponent={DetailStatus}
|
||||
{...getPaginationTableProps()}
|
||||
upgradeMessage={makeUpgradeMessage(data.nodeSummary.version)}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</LogstashTemplate>
|
||||
);
|
||||
|
|
|
@ -92,7 +92,7 @@ export const LogStashNodesPage: React.FC<ComponentProps> = ({ clusters }) => {
|
|||
getPageData={getPageData}
|
||||
cluster={cluster}
|
||||
>
|
||||
<div>
|
||||
<div data-test-subj="logstashNodesPage">
|
||||
<SetupModeRenderer
|
||||
productName={LOGSTASH_SYSTEM_ID}
|
||||
render={({ setupMode, flyoutComponent, bottomBarComponent }: SetupModeProps) => (
|
||||
|
|
|
@ -85,10 +85,9 @@ export const LogStashOverviewPage: React.FC<ComponentProps> = ({ clusters }) =>
|
|||
title={title}
|
||||
pageTitle={pageTitle}
|
||||
getPageData={getPageData}
|
||||
data-test-subj="elasticsearchOverviewPage"
|
||||
cluster={cluster}
|
||||
>
|
||||
<div data-test-subj="elasticsearchOverviewPage">{renderOverview(data)}</div>
|
||||
<div data-test-subj="logstashOverviewPage">{renderOverview(data)}</div>
|
||||
</LogstashTemplate>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -105,7 +105,6 @@ export const LogStashPipelinesPage: React.FC<ComponentProps> = ({ clusters }) =>
|
|||
title={title}
|
||||
pageTitle={pageTitle}
|
||||
getPageData={getPageData}
|
||||
data-test-subj="logstashPipelinesListing"
|
||||
cluster={cluster}
|
||||
>
|
||||
<div data-test-subj="logstashPipelinesListing">{renderOverview(data)}</div>
|
||||
|
|
|
@ -98,6 +98,7 @@ export function LogstashPanel(props) {
|
|||
setupModeEnabled={setupMode.enabled}
|
||||
setupModeData={setupModeData}
|
||||
href={goToLogstash()}
|
||||
data-test-subj="lsOverview"
|
||||
aria-label={i18n.translate(
|
||||
'xpack.monitoring.cluster.overview.logstashPanel.overviewLinkAriaLabel',
|
||||
{
|
||||
|
|
|
@ -66,12 +66,15 @@ export class Listing extends PureComponent {
|
|||
|
||||
return (
|
||||
<div>
|
||||
<div>
|
||||
<EuiLink href={getSafeForExternalLink(`#/logstash/node/${node.logstash.uuid}`)}>
|
||||
<div data-test-subj="name">
|
||||
<EuiLink
|
||||
href={getSafeForExternalLink(`#/logstash/node/${node.logstash.uuid}`)}
|
||||
data-test-subj={`nodeLink-${node.logstash.uuid}`}
|
||||
>
|
||||
{name}
|
||||
</EuiLink>
|
||||
</div>
|
||||
<div>{node.logstash.http_address}</div>
|
||||
<div data-test-subj="httpAddress">{node.logstash.http_address}</div>
|
||||
{setupModeStatus}
|
||||
</div>
|
||||
);
|
||||
|
@ -92,7 +95,9 @@ export class Listing extends PureComponent {
|
|||
}),
|
||||
field: 'cpu_usage',
|
||||
sortable: true,
|
||||
render: (value) => formatPercentageUsage(value, 100),
|
||||
render: (value) => (
|
||||
<span data-test-subj="cpuUsage">{formatPercentageUsage(value, 100)}</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: i18n.translate('xpack.monitoring.logstash.nodes.loadAverageTitle', {
|
||||
|
@ -100,7 +105,7 @@ export class Listing extends PureComponent {
|
|||
}),
|
||||
field: 'load_average',
|
||||
sortable: true,
|
||||
render: (value) => formatNumber(value, '0.00'),
|
||||
render: (value) => <span data-test-subj="loadAverage">{formatNumber(value, '0.00')}</span>,
|
||||
},
|
||||
{
|
||||
name: i18n.translate('xpack.monitoring.logstash.nodes.jvmHeapUsedTitle', {
|
||||
|
@ -109,7 +114,9 @@ export class Listing extends PureComponent {
|
|||
}),
|
||||
field: 'jvm_heap_used',
|
||||
sortable: true,
|
||||
render: (value) => formatPercentageUsage(value, 100),
|
||||
render: (value) => (
|
||||
<span data-test-subj="jvmHeapUsed">{formatPercentageUsage(value, 100)}</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: i18n.translate('xpack.monitoring.logstash.nodes.eventsIngestedTitle', {
|
||||
|
@ -117,7 +124,7 @@ export class Listing extends PureComponent {
|
|||
}),
|
||||
field: 'events_out',
|
||||
sortable: true,
|
||||
render: (value) => formatNumber(value, '0.[0]a'),
|
||||
render: (value) => <span data-test-subj="eventsOut">{formatNumber(value, '0.[0]a')}</span>,
|
||||
},
|
||||
{
|
||||
name: i18n.translate('xpack.monitoring.logstash.nodes.configReloadsTitle', {
|
||||
|
@ -126,14 +133,14 @@ export class Listing extends PureComponent {
|
|||
sortable: true,
|
||||
render: (node) => (
|
||||
<div>
|
||||
<div>
|
||||
<div data-test-subj="configReloadsSuccess">
|
||||
<FormattedMessage
|
||||
id="xpack.monitoring.logstash.nodes.configReloadsSuccessCountLabel"
|
||||
defaultMessage="{reloadsSuccesses} successes"
|
||||
values={{ reloadsSuccesses: node.reloads.successes }}
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<div data-test-subj="configReloadsFailure">
|
||||
<FormattedMessage
|
||||
id="xpack.monitoring.logstash.nodes.configReloadsFailuresCountLabel"
|
||||
defaultMessage="{reloadsFailures} failures"
|
||||
|
@ -149,7 +156,7 @@ export class Listing extends PureComponent {
|
|||
}),
|
||||
field: 'version',
|
||||
sortable: true,
|
||||
render: (value) => formatNumber(value),
|
||||
render: (value) => <span data-test-subj="version">{formatNumber(value)}</span>,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
|
@ -34,9 +34,14 @@ export default function ({ loadTestFile }) {
|
|||
loadTestFile(require.resolve('./kibana/instance'));
|
||||
loadTestFile(require.resolve('./kibana/instance_mb'));
|
||||
|
||||
loadTestFile(require.resolve('./logstash/overview'));
|
||||
loadTestFile(require.resolve('./logstash/overview_mb'));
|
||||
loadTestFile(require.resolve('./logstash/nodes'));
|
||||
loadTestFile(require.resolve('./logstash/nodes_mb'));
|
||||
loadTestFile(require.resolve('./logstash/pipelines'));
|
||||
loadTestFile(require.resolve('./logstash/pipelines_mb'));
|
||||
|
||||
loadTestFile(require.resolve('./logstash/node_detail'));
|
||||
loadTestFile(require.resolve('./logstash/node_detail_mb'));
|
||||
loadTestFile(require.resolve('./beats/cluster'));
|
||||
loadTestFile(require.resolve('./beats/overview'));
|
||||
loadTestFile(require.resolve('./beats/listing'));
|
||||
|
|
125
x-pack/test/functional/apps/monitoring/logstash/node_detail.js
Normal file
125
x-pack/test/functional/apps/monitoring/logstash/node_detail.js
Normal file
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { getLifecycleMethods } from '../_get_lifecycle_methods';
|
||||
|
||||
export default function ({ getService, getPageObjects }) {
|
||||
const PageObjects = getPageObjects(['common']);
|
||||
const retry = getService('retry');
|
||||
const clusterOverview = getService('monitoringClusterOverview');
|
||||
const nodes = getService('monitoringLogstashNodes');
|
||||
const nodeDetail = getService('monitoringLogstashNodeDetail');
|
||||
const pipelinesList = getService('monitoringLogstashPipelines');
|
||||
|
||||
describe('Logstash node detail', () => {
|
||||
describe('Node', () => {
|
||||
const { setup, tearDown } = getLifecycleMethods(getService, getPageObjects);
|
||||
const nodeSummaryStatus = {
|
||||
eventsIn: 'Events Received\n42.4k',
|
||||
eventsOut: 'Events Emitted\n39.4k',
|
||||
httpAddress: 'Transport Address\n127.0.0.1:9600',
|
||||
numReloads: 'Config Reloads\n0',
|
||||
pipelineBatchSize: 'Batch Size\n125',
|
||||
pipelineWorkers: 'Pipeline Workers\n8',
|
||||
uptime: 'Uptime\n8 minutes',
|
||||
version: 'Version\n7.0.0-alpha1',
|
||||
};
|
||||
|
||||
before(async () => {
|
||||
await setup('x-pack/test/functional/es_archives/monitoring/logstash_pipelines', {
|
||||
from: 'Jan 22, 2018 @ 09:10:00.000',
|
||||
to: 'Jan 22, 2018 @ 09:41:00.000',
|
||||
});
|
||||
|
||||
await clusterOverview.closeAlertsModal();
|
||||
|
||||
// go to logstash nodes
|
||||
await clusterOverview.clickLsNodes();
|
||||
expect(await nodes.isOnNodesListing()).to.be(true);
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await tearDown();
|
||||
});
|
||||
|
||||
it('detail view should have summary status showing correct info', async () => {
|
||||
await nodes.clickRowByResolver('29a3dfa6-c146-4534-9bc0-be475d2ce950');
|
||||
expect(await nodeDetail.getSummary()).to.eql(nodeSummaryStatus);
|
||||
});
|
||||
it('advanced view should have summary status showing correct info', async () => {
|
||||
await nodeDetail.clickAdvanced();
|
||||
|
||||
expect(await nodeDetail.getSummary()).to.eql(nodeSummaryStatus);
|
||||
});
|
||||
it('pipelines view should have summary status showing correct info', async () => {
|
||||
await nodeDetail.clickPipelines();
|
||||
|
||||
expect(await nodeDetail.getSummary()).to.eql(nodeSummaryStatus);
|
||||
});
|
||||
it('pipelines view should have Pipelines table showing correct rows with default sorting', async () => {
|
||||
const rows = await pipelinesList.getRows();
|
||||
expect(rows.length).to.be(3);
|
||||
|
||||
await pipelinesList.clickIdCol();
|
||||
|
||||
const pipelinesAll = await pipelinesList.getPipelinesAll();
|
||||
|
||||
const tableData = [
|
||||
{ id: 'nginx_logs', eventsEmittedRate: '62.5 e/s', nodeCount: '1' },
|
||||
{ id: 'test_interpolation', eventsEmittedRate: '0 e/s', nodeCount: '1' },
|
||||
{ id: 'tweets_about_labradoodles', eventsEmittedRate: '1.2 e/s', nodeCount: '1' },
|
||||
];
|
||||
|
||||
// check the all data in the table
|
||||
pipelinesAll.forEach((obj, index) => {
|
||||
expect(pipelinesAll[index].id).to.be(tableData[index].id);
|
||||
expect(pipelinesAll[index].eventsEmittedRate).to.be(tableData[index].eventsEmittedRate);
|
||||
expect(pipelinesAll[index].nodeCount).to.be(tableData[index].nodeCount);
|
||||
});
|
||||
});
|
||||
|
||||
it('should have Pipelines Table showing correct rows after sorting by Events Emitted Rate Asc', async () => {
|
||||
await pipelinesList.clickEventsEmittedRateCol();
|
||||
|
||||
const rows = await pipelinesList.getRows();
|
||||
expect(rows.length).to.be(3);
|
||||
|
||||
const pipelinesAll = await pipelinesList.getPipelinesAll();
|
||||
|
||||
const tableData = [
|
||||
{ id: 'test_interpolation', eventsEmittedRate: '0 e/s', nodeCount: '1' },
|
||||
{ id: 'tweets_about_labradoodles', eventsEmittedRate: '1.2 e/s', nodeCount: '1' },
|
||||
{ id: 'nginx_logs', eventsEmittedRate: '62.5 e/s', nodeCount: '1' },
|
||||
];
|
||||
|
||||
// check the all data in the table
|
||||
pipelinesAll.forEach((obj, index) => {
|
||||
expect(pipelinesAll[index].id).to.be(tableData[index].id);
|
||||
expect(pipelinesAll[index].eventsEmittedRate).to.be(tableData[index].eventsEmittedRate);
|
||||
expect(pipelinesAll[index].nodeCount).to.be(tableData[index].nodeCount);
|
||||
});
|
||||
});
|
||||
|
||||
it('should filter for non-existent pipeline', async () => {
|
||||
await pipelinesList.setFilter('foobar');
|
||||
await pipelinesList.assertNoData();
|
||||
await pipelinesList.clearFilter();
|
||||
});
|
||||
|
||||
it('should filter for specific pipelines', async () => {
|
||||
await pipelinesList.setFilter('la');
|
||||
await PageObjects.common.pressEnterKey();
|
||||
await retry.try(async () => {
|
||||
const rows = await pipelinesList.getRows();
|
||||
expect(rows.length).to.be(2);
|
||||
});
|
||||
await pipelinesList.clearFilter();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { getLifecycleMethods } from '../_get_lifecycle_methods';
|
||||
|
||||
export default function ({ getService, getPageObjects }) {
|
||||
const PageObjects = getPageObjects(['common']);
|
||||
const retry = getService('retry');
|
||||
const clusterOverview = getService('monitoringClusterOverview');
|
||||
const nodes = getService('monitoringLogstashNodes');
|
||||
const nodeDetail = getService('monitoringLogstashNodeDetail');
|
||||
const pipelinesList = getService('monitoringLogstashPipelines');
|
||||
|
||||
describe('Logstash node detail mb', () => {
|
||||
describe('Node', () => {
|
||||
const { setup, tearDown } = getLifecycleMethods(getService, getPageObjects);
|
||||
const nodeSummaryStatus = {
|
||||
eventsIn: 'Events Received\n42.4k',
|
||||
eventsOut: 'Events Emitted\n39.4k',
|
||||
httpAddress: 'Transport Address\n127.0.0.1:9600',
|
||||
numReloads: 'Config Reloads\n0',
|
||||
pipelineBatchSize: 'Batch Size\n125',
|
||||
pipelineWorkers: 'Pipeline Workers\n8',
|
||||
uptime: 'Uptime\n8 minutes',
|
||||
version: 'Version\n7.0.0-alpha1',
|
||||
};
|
||||
|
||||
before(async () => {
|
||||
await setup('x-pack/test/functional/es_archives/monitoring/logstash_pipelines_mb', {
|
||||
from: 'Jan 22, 2018 @ 09:10:00.000',
|
||||
to: 'Jan 22, 2018 @ 09:41:00.000',
|
||||
});
|
||||
|
||||
await clusterOverview.closeAlertsModal();
|
||||
|
||||
// go to logstash nodes
|
||||
await clusterOverview.clickLsNodes();
|
||||
expect(await nodes.isOnNodesListing()).to.be(true);
|
||||
await nodes.clickRowByResolver('29a3dfa6-c146-4534-9bc0-be475d2ce950');
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await tearDown();
|
||||
});
|
||||
|
||||
it('detail view should have summary status showing correct info', async () => {
|
||||
expect(await nodeDetail.getSummary()).to.eql(nodeSummaryStatus);
|
||||
});
|
||||
it('advanced view should have summary status showing correct info', async () => {
|
||||
await nodeDetail.clickAdvanced();
|
||||
|
||||
expect(await nodeDetail.getSummary()).to.eql(nodeSummaryStatus);
|
||||
});
|
||||
it('pipelines view should have summary status showing correct info', async () => {
|
||||
await nodeDetail.clickPipelines();
|
||||
|
||||
expect(await nodeDetail.getSummary()).to.eql(nodeSummaryStatus);
|
||||
});
|
||||
it('pipelines view should have Pipelines table showing correct rows with default sorting', async () => {
|
||||
const rows = await pipelinesList.getRows();
|
||||
expect(rows.length).to.be(3);
|
||||
|
||||
await pipelinesList.clickIdCol();
|
||||
|
||||
const pipelinesAll = await pipelinesList.getPipelinesAll();
|
||||
|
||||
const tableData = [
|
||||
{ id: 'nginx_logs', eventsEmittedRate: '62.5 e/s', nodeCount: '1' },
|
||||
{ id: 'test_interpolation', eventsEmittedRate: '0 e/s', nodeCount: '1' },
|
||||
{ id: 'tweets_about_labradoodles', eventsEmittedRate: '1.2 e/s', nodeCount: '1' },
|
||||
];
|
||||
|
||||
// check the all data in the table
|
||||
pipelinesAll.forEach((obj, index) => {
|
||||
expect(pipelinesAll[index].id).to.be(tableData[index].id);
|
||||
expect(pipelinesAll[index].eventsEmittedRate).to.be(tableData[index].eventsEmittedRate);
|
||||
expect(pipelinesAll[index].nodeCount).to.be(tableData[index].nodeCount);
|
||||
});
|
||||
});
|
||||
|
||||
it('should have Pipelines Table showing correct rows after sorting by Events Emitted Rate Asc', async () => {
|
||||
await pipelinesList.clickEventsEmittedRateCol();
|
||||
|
||||
const rows = await pipelinesList.getRows();
|
||||
expect(rows.length).to.be(3);
|
||||
|
||||
const pipelinesAll = await pipelinesList.getPipelinesAll();
|
||||
|
||||
const tableData = [
|
||||
{ id: 'test_interpolation', eventsEmittedRate: '0 e/s', nodeCount: '1' },
|
||||
{ id: 'tweets_about_labradoodles', eventsEmittedRate: '1.2 e/s', nodeCount: '1' },
|
||||
{ id: 'nginx_logs', eventsEmittedRate: '62.5 e/s', nodeCount: '1' },
|
||||
];
|
||||
|
||||
// check the all data in the table
|
||||
pipelinesAll.forEach((obj, index) => {
|
||||
expect(pipelinesAll[index].id).to.be(tableData[index].id);
|
||||
expect(pipelinesAll[index].eventsEmittedRate).to.be(tableData[index].eventsEmittedRate);
|
||||
expect(pipelinesAll[index].nodeCount).to.be(tableData[index].nodeCount);
|
||||
});
|
||||
});
|
||||
|
||||
it('should filter for non-existent pipeline', async () => {
|
||||
await pipelinesList.setFilter('foobar');
|
||||
await pipelinesList.assertNoData();
|
||||
await pipelinesList.clearFilter();
|
||||
});
|
||||
|
||||
it('should filter for specific pipelines', async () => {
|
||||
await pipelinesList.setFilter('la');
|
||||
await PageObjects.common.pressEnterKey();
|
||||
await retry.try(async () => {
|
||||
const rows = await pipelinesList.getRows();
|
||||
expect(rows.length).to.be(2);
|
||||
});
|
||||
await pipelinesList.clearFilter();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
104
x-pack/test/functional/apps/monitoring/logstash/nodes.js
Normal file
104
x-pack/test/functional/apps/monitoring/logstash/nodes.js
Normal file
|
@ -0,0 +1,104 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { getLifecycleMethods } from '../_get_lifecycle_methods';
|
||||
|
||||
export default function ({ getService, getPageObjects }) {
|
||||
const clusterOverview = getService('monitoringClusterOverview');
|
||||
const nodes = getService('monitoringLogstashNodes');
|
||||
const logstashSummaryStatus = getService('monitoringLogstashSummaryStatus');
|
||||
|
||||
describe('Logstash nodes', () => {
|
||||
const { setup, tearDown } = getLifecycleMethods(getService, getPageObjects);
|
||||
|
||||
before(async () => {
|
||||
await setup('x-pack/test/functional/es_archives/monitoring/logstash_pipelines', {
|
||||
from: 'Jan 22, 2018 @ 09:10:00.000',
|
||||
to: 'Jan 22, 2018 @ 09:41:00.000',
|
||||
});
|
||||
|
||||
await clusterOverview.closeAlertsModal();
|
||||
|
||||
// go to logstash nodes
|
||||
await clusterOverview.clickLsNodes();
|
||||
expect(await nodes.isOnNodesListing()).to.be(true);
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await tearDown();
|
||||
});
|
||||
it('should have Logstash Cluster Summary Status showing correct info', async () => {
|
||||
expect(await logstashSummaryStatus.getContent()).to.eql({
|
||||
eventsInTotal: 'Events Received\n117.9k',
|
||||
eventsOutTotal: 'Events Emitted\n111.9k',
|
||||
memoryUsed: 'Memory\n528.4 MB / 1.9 GB',
|
||||
nodeCount: 'Nodes\n2',
|
||||
});
|
||||
});
|
||||
it('should have a nodes table with the correct number of rows', async () => {
|
||||
const rows = await nodes.getRows();
|
||||
expect(rows.length).to.be(2);
|
||||
});
|
||||
it('should have a nodes table with the correct data', async () => {
|
||||
const nodesAll = await nodes.getNodesAll();
|
||||
|
||||
const tableData = [
|
||||
{
|
||||
id: 'Shaunaks-MacBook-Pro.local',
|
||||
httpAddress: '127.0.0.1:9601',
|
||||
alertStatus: 'Clear',
|
||||
cpuUsage: '0.00%',
|
||||
loadAverage: '4.54',
|
||||
jvmHeapUsed: '22.00%',
|
||||
eventsOut: '73.5k',
|
||||
configReloadsSuccess: '0 successes',
|
||||
configReloadsFailure: '0 failures',
|
||||
version: '7.0.0-alpha1',
|
||||
},
|
||||
{
|
||||
id: 'Shaunaks-MacBook-Pro.local',
|
||||
httpAddress: '127.0.0.1:9600',
|
||||
alertStatus: 'Clear',
|
||||
cpuUsage: '2.00%',
|
||||
loadAverage: '4.76',
|
||||
jvmHeapUsed: '30.00%',
|
||||
eventsOut: '38.4k',
|
||||
configReloadsSuccess: '0 successes',
|
||||
configReloadsFailure: '0 failures',
|
||||
version: '7.0.0-alpha1',
|
||||
},
|
||||
];
|
||||
|
||||
nodesAll.forEach((obj, index) => {
|
||||
expect(nodesAll[index].id).to.be(tableData[index].id);
|
||||
expect(nodesAll[index].httpAddress).to.be(tableData[index].httpAddress);
|
||||
expect(nodesAll[index].alertStatus).to.be(tableData[index].alertStatus);
|
||||
expect(nodesAll[index].cpuUsage).to.be(tableData[index].cpuUsage);
|
||||
expect(nodesAll[index].loadAverage).to.be(tableData[index].loadAverage);
|
||||
expect(nodesAll[index].jvmHeapUsed).to.be(tableData[index].jvmHeapUsed);
|
||||
expect(nodesAll[index].eventsOut).to.be(tableData[index].eventsOut);
|
||||
expect(nodesAll[index].configReloadsSuccess).to.be(tableData[index].configReloadsSuccess);
|
||||
expect(nodesAll[index].configReloadsFailure).to.be(tableData[index].configReloadsFailure);
|
||||
expect(nodesAll[index].version).to.be(tableData[index].version);
|
||||
});
|
||||
});
|
||||
|
||||
it('should filter for non-existent node', async () => {
|
||||
await nodes.setFilter('foobar');
|
||||
await nodes.assertNoData();
|
||||
await nodes.clearFilter();
|
||||
});
|
||||
|
||||
it('should filter for specific nodes', async () => {
|
||||
await nodes.setFilter('sha');
|
||||
const rows = await nodes.getRows();
|
||||
expect(rows.length).to.be(2);
|
||||
await nodes.clearFilter();
|
||||
});
|
||||
});
|
||||
}
|
104
x-pack/test/functional/apps/monitoring/logstash/nodes_mb.js
Normal file
104
x-pack/test/functional/apps/monitoring/logstash/nodes_mb.js
Normal file
|
@ -0,0 +1,104 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { getLifecycleMethods } from '../_get_lifecycle_methods';
|
||||
|
||||
export default function ({ getService, getPageObjects }) {
|
||||
const clusterOverview = getService('monitoringClusterOverview');
|
||||
const nodes = getService('monitoringLogstashNodes');
|
||||
const logstashSummaryStatus = getService('monitoringLogstashSummaryStatus');
|
||||
|
||||
describe('Logstash nodes mb', () => {
|
||||
const { setup, tearDown } = getLifecycleMethods(getService, getPageObjects);
|
||||
|
||||
before(async () => {
|
||||
await setup('x-pack/test/functional/es_archives/monitoring/logstash_pipelines_mb', {
|
||||
from: 'Jan 22, 2018 @ 09:10:00.000',
|
||||
to: 'Jan 22, 2018 @ 09:41:00.000',
|
||||
});
|
||||
|
||||
await clusterOverview.closeAlertsModal();
|
||||
|
||||
// go to logstash nodes
|
||||
await clusterOverview.clickLsNodes();
|
||||
expect(await nodes.isOnNodesListing()).to.be(true);
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await tearDown();
|
||||
});
|
||||
it('should have Logstash Cluster Summary Status showing correct info', async () => {
|
||||
expect(await logstashSummaryStatus.getContent()).to.eql({
|
||||
eventsInTotal: 'Events Received\n117.9k',
|
||||
eventsOutTotal: 'Events Emitted\n111.9k',
|
||||
memoryUsed: 'Memory\n528.4 MB / 1.9 GB',
|
||||
nodeCount: 'Nodes\n2',
|
||||
});
|
||||
});
|
||||
it('should have a nodes table with the correct number of rows', async () => {
|
||||
const rows = await nodes.getRows();
|
||||
expect(rows.length).to.be(2);
|
||||
});
|
||||
it('should have a nodes table with the correct data', async () => {
|
||||
const nodesAll = await nodes.getNodesAll();
|
||||
|
||||
const tableData = [
|
||||
{
|
||||
id: 'Shaunaks-MacBook-Pro.local',
|
||||
httpAddress: '127.0.0.1:9601',
|
||||
alertStatus: 'Clear',
|
||||
cpuUsage: '0.00%',
|
||||
loadAverage: '4.54',
|
||||
jvmHeapUsed: '22.00%',
|
||||
eventsOut: '73.5k',
|
||||
configReloadsSuccess: '0 successes',
|
||||
configReloadsFailure: '0 failures',
|
||||
version: '7.0.0-alpha1',
|
||||
},
|
||||
{
|
||||
id: 'Shaunaks-MacBook-Pro.local',
|
||||
httpAddress: '127.0.0.1:9600',
|
||||
alertStatus: 'Clear',
|
||||
cpuUsage: '2.00%',
|
||||
loadAverage: '4.76',
|
||||
jvmHeapUsed: '30.00%',
|
||||
eventsOut: '38.4k',
|
||||
configReloadsSuccess: '0 successes',
|
||||
configReloadsFailure: '0 failures',
|
||||
version: '7.0.0-alpha1',
|
||||
},
|
||||
];
|
||||
|
||||
nodesAll.forEach((obj, index) => {
|
||||
expect(nodesAll[index].id).to.be(tableData[index].id);
|
||||
expect(nodesAll[index].httpAddress).to.be(tableData[index].httpAddress);
|
||||
expect(nodesAll[index].alertStatus).to.be(tableData[index].alertStatus);
|
||||
expect(nodesAll[index].cpuUsage).to.be(tableData[index].cpuUsage);
|
||||
expect(nodesAll[index].loadAverage).to.be(tableData[index].loadAverage);
|
||||
expect(nodesAll[index].jvmHeapUsed).to.be(tableData[index].jvmHeapUsed);
|
||||
expect(nodesAll[index].eventsOut).to.be(tableData[index].eventsOut);
|
||||
expect(nodesAll[index].configReloadsSuccess).to.be(tableData[index].configReloadsSuccess);
|
||||
expect(nodesAll[index].configReloadsFailure).to.be(tableData[index].configReloadsFailure);
|
||||
expect(nodesAll[index].version).to.be(tableData[index].version);
|
||||
});
|
||||
});
|
||||
|
||||
it('should filter for non-existent node', async () => {
|
||||
await nodes.setFilter('foobar');
|
||||
await nodes.assertNoData();
|
||||
await nodes.clearFilter();
|
||||
});
|
||||
|
||||
it('should filter for specific nodes', async () => {
|
||||
await nodes.setFilter('sha');
|
||||
const rows = await nodes.getRows();
|
||||
expect(rows.length).to.be(2);
|
||||
await nodes.clearFilter();
|
||||
});
|
||||
});
|
||||
}
|
44
x-pack/test/functional/apps/monitoring/logstash/overview.js
Normal file
44
x-pack/test/functional/apps/monitoring/logstash/overview.js
Normal file
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { getLifecycleMethods } from '../_get_lifecycle_methods';
|
||||
|
||||
export default function ({ getService, getPageObjects }) {
|
||||
const clusterOverview = getService('monitoringClusterOverview');
|
||||
const overview = getService('monitoringLogstashOverview');
|
||||
const logstashSummaryStatus = getService('monitoringLogstashSummaryStatus');
|
||||
|
||||
describe('Logstash overview', () => {
|
||||
const { setup, tearDown } = getLifecycleMethods(getService, getPageObjects);
|
||||
|
||||
before(async () => {
|
||||
await setup('x-pack/test/functional/es_archives/monitoring/logstash_pipelines', {
|
||||
from: 'Jan 22, 2018 @ 09:10:00.000',
|
||||
to: 'Jan 22, 2018 @ 09:41:00.000',
|
||||
});
|
||||
|
||||
await clusterOverview.closeAlertsModal();
|
||||
|
||||
// go to logstash overview
|
||||
await clusterOverview.clickLsOverview();
|
||||
expect(await overview.isOnOverview()).to.be(true);
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await tearDown();
|
||||
});
|
||||
it('should have Logstash Cluster Summary Status showing correct info', async () => {
|
||||
expect(await logstashSummaryStatus.getContent()).to.eql({
|
||||
eventsInTotal: 'Events Received\n117.9k',
|
||||
eventsOutTotal: 'Events Emitted\n111.9k',
|
||||
memoryUsed: 'Memory\n528.4 MB / 1.9 GB',
|
||||
nodeCount: 'Nodes\n2',
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { getLifecycleMethods } from '../_get_lifecycle_methods';
|
||||
|
||||
export default function ({ getService, getPageObjects }) {
|
||||
const clusterOverview = getService('monitoringClusterOverview');
|
||||
const overview = getService('monitoringLogstashOverview');
|
||||
const logstashSummaryStatus = getService('monitoringLogstashSummaryStatus');
|
||||
|
||||
describe('Logstash overview mb', () => {
|
||||
const { setup, tearDown } = getLifecycleMethods(getService, getPageObjects);
|
||||
|
||||
before(async () => {
|
||||
await setup('x-pack/test/functional/es_archives/monitoring/logstash_pipelines_mb', {
|
||||
from: 'Jan 22, 2018 @ 09:10:00.000',
|
||||
to: 'Jan 22, 2018 @ 09:41:00.000',
|
||||
});
|
||||
|
||||
await clusterOverview.closeAlertsModal();
|
||||
|
||||
// go to logstash overview
|
||||
await clusterOverview.clickLsOverview();
|
||||
expect(await overview.isOnOverview()).to.be(true);
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await tearDown();
|
||||
});
|
||||
it('should have an Logstash Summary Status with correct info', async () => {
|
||||
expect(await logstashSummaryStatus.getContent()).to.eql({
|
||||
eventsInTotal: 'Events Received\n117.9k',
|
||||
eventsOutTotal: 'Events Emitted\n111.9k',
|
||||
memoryUsed: 'Memory\n528.4 MB / 1.9 GB',
|
||||
nodeCount: 'Nodes\n2',
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
|
@ -27,6 +27,9 @@ import {
|
|||
MonitoringBeatsListingProvider,
|
||||
MonitoringBeatDetailProvider,
|
||||
MonitoringBeatsSummaryStatusProvider,
|
||||
MonitoringLogstashOverviewProvider,
|
||||
MonitoringLogstashNodesProvider,
|
||||
MonitoringLogstashNodeDetailProvider,
|
||||
MonitoringLogstashPipelinesProvider,
|
||||
MonitoringLogstashSummaryStatusProvider,
|
||||
MonitoringKibanaOverviewProvider,
|
||||
|
@ -88,6 +91,9 @@ export const services = {
|
|||
monitoringBeatsListing: MonitoringBeatsListingProvider,
|
||||
monitoringBeatDetail: MonitoringBeatDetailProvider,
|
||||
monitoringBeatsSummaryStatus: MonitoringBeatsSummaryStatusProvider,
|
||||
monitoringLogstashOverview: MonitoringLogstashOverviewProvider,
|
||||
monitoringLogstashNodes: MonitoringLogstashNodesProvider,
|
||||
monitoringLogstashNodeDetail: MonitoringLogstashNodeDetailProvider,
|
||||
monitoringLogstashPipelines: MonitoringLogstashPipelinesProvider,
|
||||
monitoringLogstashSummaryStatus: MonitoringLogstashSummaryStatusProvider,
|
||||
monitoringKibanaOverview: MonitoringKibanaOverviewProvider,
|
||||
|
|
|
@ -45,6 +45,7 @@ export function MonitoringClusterOverviewProvider({ getService }) {
|
|||
const SUBJ_LS_UPTIME = `${SUBJ_LS_PANEL} > lsUptime`;
|
||||
const SUBJ_LS_JVM_HEAP = `${SUBJ_LS_PANEL} > lsJvmHeap`;
|
||||
const SUBJ_LS_PIPELINES = `${SUBJ_LS_PANEL} > lsPipelines`;
|
||||
const SUBJ_LS_OVERVIEW = `${SUBJ_LS_PANEL} > lsOverview`;
|
||||
|
||||
const SUBJ_BEATS_PANEL = `clusterItemContainerBeats`;
|
||||
const SUBJ_BEATS_OVERVIEW = `${SUBJ_BEATS_PANEL} > beatsOverview`;
|
||||
|
@ -179,6 +180,12 @@ export function MonitoringClusterOverviewProvider({ getService }) {
|
|||
getLsJvmHeap() {
|
||||
return testSubjects.getVisibleText(SUBJ_LS_JVM_HEAP);
|
||||
}
|
||||
clickLsOverview() {
|
||||
return testSubjects.click(SUBJ_LS_OVERVIEW);
|
||||
}
|
||||
clickLsNodes() {
|
||||
return testSubjects.click(SUBJ_LS_NODES);
|
||||
}
|
||||
getLsPipelines() {
|
||||
return testSubjects.getVisibleText(SUBJ_LS_PIPELINES);
|
||||
}
|
||||
|
|
|
@ -20,6 +20,9 @@ export { MonitoringBeatsOverviewProvider } from './beats_overview';
|
|||
export { MonitoringBeatsListingProvider } from './beats_listing';
|
||||
export { MonitoringBeatDetailProvider } from './beat_detail';
|
||||
export { MonitoringBeatsSummaryStatusProvider } from './beats_summary_status';
|
||||
export { MonitoringLogstashOverviewProvider } from './logstash_overview';
|
||||
export { MonitoringLogstashNodesProvider } from './logstash_nodes';
|
||||
export { MonitoringLogstashNodeDetailProvider } from './logstash_node_detail';
|
||||
export { MonitoringLogstashPipelinesProvider } from './logstash_pipelines';
|
||||
export { MonitoringLogstashSummaryStatusProvider } from './logstash_summary_status';
|
||||
export { MonitoringKibanaOverviewProvider } from './kibana_overview';
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export function MonitoringLogstashNodeDetailProvider({ getService }) {
|
||||
const testSubjects = getService('testSubjects');
|
||||
|
||||
const SUBJ_SUMMARY = 'logstashDetailStatus';
|
||||
const SUBJ_SUMMARY_HTTP_ADDRESS = `${SUBJ_SUMMARY} > httpAddress`;
|
||||
const SUBJ_SUMMARY_EVENTS_IN = `${SUBJ_SUMMARY} > eventsIn`;
|
||||
const SUBJ_SUMMARY_EVENTS_OUT = `${SUBJ_SUMMARY} > eventsOut`;
|
||||
const SUBJ_SUMMARY_NUM_RELOADS = `${SUBJ_SUMMARY} > numReloads`;
|
||||
const SUBJ_SUMMARY_PIPELINE_WORKERS = `${SUBJ_SUMMARY} > pipelineWorkers`;
|
||||
const SUBJ_SUMMARY_PIPELINE_BATCH_SIZE = `${SUBJ_SUMMARY} > pipelineBatchSize`;
|
||||
const SUBJ_SUMMARY_VERSION = `${SUBJ_SUMMARY} > version`;
|
||||
const SUBJ_SUMMARY_UPTIME = `${SUBJ_SUMMARY} > uptime`;
|
||||
|
||||
return new (class LogstashNodeDetail {
|
||||
async clickPipelines() {
|
||||
return testSubjects.click('logstashNodeDetailPipelinesLink');
|
||||
}
|
||||
async clickAdvanced() {
|
||||
return testSubjects.click('logstashNodeDetailAdvancedLink');
|
||||
}
|
||||
|
||||
async getSummary() {
|
||||
return {
|
||||
httpAddress: await testSubjects.getVisibleText(SUBJ_SUMMARY_HTTP_ADDRESS),
|
||||
eventsIn: await testSubjects.getVisibleText(SUBJ_SUMMARY_EVENTS_IN),
|
||||
eventsOut: await testSubjects.getVisibleText(SUBJ_SUMMARY_EVENTS_OUT),
|
||||
numReloads: await testSubjects.getVisibleText(SUBJ_SUMMARY_NUM_RELOADS),
|
||||
pipelineWorkers: await testSubjects.getVisibleText(SUBJ_SUMMARY_PIPELINE_WORKERS),
|
||||
pipelineBatchSize: await testSubjects.getVisibleText(SUBJ_SUMMARY_PIPELINE_BATCH_SIZE),
|
||||
version: await testSubjects.getVisibleText(SUBJ_SUMMARY_VERSION),
|
||||
uptime: await testSubjects.getVisibleText(SUBJ_SUMMARY_UPTIME),
|
||||
};
|
||||
}
|
||||
})();
|
||||
}
|
102
x-pack/test/functional/services/monitoring/logstash_nodes.js
Normal file
102
x-pack/test/functional/services/monitoring/logstash_nodes.js
Normal file
|
@ -0,0 +1,102 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { range } from 'lodash';
|
||||
export function MonitoringLogstashNodesProvider({ getService, getPageObjects }) {
|
||||
const testSubjects = getService('testSubjects');
|
||||
const retry = getService('retry');
|
||||
const PageObjects = getPageObjects(['monitoring']);
|
||||
const find = getService('find');
|
||||
|
||||
const SUBJ_OVERVIEW_PAGE = 'logstashNodesPage';
|
||||
const SUBJ_TABLE_CONTAINER = 'logstashNodesTableContainer';
|
||||
const SUBJ_SEARCH_BAR = `${SUBJ_TABLE_CONTAINER} > monitoringTableToolBar`;
|
||||
const SUBJ_TABLE_NO_DATA = `${SUBJ_TABLE_CONTAINER} > monitoringTableNoData`;
|
||||
const SUBJ_NODE_NAME = `${SUBJ_TABLE_CONTAINER} > name`;
|
||||
const SUBJ_NODE_ALERT_STATUS = `${SUBJ_TABLE_CONTAINER} > alertStatusText`;
|
||||
const SUBJ_NODE_IP = `${SUBJ_TABLE_CONTAINER} > httpAddress`;
|
||||
const SUBJ_NODE_CPU_USAGE = `${SUBJ_TABLE_CONTAINER} > cpuUsage`;
|
||||
const SUBJ_NODE_LOAD_AVERAGE = `${SUBJ_TABLE_CONTAINER} > loadAverage`;
|
||||
const SUBJ_NODE_JVM_HEAP_USED = `${SUBJ_TABLE_CONTAINER} > jvmHeapUsed`;
|
||||
const SUBJ_NODE_EVENTS_OUT = `${SUBJ_TABLE_CONTAINER} > eventsOut`;
|
||||
const SUBJ_NODE_CONFIG_RELOADS_SUCCESS = `${SUBJ_TABLE_CONTAINER} > configReloadsSuccess`;
|
||||
const SUBJ_NODE_CONFIG_RELOADS_FAILURE = `${SUBJ_TABLE_CONTAINER} > configReloadsFailure`;
|
||||
const SUBJ_NODE_VERSION = `${SUBJ_TABLE_CONTAINER} > version`;
|
||||
|
||||
const SUBJ_NODE_LINK_PREFIX = `${SUBJ_TABLE_CONTAINER} > nodeLink-`;
|
||||
|
||||
return new (class LogstashNodes {
|
||||
async isOnNodesListing() {
|
||||
const pageId = await retry.try(() => testSubjects.find(SUBJ_OVERVIEW_PAGE));
|
||||
return pageId !== null;
|
||||
}
|
||||
async clickRowByResolver(nodeResolver) {
|
||||
await retry.waitForWithTimeout('redirection to node detail', 30000, async () => {
|
||||
await testSubjects.click(SUBJ_NODE_LINK_PREFIX + nodeResolver, 5000);
|
||||
return testSubjects.exists('logstashDetailStatus', { timeout: 5000 });
|
||||
});
|
||||
}
|
||||
getRows() {
|
||||
return PageObjects.monitoring.tableGetRowsFromContainer(SUBJ_TABLE_CONTAINER);
|
||||
}
|
||||
async setFilter(text) {
|
||||
await PageObjects.monitoring.tableSetFilter(SUBJ_SEARCH_BAR, text);
|
||||
await this.waitForTableToFinishLoading();
|
||||
}
|
||||
|
||||
async clearFilter() {
|
||||
await PageObjects.monitoring.tableClearFilter(SUBJ_SEARCH_BAR);
|
||||
await this.waitForTableToFinishLoading();
|
||||
}
|
||||
|
||||
assertNoData() {
|
||||
return PageObjects.monitoring.assertTableNoData(SUBJ_TABLE_NO_DATA);
|
||||
}
|
||||
async waitForTableToFinishLoading() {
|
||||
await retry.try(async () => {
|
||||
await find.waitForDeletedByCssSelector('.euiBasicTable-loading', 5000);
|
||||
});
|
||||
}
|
||||
async getNodesAll() {
|
||||
const name = await testSubjects.getVisibleTextAll(SUBJ_NODE_NAME);
|
||||
const alertStatus = await testSubjects.getVisibleTextAll(SUBJ_NODE_ALERT_STATUS);
|
||||
const httpAddress = await testSubjects.getVisibleTextAll(SUBJ_NODE_IP);
|
||||
const cpuUsage = await testSubjects.getVisibleTextAll(SUBJ_NODE_CPU_USAGE);
|
||||
const loadAverage = await testSubjects.getVisibleTextAll(SUBJ_NODE_LOAD_AVERAGE);
|
||||
const jvmHeapUsed = await testSubjects.getVisibleTextAll(SUBJ_NODE_JVM_HEAP_USED);
|
||||
const eventsOut = await testSubjects.getVisibleTextAll(SUBJ_NODE_EVENTS_OUT);
|
||||
const configReloadsSuccess = await testSubjects.getVisibleTextAll(
|
||||
SUBJ_NODE_CONFIG_RELOADS_SUCCESS
|
||||
);
|
||||
const configReloadsFailure = await testSubjects.getVisibleTextAll(
|
||||
SUBJ_NODE_CONFIG_RELOADS_FAILURE
|
||||
);
|
||||
const version = await testSubjects.getVisibleTextAll(SUBJ_NODE_VERSION);
|
||||
|
||||
// tuple-ize the icons and texts together into an array of objects
|
||||
const tableRows = await this.getRows();
|
||||
const iterator = range(tableRows.length);
|
||||
return iterator.reduce((all, current) => {
|
||||
return [
|
||||
...all,
|
||||
{
|
||||
id: name[current],
|
||||
httpAddress: httpAddress[current],
|
||||
alertStatus: alertStatus[current],
|
||||
cpuUsage: cpuUsage[current],
|
||||
loadAverage: loadAverage[current],
|
||||
jvmHeapUsed: jvmHeapUsed[current],
|
||||
eventsOut: eventsOut[current],
|
||||
configReloadsSuccess: configReloadsSuccess[current],
|
||||
configReloadsFailure: configReloadsFailure[current],
|
||||
version: version[current],
|
||||
},
|
||||
];
|
||||
}, []);
|
||||
}
|
||||
})();
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export function MonitoringLogstashOverviewProvider({ getService }) {
|
||||
const testSubjects = getService('testSubjects');
|
||||
const retry = getService('retry');
|
||||
|
||||
const SUBJ_OVERVIEW_PAGE = 'logstashOverviewPage';
|
||||
|
||||
return new (class LogstashOverview {
|
||||
async isOnOverview() {
|
||||
const pageId = await retry.try(() => testSubjects.find(SUBJ_OVERVIEW_PAGE));
|
||||
return pageId !== null;
|
||||
}
|
||||
})();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue