[Onboarding] Remove System Logs onboarding flow (#196132)

Closes https://github.com/elastic/kibana/issues/192815

Removes the legacy System Logs onboarding flow as it now has been
replaced by the Auto-Detect flow.
This commit is contained in:
Mykola Harmash 2024-10-17 14:41:10 +02:00 committed by GitHub
parent e92e0202b0
commit db574f4cd5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 20 additions and 1577 deletions

View file

@ -12,7 +12,9 @@ import { SerializableRecord } from '@kbn/utility-types';
export const OBSERVABILITY_ONBOARDING_LOCATOR = 'OBSERVABILITY_ONBOARDING_LOCATOR' as const;
export interface ObservabilityOnboardingLocatorParams extends SerializableRecord {
/** If given, it will load the given map else will load the create a new map page. */
source?: 'customLogs' | 'systemLogs';
/** If given, it will load the given onboarding flow
* else will load the main onboarding screen.
*/
source?: 'auto-detect' | 'customLogs' | 'kubernetes' | 'otel-logs' | 'firehose';
category?: string;
}

View file

@ -6,4 +6,3 @@
*/
export * from './custom_logs/generate_custom_logs_yml';
export * from './system_logs/generate_system_logs_yml';

View file

@ -1,48 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`generateSystemLogsYml should return system logs oriented yml configuration 1`] = `
"outputs:
default:
type: elasticsearch
hosts:
- http://localhost:9200
api_key: elastic:changeme
inputs:
- id: system-logs-8df0ff52-6f3b-4b5a-a2da-f06c55d111d1
type: logfile
data_stream:
namespace: default
streams:
- id: logfile-system.auth-8df0ff52-6f3b-4b5a-a2da-f06c55d111d1
data_stream:
dataset: system.auth
type: logs
paths:
- /var/log/auth.log*
- /var/log/secure*
exclude_files:
- .gz$
multiline:
pattern: ^s
match: after
tags:
- system-auth
processors:
- add_locale: null
- id: logfile-system.syslog-8df0ff52-6f3b-4b5a-a2da-f06c55d111d1
data_stream:
dataset: system.syslog
type: logs
paths:
- /var/log/messages*
- /var/log/syslog*
- /var/log/system*
exclude_files:
- .gz$
multiline:
pattern: ^s
match: after
processors:
- add_locale: null
"
`;

View file

@ -1,22 +0,0 @@
/*
* 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 { generateSystemLogsYml } from './generate_system_logs_yml';
const baseMockConfig = {
namespace: 'default',
apiKey: 'elastic:changeme',
esHost: ['http://localhost:9200'],
uuid: '8df0ff52-6f3b-4b5a-a2da-f06c55d111d1',
};
describe('generateSystemLogsYml', () => {
it('should return system logs oriented yml configuration', () => {
const result = generateSystemLogsYml(baseMockConfig);
expect(result).toMatchSnapshot();
});
});

View file

@ -1,105 +0,0 @@
/*
* 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 { dump } from 'js-yaml';
interface SystemLogsStream {
id: string;
data_stream: {
dataset: string;
type: string;
};
paths: string[];
exclude_files: string[];
multiline: {
pattern: string;
match: string;
};
tags?: string[];
processors: Array<{
add_locale: string | null;
}>;
}
export const generateSystemLogsYml = ({
namespace = 'default',
apiKey,
esHost,
uuid,
}: {
namespace?: string;
apiKey: string;
esHost: string[];
uuid: string;
}) => {
return dump({
outputs: {
default: {
type: 'elasticsearch',
hosts: esHost,
api_key: apiKey,
},
},
inputs: getSystemLogsInputs(uuid, namespace),
});
};
export const getSystemLogsInputs = (uuid: string, namespace: string = 'default') => {
return [
{
id: `system-logs-${uuid}`,
type: 'logfile',
data_stream: {
namespace,
},
streams: getSystemLogsDataStreams(uuid),
},
];
};
/*
* Utils
*/
export const getSystemLogsDataStreams = (uuid: string = ''): SystemLogsStream[] => [
{
id: `logfile-system.auth-${uuid}`,
data_stream: {
dataset: 'system.auth',
type: 'logs',
},
paths: ['/var/log/auth.log*', '/var/log/secure*'],
exclude_files: ['.gz$'],
multiline: {
pattern: '^s',
match: 'after',
},
tags: ['system-auth'],
processors: [
{
add_locale: null,
},
],
},
{
id: `logfile-system.syslog-${uuid}`,
data_stream: {
dataset: 'system.syslog',
type: 'logs',
},
paths: ['/var/log/messages*', '/var/log/syslog*', '/var/log/system*'],
exclude_files: ['.gz$'],
multiline: {
pattern: '^s',
match: 'after',
},
processors: [
{
add_locale: null,
},
],
},
];

View file

@ -12,11 +12,6 @@ describe.skip('[Logs onboarding] Give Feedback', () => {
cy.visitKibana('/app/observabilityOnboarding');
});
it('feedback button is present in system logs onboarding', () => {
cy.getByTestSubj('obltOnboardingHomeStartSystemLogStream').click();
cy.getByTestSubj('observabilityOnboardingPageGiveFeedback').should('exist');
});
it('feedback button is present in custom logs onboarding', () => {
cy.getByTestSubj('obltOnboardingHomeStartLogFileStream').click();
cy.getByTestSubj('observabilityOnboardingPageGiveFeedback').should('exist');

View file

@ -1,563 +0,0 @@
/*
* 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.
*/
// Failing 9.0 version update: https://github.com/elastic/kibana/issues/192624
describe.skip('[Logs onboarding] System logs', () => {
describe('System integration', () => {
beforeEach(() => {
cy.deleteIntegration('system');
});
describe('when user clicks on back button', () => {
beforeEach(() => {
cy.loginAsViewerUser();
cy.visitKibana('/app/observabilityOnboarding/systemLogs');
});
it('navigates to observability logs onboarding page', () => {
cy.getByTestSubj('observabilityOnboardingFlowBackToSelectionButton').click();
cy.url().should('include', '/app/observabilityOnboarding');
});
});
describe('when user is missing privileges', () => {
beforeEach(() => {
cy.loginAsViewerUser();
cy.visitKibana('/app/observabilityOnboarding/systemLogs');
});
it('installation fails', () => {
cy.getByTestSubj('obltOnboardingSystemLogsIntegrationInstallationFailed').should('exist');
});
});
describe('when user has proper privileges', () => {
beforeEach(() => {
cy.loginAsEditorUser();
cy.visitKibana('/app/observabilityOnboarding/systemLogs');
});
after(() => {
cy.deleteIntegration('system');
});
it('installation succeed', () => {
cy.getByTestSubj('obltOnboardingSystemLogsIntegrationInstalled').should('exist');
});
it('show link to navigate to system integration when clicking info icon', () => {
cy.getByTestSubj('obltOnboardingSystemLogsIntegrationInstalled').should('exist');
cy.getByTestSubj('obltOnboardingSystemLogsIntegrationInfo').should('exist').click();
cy.getByTestSubj('observabilityOnboardingSystemIntegrationLearnMore').should('exist');
});
});
});
describe('ApiKey generation', () => {
describe('when user is missing privileges', () => {
it('apiKey is not generated', () => {
cy.loginAsEditorUser();
cy.visitKibana('/app/observabilityOnboarding/systemLogs');
cy.getByTestSubj('obltOnboardingLogsApiKeyCreationNoPrivileges').should('exist');
});
});
describe('when user has proper privileges', () => {
beforeEach(() => {
cy.loginAsLogMonitoringUser();
cy.visitKibana('/app/observabilityOnboarding/systemLogs');
});
it('apiKey is generated', () => {
cy.getByTestSubj('obltOnboardingLogsApiKeyCreated').should('exist');
});
});
describe('when an error occurred on creation', () => {
before(() => {
cy.intercept('/internal/observability_onboarding/logs/flow', {
statusCode: 500,
body: {
message: 'Internal error',
},
});
cy.loginAsLogMonitoringUser();
cy.visitKibana('/app/observabilityOnboarding/systemLogs');
});
it('apiKey is not generated', () => {
cy.getByTestSubj('obltOnboardingLogsApiKeyCreationFailed').should('exist');
});
});
});
describe('Install the Elastic Agent step', () => {
beforeEach(() => {
cy.intercept('POST', '/internal/observability_onboarding/logs/flow').as(
'createOnboardingFlow'
);
cy.loginAsLogMonitoringUser();
cy.visitKibana('/app/observabilityOnboarding/systemLogs');
});
describe('When user select Linux OS', () => {
it('Auto download config to host is disabled by default', () => {
cy.get('.euiButtonGroup').contains('Linux').click();
cy.getByTestSubj('obltOnboardingInstallElasticAgentAutoDownloadConfig')
.should('be.enabled')
.should('not.be.checked');
});
it('Installation script is shown', () => {
cy.getByTestSubj('obltOnboardingInstallElasticAgentStep')
.get('.euiCodeBlock')
.should('exist');
});
});
describe('When user select Mac OS', () => {
beforeEach(() => {
cy.get('.euiButtonGroup').contains('MacOS').click();
});
it('Auto download config to host is disabled by default', () => {
cy.getByTestSubj('obltOnboardingInstallElasticAgentAutoDownloadConfig')
.should('be.enabled')
.should('not.be.checked');
});
it('Installation script is shown', () => {
cy.getByTestSubj('obltOnboardingInstallElasticAgentStep')
.get('.euiCodeBlock')
.should('exist');
});
});
describe('When user select Windows OS', () => {
beforeEach(() => {
cy.get('.euiButtonGroup').contains('Windows').click();
});
it('Auto download config to host is disabled by default', () => {
cy.getByTestSubj('obltOnboardingInstallElasticAgentAutoDownloadConfig')
.should('be.disabled')
.should('not.be.checked');
});
it('A link to the documentation is shown instead of installation script', () => {
cy.getByTestSubj('obltOnboardingInstallElasticAgentWindowsDocsLink').should('exist');
cy.getByTestSubj('obltOnboardingInstallElasticAgentStep')
.get('.euiCodeBlock')
.should('not.exist');
});
});
describe('When Auto download config', () => {
describe('is selected', () => {
it('autoDownloadConfig flag is added to installation script', () => {
cy.getByTestSubj('obltOnboardingInstallElasticAgentAutoDownloadConfig').click();
cy.getByTestSubj('obltOnboardingInstallElasticAgentAutoDownloadConfigCallout').should(
'exist'
);
cy.getByTestSubj('obltOnboardingInstallElasticAgentStep')
.get('.euiCodeBlock')
.should('contain', 'autoDownloadConfig=1');
});
it('Download config button is disabled', () => {
cy.getByTestSubj('obltOnboardingInstallElasticAgentAutoDownloadConfig').click();
cy.getByTestSubj('obltOnboardingConfigureElasticAgentStepDownloadConfig').should(
'be.disabled'
);
});
});
it('is not selected autoDownloadConfig flag is not added to installation script', () => {
cy.getByTestSubj('obltOnboardingInstallElasticAgentStep')
.get('.euiCodeBlock')
.should('not.contain', 'autoDownloadConfig=1');
});
});
describe('When user executes the installation script in the host', () => {
let onboardingId: string;
describe('updates on steps are shown in the flow', () => {
beforeEach(() => {
cy.wait('@createOnboardingFlow')
.its('response.body')
.then((body) => {
onboardingId = body.onboardingId;
});
});
describe('Download elastic Agent step', () => {
it('shows a loading callout when elastic agent is downloading', () => {
cy.updateInstallationStepStatus(onboardingId, 'ea-download', 'loading');
cy.getByTestSubj('obltOnboardingStepStatus-loading')
.contains('Downloading Elastic Agent')
.should('exist');
});
it('shows a success callout when elastic agent is downloaded', () => {
cy.updateInstallationStepStatus(onboardingId, 'ea-download', 'complete');
cy.getByTestSubj('obltOnboardingStepStatus-complete')
.contains('Elastic Agent downloaded')
.should('exist');
});
it('shows a danger callout when elastic agent was not downloaded', () => {
cy.updateInstallationStepStatus(onboardingId, 'ea-download', 'danger');
cy.getByTestSubj('obltOnboardingStepStatus-danger')
.contains('Download Elastic Agent')
.should('exist');
});
});
describe('Extract elastic Agent step', () => {
beforeEach(() => {
cy.updateInstallationStepStatus(onboardingId, 'ea-download', 'complete');
});
it('shows a loading callout when elastic agent is extracting', () => {
cy.updateInstallationStepStatus(onboardingId, 'ea-extract', 'loading');
cy.getByTestSubj('obltOnboardingStepStatus-loading')
.contains('Extracting Elastic Agent')
.should('exist');
});
it('shows a success callout when elastic agent is extracted', () => {
cy.updateInstallationStepStatus(onboardingId, 'ea-extract', 'complete');
cy.getByTestSubj('obltOnboardingStepStatus-complete')
.contains('Elastic Agent extracted')
.should('exist');
});
it('shows a danger callout when elastic agent was not extracted', () => {
cy.updateInstallationStepStatus(onboardingId, 'ea-extract', 'danger');
cy.getByTestSubj('obltOnboardingStepStatus-danger')
.contains('Extract Elastic Agent')
.should('exist');
});
});
describe('Install elastic Agent step', () => {
beforeEach(() => {
cy.updateInstallationStepStatus(onboardingId, 'ea-download', 'complete');
cy.updateInstallationStepStatus(onboardingId, 'ea-extract', 'complete');
});
it('shows a loading callout when elastic agent is installing', () => {
cy.updateInstallationStepStatus(onboardingId, 'ea-install', 'loading');
cy.getByTestSubj('obltOnboardingStepStatus-loading')
.contains('Installing Elastic Agent')
.should('exist');
});
it('shows a success callout when elastic agent is installed', () => {
cy.updateInstallationStepStatus(onboardingId, 'ea-install', 'complete');
cy.getByTestSubj('obltOnboardingStepStatus-complete')
.contains('Elastic Agent installed')
.should('exist');
});
it('shows a danger callout when elastic agent was not installed', () => {
cy.updateInstallationStepStatus(onboardingId, 'ea-install', 'danger');
cy.getByTestSubj('obltOnboardingStepStatus-danger')
.contains('Install Elastic Agent')
.should('exist');
});
});
describe('Check elastic Agent status step', () => {
beforeEach(() => {
cy.updateInstallationStepStatus(onboardingId, 'ea-download', 'complete');
cy.updateInstallationStepStatus(onboardingId, 'ea-extract', 'complete');
cy.updateInstallationStepStatus(onboardingId, 'ea-install', 'complete');
});
it('shows a loading callout when getting elastic agent status', () => {
cy.updateInstallationStepStatus(onboardingId, 'ea-status', 'loading');
cy.getByTestSubj('obltOnboardingStepStatus-loading')
.contains('Connecting to the Elastic Agent')
.should('exist');
});
it('shows a success callout when elastic agent status is healthy', () => {
cy.updateInstallationStepStatus(onboardingId, 'ea-status', 'complete', {
agentId: 'test-agent-id',
});
cy.getByTestSubj('obltOnboardingStepStatus-complete')
.contains('Connected to the Elastic Agent')
.should('exist');
});
it('shows a warning callout when elastic agent status is not healthy', () => {
cy.updateInstallationStepStatus(onboardingId, 'ea-status', 'warning');
cy.getByTestSubj('obltOnboardingStepStatus-warning')
.contains('Connect to the Elastic Agent')
.should('exist');
});
});
});
});
});
describe('Configure Elastic Agent step', () => {
let onboardingId: string;
beforeEach(() => {
cy.intercept('POST', '/internal/observability_onboarding/logs/flow').as(
'createOnboardingFlow'
);
cy.loginAsLogMonitoringUser();
cy.visitKibana('/app/observabilityOnboarding/systemLogs');
cy.wait('@createOnboardingFlow')
.its('response.body')
.then((body) => {
onboardingId = body.onboardingId;
});
});
describe('When user select Linux OS', () => {
beforeEach(() => {
cy.getByTestSubj('obltOnboardingInstallElasticAgentAutoDownloadConfig').click();
cy.updateInstallationStepStatus(onboardingId, 'ea-download', 'complete');
cy.updateInstallationStepStatus(onboardingId, 'ea-extract', 'complete');
cy.updateInstallationStepStatus(onboardingId, 'ea-install', 'complete');
cy.updateInstallationStepStatus(onboardingId, 'ea-status', 'complete', {
agentId: 'test-agent-id',
});
});
it('shows loading callout when config is being downloaded to the host', () => {
cy.updateInstallationStepStatus(onboardingId, 'ea-config', 'loading');
cy.get(
'[data-test-subj="obltOnboardingConfigureElasticAgentStep"] .euiStep__titleWrapper [class$="euiStepNumber-s-loading"]'
).should('exist');
cy.getByTestSubj('obltOnboardingStepStatus-loading')
.contains('Downloading Elastic Agent config')
.should('exist');
});
it('shows success callout when the configuration has been written to the host', () => {
cy.updateInstallationStepStatus(onboardingId, 'ea-config', 'complete');
cy.get(
'[data-test-subj="obltOnboardingConfigureElasticAgentStep"] .euiStep__titleWrapper [class$="euiStepNumber-s-complete"]'
).should('exist');
cy.getByTestSubj('obltOnboardingStepStatus-complete')
.contains('Elastic Agent config written to /opt/Elastic/Agent/elastic-agent.yml')
.should('exist');
});
it('shows warning callout when the configuration was not written in the host', () => {
cy.updateInstallationStepStatus(onboardingId, 'ea-config', 'warning');
cy.get(
'[data-test-subj="obltOnboardingConfigureElasticAgentStep"] .euiStep__titleWrapper [class$="euiStepNumber-s-warning"]'
).should('exist');
cy.getByTestSubj('obltOnboardingStepStatus-warning')
.contains('Configure the agent')
.should('exist');
});
});
describe('When user select Mac OS', () => {
beforeEach(() => {
cy.get('.euiButtonGroup').contains('MacOS').click();
cy.getByTestSubj('obltOnboardingInstallElasticAgentAutoDownloadConfig').click();
cy.updateInstallationStepStatus(onboardingId, 'ea-download', 'complete');
cy.updateInstallationStepStatus(onboardingId, 'ea-extract', 'complete');
cy.updateInstallationStepStatus(onboardingId, 'ea-install', 'complete');
cy.updateInstallationStepStatus(onboardingId, 'ea-status', 'complete', {
agentId: 'test-agent-id',
});
});
it('shows loading callout when config is being downloaded to the host', () => {
cy.updateInstallationStepStatus(onboardingId, 'ea-config', 'loading');
cy.get(
'[data-test-subj="obltOnboardingConfigureElasticAgentStep"] .euiStep__titleWrapper [class$="euiStepNumber-s-loading"]'
).should('exist');
cy.getByTestSubj('obltOnboardingStepStatus-loading')
.contains('Downloading Elastic Agent config')
.should('exist');
});
it('shows success callout when the configuration has been written to the host', () => {
cy.updateInstallationStepStatus(onboardingId, 'ea-config', 'complete');
cy.get(
'[data-test-subj="obltOnboardingConfigureElasticAgentStep"] .euiStep__titleWrapper [class$="euiStepNumber-s-complete"]'
).should('exist');
cy.getByTestSubj('obltOnboardingStepStatus-complete')
.contains('Elastic Agent config written to /Library/Elastic/Agent/elastic-agent.yml')
.should('exist');
});
it('shows warning callout when the configuration was not written in the host', () => {
cy.updateInstallationStepStatus(onboardingId, 'ea-config', 'warning');
cy.get(
'[data-test-subj="obltOnboardingConfigureElasticAgentStep"] .euiStep__titleWrapper [class$="euiStepNumber-s-warning"]'
).should('exist');
cy.getByTestSubj('obltOnboardingStepStatus-warning')
.contains('Configure the agent')
.should('exist');
});
});
describe('When user select Windows', () => {
beforeEach(() => {
cy.get('.euiButtonGroup').contains('Windows').click();
});
it('step is disabled', () => {
cy.get(
'[data-test-subj="obltOnboardingConfigureElasticAgentStep"] .euiStep__titleWrapper [class$="euiStepNumber-s-disabled"]'
).should('exist');
});
});
});
describe('Check logs step', () => {
let onboardingId: string;
beforeEach(() => {
cy.intercept('POST', '/internal/observability_onboarding/logs/flow').as(
'createOnboardingFlow'
);
cy.loginAsLogMonitoringUser();
cy.visitKibana('/app/observabilityOnboarding/systemLogs');
cy.wait('@createOnboardingFlow')
.its('response.body')
.then((body) => {
onboardingId = body.onboardingId;
});
});
describe('When user select Linux OS or MacOS', () => {
describe('When configure Elastic Agent step is not finished', () => {
beforeEach(() => {
cy.updateInstallationStepStatus(onboardingId, 'ea-download', 'complete');
cy.updateInstallationStepStatus(onboardingId, 'ea-extract', 'complete');
cy.updateInstallationStepStatus(onboardingId, 'ea-install', 'complete');
cy.updateInstallationStepStatus(onboardingId, 'ea-status', 'loading');
});
it('check logs is not triggered', () => {
cy.get(
'[data-test-subj="obltOnboardingCheckLogsStep"] .euiStep__titleWrapper [class$="euiStepNumber-s-incomplete"]'
).should('exist');
cy.get('.euiStep__title').contains('Ship logs to Elastic Observability').should('exist');
});
});
describe('When configure Elastic Agent step has finished', () => {
beforeEach(() => {
cy.updateInstallationStepStatus(onboardingId, 'ea-download', 'complete');
cy.updateInstallationStepStatus(onboardingId, 'ea-extract', 'complete');
cy.updateInstallationStepStatus(onboardingId, 'ea-install', 'complete');
cy.updateInstallationStepStatus(onboardingId, 'ea-status', 'complete', {
agentId: 'test-agent-id',
});
cy.updateInstallationStepStatus(onboardingId, 'ea-config', 'complete');
});
it('shows loading callout when logs are being checked', () => {
cy.get(
'[data-test-subj="obltOnboardingCheckLogsStep"] .euiStep__titleWrapper [class$="euiStepNumber-s-loading"]'
).should('exist');
cy.get('.euiStep__title').contains('Waiting for logs to be shipped...').should('exist');
});
});
});
describe('When user select Windows', () => {
beforeEach(() => {
cy.get('.euiButtonGroup').contains('Windows').click();
});
it('step is disabled', () => {
cy.get(
'[data-test-subj="obltOnboardingCheckLogsStep"] .euiStep__titleWrapper [class$="euiStepNumber-s-disabled"]'
).should('exist');
});
});
});
describe('When logs are being shipped', () => {
beforeEach(() => {
cy.intercept('GET', '**/progress', {
status: 200,
body: {
progress: {
'ea-download': { status: 'complete' },
'ea-extract': { status: 'complete' },
'ea-install': { status: 'complete' },
'ea-status': { status: 'complete' },
'ea-config': { status: 'complete' },
'logs-ingest': { status: 'complete' },
},
},
}).as('checkOnboardingProgress');
cy.intercept('GET', '/api/fleet/epm/packages/system').as('systemIntegrationInstall');
cy.loginAsLogMonitoringUser();
cy.visitKibana('/app/observabilityOnboarding/systemLogs');
});
it('shows success callout when logs has arrived to elastic', () => {
cy.wait('@checkOnboardingProgress');
cy.get(
'[data-test-subj="obltOnboardingCheckLogsStep"] .euiStep__titleWrapper [class$="euiStepNumber-s-complete"]'
).should('exist');
cy.get('.euiStep__title').contains('Logs are being shipped!').should('exist');
});
});
describe('Explore Logs', () => {
describe('when integration installation fails', () => {
beforeEach(() => {
cy.deleteIntegration('system');
cy.intercept('GET', '/api/fleet/epm/packages/system', {
statusCode: 500,
body: {
message: 'Internal error',
},
}).as('systemIntegrationInstall');
cy.loginAsLogMonitoringUser();
cy.visitKibana('/app/observabilityOnboarding/systemLogs');
});
it('when users clicks on Explore logs they navigate to logs explorer - All logs', () => {
cy.wait('@systemIntegrationInstall');
cy.getByTestSubj('obltOnboardingExploreLogs').should('exist').click();
cy.url().should('include', '/app/observability-logs-explorer');
cy.get('button').contains('All logs').should('exist');
});
});
describe('when integration installation succeed', () => {
beforeEach(() => {
cy.deleteIntegration('system');
cy.intercept('GET', '/api/fleet/epm/packages/system').as('systemIntegrationInstall');
cy.loginAsLogMonitoringUser();
cy.visitKibana('/app/observabilityOnboarding/systemLogs');
});
it('when users clicks on Explore logs they navigate to logs explorer and System integration is selected', () => {
cy.wait('@systemIntegrationInstall');
cy.getByTestSubj('obltOnboardingExploreLogs').should('exist').click();
cy.url().should('include', '/app/observability-logs-explorer');
cy.get('button').contains('[system] system.syslog').should('exist');
});
});
});
});

View file

@ -13,12 +13,6 @@ describe.skip('[Observability onboarding] Navigation', () => {
});
describe('When user clicks on the card', () => {
it('navigates to system logs onboarding', () => {
cy.getByTestSubj('obltOnboardingHomeStartSystemLogStream').click();
cy.url().should('include', '/app/observabilityOnboarding/systemLogs');
});
it('navigates to custom logs onboarding', () => {
cy.getByTestSubj('obltOnboardingHomeStartLogFileStream').click();

View file

@ -17,7 +17,6 @@ import {
LandingPage,
OtelLogsPage,
OtelKubernetesPage,
SystemLogsPage,
FirehosePage,
} from './pages';
import { ObservabilityOnboardingAppServices } from '..';
@ -42,9 +41,6 @@ export function ObservabilityOnboardingFlow() {
<Route path="/auto-detect">
<AutoDetectPage />
</Route>
<Route path="/systemLogs">
<SystemLogsPage />
</Route>
<Route path="/customLogs">
<CustomLogsPage />
</Route>

View file

@ -11,5 +11,4 @@ export { KubernetesPage } from './kubernetes';
export { OtelKubernetesPage } from './otel_kubernetes';
export { LandingPage } from './landing';
export { OtelLogsPage } from './otel_logs';
export { SystemLogsPage } from './system_logs';
export { FirehosePage } from './firehose';

View file

@ -1,18 +0,0 @@
/*
* 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 React from 'react';
import { PageTemplate } from './template';
import { SystemLogsPanel } from '../quickstart_flows/system_logs';
import { BackButton } from '../shared/back_button';
export const SystemLogsPage = () => (
<PageTemplate>
<BackButton />
<SystemLogsPanel />
</PageTemplate>
);

View file

@ -1,65 +0,0 @@
/*
* 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 React from 'react';
import { EuiPanel } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { Route } from '@kbn/shared-ux-router';
import { createWizardContext, Step } from '../../../context/create_wizard_context';
import { InstallElasticAgent } from './install_elastic_agent';
interface WizardState {
elasticAgentPlatform: 'linux-tar' | 'macos' | 'windows';
autoDownloadConfig: boolean;
apiKeyEncoded: string;
onboardingId: string;
}
const initialState: WizardState = {
elasticAgentPlatform: 'linux-tar',
autoDownloadConfig: false,
apiKeyEncoded: '',
onboardingId: '',
};
export type SystemLogsSteps = 'installElasticAgent';
const steps: Record<SystemLogsSteps, Step> = {
installElasticAgent: {
component: InstallElasticAgent,
title: i18n.translate('xpack.observability_onboarding.systemLogs.installShipper.title', {
defaultMessage: 'Install shipper to collect system logs',
}),
},
};
const {
Provider,
useWizard,
routes: systemLogsRoutes,
} = createWizardContext({
initialState,
initialStep: 'installElasticAgent',
steps,
basePath: '/systemLogs',
});
export { Provider, useWizard, systemLogsRoutes };
export const SystemLogsPanel: React.FC = () => {
return (
<Provider>
<EuiPanel hasBorder>
{Object.keys(systemLogsRoutes).map((key) => {
const path = key as keyof typeof systemLogsRoutes;
const { handler, exact } = systemLogsRoutes[path];
return <Route key={path} path={path} exact={exact} component={handler} />;
})}
</EuiPanel>
</Provider>
);
};

View file

@ -1,323 +0,0 @@
/*
* 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 { EuiButton, EuiHorizontalRule, EuiSpacer, EuiText } from '@elastic/eui';
import {
AllDatasetsLocatorParams,
ALL_DATASETS_LOCATOR_ID,
SingleDatasetLocatorParams,
SINGLE_DATASET_LOCATOR_ID,
} from '@kbn/deeplinks-observability/locators';
import { i18n } from '@kbn/i18n';
import { useKibana } from '@kbn/kibana-react-plugin/public';
import { default as React, useCallback, useEffect, useState } from 'react';
import { useWizard } from '.';
import { FETCH_STATUS, useFetcher } from '../../../hooks/use_fetcher';
import { ObservabilityOnboardingPluginSetupDeps } from '../../../plugin';
import {
ElasticAgentPlatform,
getElasticAgentSetupCommand,
} from '../shared/get_elastic_agent_setup_command';
import {
EuiStepStatus,
InstallElasticAgentSteps,
ProgressStepId,
} from '../shared/install_elastic_agent_steps';
import { StepModal } from '../shared/step_panel';
import { TroubleshootingLink } from '../shared/troubleshooting_link';
import { WindowsInstallStep } from '../shared/windows_install_step';
import { ApiKeyBanner } from '../custom_logs/api_key_banner';
import { SystemIntegrationBanner, SystemIntegrationBannerState } from './system_integration_banner';
import { useFlowProgressTelemetry } from '../../../hooks/use_flow_progress_telemetry';
export function InstallElasticAgent() {
const {
services: { share },
} = useKibana<ObservabilityOnboardingPluginSetupDeps>();
const singleDatasetLocator =
share.url.locators.get<SingleDatasetLocatorParams>(SINGLE_DATASET_LOCATOR_ID);
const allDataSetsLocator =
share.url.locators.get<AllDatasetsLocatorParams>(ALL_DATASETS_LOCATOR_ID);
const { getState, setState } = useWizard();
const wizardState = getState();
const [elasticAgentPlatform, setElasticAgentPlatform] =
useState<ElasticAgentPlatform>('linux-tar');
const [systemIntegrationStatus, setSystemIntegrationStatus] =
useState<SystemIntegrationBannerState>('pending');
const onIntegrationStatusChange = useCallback((status: SystemIntegrationBannerState) => {
setSystemIntegrationStatus(status);
}, []);
const datasetName = 'system-logs';
async function onContinue() {
if (systemIntegrationStatus === 'rejected') {
await allDataSetsLocator!.navigate({
origin: { id: 'application-log-onboarding' },
});
return;
}
await singleDatasetLocator!.navigate({
integration: 'system',
dataset: 'system.syslog',
origin: { id: 'application-log-onboarding' },
});
}
function onAutoDownloadConfig() {
setState((state) => ({
...state,
autoDownloadConfig: !state.autoDownloadConfig,
}));
}
const { data: monitoringRole, status: monitoringRoleStatus } = useFetcher((callApi) => {
return callApi('GET /internal/observability_onboarding/logs/setup/privileges');
}, []);
const { data: setup } = useFetcher((callApi) => {
return callApi('GET /internal/observability_onboarding/logs/setup/environment');
}, []);
const {
data: installShipperSetup,
status: installShipperSetupStatus,
error,
} = useFetcher(
(callApi) => {
if (monitoringRole?.hasPrivileges) {
return callApi('POST /internal/observability_onboarding/logs/flow', {
params: {
body: {
name: datasetName,
type: 'systemLogs',
},
},
});
}
},
[monitoringRole?.hasPrivileges]
);
const { apiKeyEncoded, onboardingId } = installShipperSetup ?? getState();
const successfullyInstalledShipperSetup = installShipperSetupStatus === FETCH_STATUS.SUCCESS;
const { data: yamlConfig = '', status: yamlConfigStatus } = useFetcher(
(callApi) => {
if (apiKeyEncoded && onboardingId) {
return callApi('GET /internal/observability_onboarding/elastic_agent/config', {
headers: { authorization: `ApiKey ${apiKeyEncoded}` },
params: { query: { onboardingId } },
});
}
},
// FIXME: Dario could not find a reasonable fix for successfullyInstalledShipperSetup
// eslint-disable-next-line react-hooks/exhaustive-deps
[apiKeyEncoded, onboardingId, successfullyInstalledShipperSetup]
);
useEffect(() => {
setState((state) => ({ ...state, onboardingId, apiKeyEncoded }));
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [onboardingId, apiKeyEncoded]);
const {
data: progressData,
status: progressStatus,
refetch: refetchProgress,
} = useFetcher(
(callApi) => {
if (onboardingId) {
return callApi('GET /internal/observability_onboarding/flow/{onboardingId}/progress', {
params: { path: { onboardingId } },
});
}
},
[onboardingId]
);
const progressSucceded = progressStatus === FETCH_STATUS.SUCCESS;
useEffect(() => {
if (progressSucceded) {
setTimeout(() => {
refetchProgress();
}, 2000);
}
}, [progressSucceded, refetchProgress]);
useFlowProgressTelemetry(progressData?.progress, 'system_logs');
const getCheckLogsStep = useCallback(() => {
const progress = progressData?.progress;
if (progress) {
const stepStatus = progress?.['logs-ingest']?.status as EuiStepStatus;
const title =
stepStatus === 'loading'
? CHECK_LOGS_LABELS.loading
: stepStatus === 'complete'
? CHECK_LOGS_LABELS.completed
: CHECK_LOGS_LABELS.incomplete;
return {
title,
status: stepStatus,
'data-test-subj': 'obltOnboardingCheckLogsStep',
};
}
return {
title: CHECK_LOGS_LABELS.incomplete,
status: 'incomplete' as const,
};
}, [progressData?.progress]);
const isInstallStarted = progressData?.progress['ea-download'] !== undefined;
const isInstallCompleted = progressData?.progress?.['ea-status']?.status === 'complete';
const autoDownloadConfigStatus = progressData?.progress?.['ea-config']?.status as EuiStepStatus;
return (
<StepModal
title={i18n.translate(
'xpack.observability_onboarding.installElasticAgent.stepPanel.collectSystemLogsLabel',
{ defaultMessage: 'Collect system logs' }
)}
panelFooter={[
<EuiButton
color="success"
fill
iconType="magnifyWithPlus"
onClick={onContinue}
data-test-subj="obltOnboardingExploreLogs"
disabled={systemIntegrationStatus === 'pending'}
>
{i18n.translate('xpack.observability_onboarding.steps.exploreLogs', {
defaultMessage: 'Explore logs',
})}
</EuiButton>,
]}
panelProps={{
hasBorder: false,
color: 'transparent',
paddingSize: 'none',
}}
>
<EuiText color="subdued">
<p>
{i18n.translate(
'xpack.observability_onboarding.systemLogs.installElasticAgent.description',
{
defaultMessage:
'To collect the data from your system and stream it to Elastic, you first need to install a shipping tool on the machine generating the logs. In this case, the shipping tool is an agent developed by Elastic.',
}
)}
</p>
</EuiText>
<EuiSpacer size="m" />
<SystemIntegrationBanner onStatusChange={onIntegrationStatusChange} />
<EuiSpacer size="m" />
{apiKeyEncoded && onboardingId ? (
<ApiKeyBanner
payload={{ apiKeyEncoded, onboardingId }}
hasPrivileges
status={FETCH_STATUS.SUCCESS}
/>
) : (
monitoringRoleStatus !== FETCH_STATUS.NOT_INITIATED &&
monitoringRoleStatus !== FETCH_STATUS.LOADING && (
<ApiKeyBanner
payload={installShipperSetup}
hasPrivileges={monitoringRole?.hasPrivileges}
status={installShipperSetupStatus}
error={error}
/>
)
)}
<EuiSpacer size="m" />
<InstallElasticAgentSteps
installAgentPlatformOptions={[
{
label: i18n.translate(
'xpack.observability_onboarding.installElasticAgent.installStep.choosePlatform.linux',
{ defaultMessage: 'Linux' }
),
id: 'linux-tar',
},
{
label: i18n.translate(
'xpack.observability_onboarding.installElasticAgent.installStep.choosePlatform.macOS',
{ defaultMessage: 'MacOS' }
),
id: 'macos',
},
{
label: i18n.translate(
'xpack.observability_onboarding.installElasticAgent.installStep.choosePlatform.windows',
{ defaultMessage: 'Windows' }
),
id: 'windows',
disableSteps: true,
children: (
<WindowsInstallStep docsLink="https://www.elastic.co/guide/en/welcome-to-elastic/current/getting-started-observability.html" />
),
},
]}
onSelectPlatform={(id) => setElasticAgentPlatform(id)}
selectedPlatform={elasticAgentPlatform}
installAgentCommand={getElasticAgentSetupCommand({
elasticAgentPlatform,
apiKeyEncoded,
apiEndpoint: setup?.apiEndpoint,
scriptDownloadUrl: setup?.scriptDownloadUrl,
elasticAgentVersion: setup?.elasticAgentVersion,
autoDownloadConfig: wizardState.autoDownloadConfig,
onboardingId,
})}
autoDownloadConfig={wizardState.autoDownloadConfig}
onToggleAutoDownloadConfig={onAutoDownloadConfig}
installAgentStatus={
installShipperSetupStatus === FETCH_STATUS.LOADING
? 'loading'
: isInstallCompleted
? 'complete'
: 'current'
}
showInstallProgressSteps={isInstallStarted}
installProgressSteps={
(progressData?.progress ?? {}) as Partial<
Record<ProgressStepId, { status: EuiStepStatus; message?: string }>
>
}
configureAgentStatus={
yamlConfigStatus === FETCH_STATUS.LOADING ? 'loading' : autoDownloadConfigStatus
}
configureAgentYaml={yamlConfig}
appendedSteps={[getCheckLogsStep()]}
/>
<EuiHorizontalRule />
<TroubleshootingLink />
</StepModal>
);
}
const CHECK_LOGS_LABELS = {
incomplete: i18n.translate(
'xpack.observability_onboarding.systemLogs.installElasticAgent.progress.logsIngest.incompleteTitle',
{ defaultMessage: 'Ship logs to Elastic Observability' }
),
loading: i18n.translate(
'xpack.observability_onboarding.systemLogs.installElasticAgent.progress.logsIngest.loadingTitle',
{ defaultMessage: 'Waiting for logs to be shipped...' }
),
completed: i18n.translate(
'xpack.observability_onboarding.systemLogs.installElasticAgent.progress.logsIngest.completedTitle',
{ defaultMessage: 'Logs are being shipped!' }
),
};

View file

@ -1,167 +0,0 @@
/*
* 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 { EuiCallOut, EuiFlexGroup, EuiFlexItem, EuiLink, EuiLoadingSpinner } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';
import React, { useCallback, useEffect, useState } from 'react';
import type { MouseEvent } from 'react';
import {
IntegrationInstallationError,
useInstallIntegrations,
} from '../../../hooks/use_install_integrations';
import { useKibanaNavigation } from '../../../hooks/use_kibana_navigation';
import { PopoverTooltip } from '../shared/popover_tooltip';
export type SystemIntegrationBannerState = 'pending' | 'resolved' | 'rejected';
export function SystemIntegrationBanner({
onStatusChange,
}: {
onStatusChange?: (status: SystemIntegrationBannerState) => void;
}) {
const { navigateToAppUrl } = useKibanaNavigation();
const [integrationVersion, setIntegrationVersion] = useState<string>();
const [error, setError] = useState<IntegrationInstallationError>();
const onIntegrationCreationSuccess = useCallback(
({ versions }: { versions?: string[] }) => {
setIntegrationVersion(versions?.[0]);
onStatusChange?.('resolved');
},
[onStatusChange]
);
const onIntegrationCreationFailure = useCallback(
(e: IntegrationInstallationError) => {
setError(e);
onStatusChange?.('rejected');
},
[onStatusChange]
);
const { performRequest, requestState } = useInstallIntegrations({
onIntegrationCreationSuccess,
onIntegrationCreationFailure,
});
useEffect(() => {
performRequest();
}, [performRequest]);
const isInstallingIntegration = requestState.state === 'pending';
const hasFailedInstallingIntegration = requestState.state === 'rejected';
const hasInstalledIntegration = requestState.state === 'resolved';
if (isInstallingIntegration) {
return (
<EuiCallOut
title={
<EuiFlexGroup alignItems="center" gutterSize="m">
<EuiFlexItem grow={false}>
<EuiLoadingSpinner size="m" />
</EuiFlexItem>
<EuiFlexItem>
{i18n.translate('xpack.observability_onboarding.systemIntegration.installing', {
defaultMessage: 'Installing system integration',
})}
</EuiFlexItem>
</EuiFlexGroup>
}
color="primary"
data-test-subj="obltOnboardingSystemLogsInstallingIntegration"
/>
);
}
if (hasFailedInstallingIntegration) {
return (
<EuiFlexItem>
<EuiCallOut
title={i18n.translate('xpack.observability_onboarding.systemIntegration.status.failed', {
defaultMessage: 'System integration installation failed',
})}
color="warning"
iconType="warning"
data-test-subj="obltOnboardingSystemLogsIntegrationInstallationFailed"
>
{error?.message}
</EuiCallOut>
</EuiFlexItem>
);
}
if (hasInstalledIntegration) {
return (
<EuiFlexItem>
<EuiCallOut
title={
<FormattedMessage
id="xpack.observability_onboarding.systemIntegration.installed"
defaultMessage="System integration installed. {systemIntegrationTooltip}"
values={{
systemIntegrationTooltip: (
<PopoverTooltip
dataTestSubj="obltOnboardingSystemLogsIntegrationInfo"
ariaLabel={i18n.translate(
'xpack.observability_onboarding.systemIntegration.installed.tooltip.label',
{
defaultMessage: 'Integration details',
}
)}
>
<EuiFlexGroup direction="column" gutterSize="xs">
<EuiFlexItem>
{i18n.translate(
'xpack.observability_onboarding.systemIntegration.installed.tooltip.description',
{
defaultMessage:
'Integrations streamline connecting your data to the Elastic Stack.',
}
)}
</EuiFlexItem>
<EuiFlexItem style={{ flexDirection: 'row', alignItems: 'center' }}>
<FormattedMessage
id="xpack.observability_onboarding.systemIntegration.installed.tooltip.link"
defaultMessage="{learnMoreLink} about the data you can collect using the Systems integration."
values={{
learnMoreLink: (
<EuiLink
data-test-subj="observabilityOnboardingSystemIntegrationLearnMore"
target="_blank"
style={{ marginRight: '3px' }}
onClick={(event: MouseEvent) => {
event.preventDefault();
navigateToAppUrl(
`/integrations/detail/system-${integrationVersion}`
);
}}
>
{i18n.translate(
'xpack.observability_onboarding.systemIntegration.installed.tooltip.link.label',
{
defaultMessage: 'Learn more',
}
)}
</EuiLink>
),
}}
/>
</EuiFlexItem>
</EuiFlexGroup>
</PopoverTooltip>
),
}}
/>
}
color="success"
iconType="check"
data-test-subj="obltOnboardingSystemLogsIntegrationInstalled"
/>
</EuiFlexItem>
);
}
return null;
}

View file

@ -27,14 +27,14 @@ describe('getLocation', () => {
it('should return the correct location with only source', () => {
const params: ObservabilityOnboardingLocatorParams = {
source: 'systemLogs',
source: 'auto-detect',
};
const result = getLocation(params);
expect(result).toEqual({
app: PLUGIN_ID,
path: '/systemLogs',
path: '/auto-detect',
state: {},
});
});

View file

@ -21,11 +21,11 @@ describe('Observability onboarding locator', () => {
test('should create a link to specified log source onboarding', async () => {
const locator = new ObservabilityOnboardingLocatorDefinition();
const systemLocation = await locator.getLocation({ source: 'systemLogs' });
const systemLocation = await locator.getLocation({ source: 'customLogs' });
expect(systemLocation).toMatchObject({
app: 'observabilityOnboarding',
path: '/systemLogs',
path: '/customLogs',
state: {},
});
});

View file

@ -7,7 +7,7 @@
import * as t from 'io-ts';
import { v4 as uuidv4 } from 'uuid';
import { generateSystemLogsYml, generateCustomLogsYml } from '../../../common/elastic_agent_logs';
import { generateCustomLogsYml } from '../../../common/elastic_agent_logs';
import { getAuthenticationAPIKey } from '../../lib/get_authentication_api_key';
import { getFallbackESUrl } from '../../lib/get_fallback_urls';
import { getObservabilityOnboardingFlow } from '../../lib/state';
@ -43,20 +43,12 @@ const generateConfig = createObservabilityOnboardingServerRoute({
savedObjectId: onboardingId,
});
const yaml =
savedState?.type === 'systemLogs'
? generateSystemLogsYml({
...savedState?.state,
apiKey: authApiKey ? `${authApiKey?.apiKeyId}:${authApiKey?.apiKey}` : '$API_KEY',
esHost: elasticsearchUrl,
uuid: uuidv4(),
})
: generateCustomLogsYml({
...savedState?.state,
apiKey: authApiKey ? `${authApiKey?.apiKeyId}:${authApiKey?.apiKey}` : '$API_KEY',
esHost: elasticsearchUrl,
logfileId: `custom-logs-${uuidv4()}`,
});
const yaml = generateCustomLogsYml({
...savedState?.state,
apiKey: authApiKey ? `${authApiKey?.apiKeyId}:${authApiKey?.apiKey}` : '$API_KEY',
esHost: elasticsearchUrl,
logfileId: `custom-logs-${uuidv4()}`,
});
return yaml;
},

View file

@ -95,7 +95,7 @@ const createFlowRoute = createObservabilityOnboardingServerRoute({
name: t.string,
}),
t.type({
type: t.union([t.literal('logFiles'), t.literal('systemLogs')]),
type: t.literal('logFiles'),
}),
t.partial({
state: t.record(t.string, t.unknown),
@ -120,14 +120,13 @@ const createFlowRoute = createObservabilityOnboardingServerRoute({
`standalone_agent_logs_onboarding_${name}`
);
const generatedState = type === 'systemLogs' ? { namespace: 'default' } : state;
const savedObjectsClient = coreStart.savedObjects.getScopedClient(request);
const { id } = await saveObservabilityOnboardingFlow({
savedObjectsClient,
observabilityOnboardingState: {
type,
state: generatedState as ObservabilityOnboardingFlow['state'],
state: state as ObservabilityOnboardingFlow['state'],
progress: {},
},
});

View file

@ -19,13 +19,9 @@ export interface LogFilesState {
namespace: string;
}
export interface SystemLogsState {
namespace: string;
}
type ObservabilityOnboardingFlowState = LogFilesState | undefined;
type ObservabilityOnboardingFlowState = LogFilesState | SystemLogsState | undefined;
type ObservabilityOnboardingType = 'logFiles' | 'systemLogs' | 'autoDetect' | 'kubernetes';
type ObservabilityOnboardingType = 'logFiles' | 'autoDetect' | 'kubernetes';
export interface ObservabilityOnboardingFlow {
type: ObservabilityOnboardingType;

View file

@ -32016,7 +32016,6 @@
"xpack.observability_onboarding.installElasticAgent.progress.logsIngest.completedTitle": "Les logs sont en cours de transfert.",
"xpack.observability_onboarding.installElasticAgent.progress.logsIngest.incompleteTitle": "Transfert des logs dans Elastic Observability",
"xpack.observability_onboarding.installElasticAgent.progress.logsIngest.loadingTitle": "En attente du transfert des logs…",
"xpack.observability_onboarding.installElasticAgent.stepPanel.collectSystemLogsLabel": "Collecter des logs système",
"xpack.observability_onboarding.installElasticAgent.troubleshooting": "Résolution des problèmes",
"xpack.observability_onboarding.installIntegration.error.unauthorized": "Le privilège Kibana {requiredKibanaPrivileges} requis est manquant. Veuillez ajouter le privilège requis au rôle de l'utilisateur authentifié.",
"xpack.observability_onboarding.installOtelCollector.configStep.copyCommand": "Copier dans le presse-papiers",
@ -32044,18 +32043,6 @@
"xpack.observability_onboarding.packageList.uploadFileDescription": "Téléchargez les données d'un fichier CSV, TSV, JSON ou autre fichier log vers Elasticsearch pour analyse.",
"xpack.observability_onboarding.packageList.uploadFileTitle": "Charger un fichier",
"xpack.observability_onboarding.steps.exploreLogs": "Explorer les logs",
"xpack.observability_onboarding.systemIntegration.installed": "Intégration du système installée. {systemIntegrationTooltip}",
"xpack.observability_onboarding.systemIntegration.installed.tooltip.description": "Les intégrations rationalisent la connexion de vos donnés avec la Suite Elastic.",
"xpack.observability_onboarding.systemIntegration.installed.tooltip.label": "Détails de l'intégration",
"xpack.observability_onboarding.systemIntegration.installed.tooltip.link": "{learnMoreLink} sur les données que vous pouvez collecter à l'aide de l'intégration des systèmes.",
"xpack.observability_onboarding.systemIntegration.installed.tooltip.link.label": "En savoir plus",
"xpack.observability_onboarding.systemIntegration.installing": "Installation de l'intégration des systèmes",
"xpack.observability_onboarding.systemIntegration.status.failed": "Échec de l'installation de l'intégration des systèmes",
"xpack.observability_onboarding.systemLogs.installElasticAgent.description": "Pour collecter les données depuis votre système et les intégrer à Elastic, vous devez d'abord installer un outil de transfert sur la machine qui génère les logs. Dans ce cas, l'outil de transfert est un agent développé par Elastic.",
"xpack.observability_onboarding.systemLogs.installElasticAgent.progress.logsIngest.completedTitle": "Les logs sont en cours de transfert.",
"xpack.observability_onboarding.systemLogs.installElasticAgent.progress.logsIngest.incompleteTitle": "Transfert des logs dans Elastic Observability",
"xpack.observability_onboarding.systemLogs.installElasticAgent.progress.logsIngest.loadingTitle": "En attente du transfert des logs…",
"xpack.observability_onboarding.systemLogs.installShipper.title": "Installer l'agent de transfert pour collecter les logs système",
"xpack.observability_onboarding.windows.installStep.description": "Cette intégration n'est actuellement disponible que sur les systèmes Linux et MacOS. Consultez notre documentation pour en savoir plus sur la diffusion de fichiers de log vers Elastic depuis un système Windows.",
"xpack.observability_onboarding.windows.installStep.link.label": "Lire la documentation",
"xpack.observability..customThreshold.rule.alertFlyout.aggregationText.rate": "Taux",

View file

@ -31761,7 +31761,6 @@
"xpack.observability_onboarding.installElasticAgent.progress.logsIngest.completedTitle": "ログを送信中です。",
"xpack.observability_onboarding.installElasticAgent.progress.logsIngest.incompleteTitle": "Elasticオブザーバビリティにログを送信",
"xpack.observability_onboarding.installElasticAgent.progress.logsIngest.loadingTitle": "ログの送信を待機中...",
"xpack.observability_onboarding.installElasticAgent.stepPanel.collectSystemLogsLabel": "システムログを収集",
"xpack.observability_onboarding.installElasticAgent.troubleshooting": "トラブルシューティング",
"xpack.observability_onboarding.installIntegration.error.unauthorized": "必要なkibana権限{requiredKibanaPrivileges}がありません。認証されたユーザーのロールに必要な権限を追加してください。",
"xpack.observability_onboarding.installOtelCollector.configStep.copyCommand": "クリップボードにコピー",
@ -31789,18 +31788,6 @@
"xpack.observability_onboarding.packageList.uploadFileDescription": "分析するため、CSV、TSV、JSON、他のログファイルからElasticsearchにアップロードします。",
"xpack.observability_onboarding.packageList.uploadFileTitle": "ファイルをアップロード",
"xpack.observability_onboarding.steps.exploreLogs": "ログを探索",
"xpack.observability_onboarding.systemIntegration.installed": "システム統合がインストールされました。{systemIntegrationTooltip}",
"xpack.observability_onboarding.systemIntegration.installed.tooltip.description": "統合により、Elastic Stackへのデータ接続が効率化されます。",
"xpack.observability_onboarding.systemIntegration.installed.tooltip.label": "統合の詳細",
"xpack.observability_onboarding.systemIntegration.installed.tooltip.link": "システム統合を使用して収集できるデータについて{learnMoreLink}。",
"xpack.observability_onboarding.systemIntegration.installed.tooltip.link.label": "詳細",
"xpack.observability_onboarding.systemIntegration.installing": "システム統合をインストール中",
"xpack.observability_onboarding.systemIntegration.status.failed": "システム統合のインストールに失敗しました",
"xpack.observability_onboarding.systemLogs.installElasticAgent.description": "システムからデータを収集してElasticにストリーミングするには、まずログを生成するコンピューターでシッピングツールをインストールする必要があります。この場合、シッピングツールはElasticが開発したエージェントです。",
"xpack.observability_onboarding.systemLogs.installElasticAgent.progress.logsIngest.completedTitle": "ログを送信中です。",
"xpack.observability_onboarding.systemLogs.installElasticAgent.progress.logsIngest.incompleteTitle": "Elasticオブザーバビリティにログを送信",
"xpack.observability_onboarding.systemLogs.installElasticAgent.progress.logsIngest.loadingTitle": "ログの送信を待機中...",
"xpack.observability_onboarding.systemLogs.installShipper.title": "システムログを収集するためのシッパーをインストール",
"xpack.observability_onboarding.windows.installStep.description": "現在、このオンボーディングはLinuxとMacOSシステムでのみ利用可能です。WindowsシステムからElasticにログファイルをストリーミングする方法については、当社のドキュメントをご覧ください。",
"xpack.observability_onboarding.windows.installStep.link.label": "ドキュメントを読む",
"xpack.observability..customThreshold.rule.alertFlyout.aggregationText.rate": "レート",

View file

@ -31803,7 +31803,6 @@
"xpack.observability_onboarding.installElasticAgent.progress.logsIngest.completedTitle": "正在传输日志!",
"xpack.observability_onboarding.installElasticAgent.progress.logsIngest.incompleteTitle": "传输日志到 Elastic Observability",
"xpack.observability_onboarding.installElasticAgent.progress.logsIngest.loadingTitle": "等待传输日志......",
"xpack.observability_onboarding.installElasticAgent.stepPanel.collectSystemLogsLabel": "收集系统日志",
"xpack.observability_onboarding.installElasticAgent.troubleshooting": "故障排除",
"xpack.observability_onboarding.installIntegration.error.unauthorized": "缺失所需的 Kibana 权限 {requiredKibanaPrivileges},请将所需权限添加到已通过身份验证的用户的角色。",
"xpack.observability_onboarding.installOtelCollector.configStep.copyCommand": "复制到剪贴板",
@ -31831,18 +31830,6 @@
"xpack.observability_onboarding.packageList.uploadFileDescription": "从 CSV、TSV、JSON 或其他日志文件上传数据到 Elasticsearch 以进行分析。",
"xpack.observability_onboarding.packageList.uploadFileTitle": "上传文件",
"xpack.observability_onboarding.steps.exploreLogs": "浏览日志",
"xpack.observability_onboarding.systemIntegration.installed": "已安装系统集成。{systemIntegrationTooltip}",
"xpack.observability_onboarding.systemIntegration.installed.tooltip.description": "集成会精简将您的数据连接到 Elastic Stack 的过程。",
"xpack.observability_onboarding.systemIntegration.installed.tooltip.label": "集成详情",
"xpack.observability_onboarding.systemIntegration.installed.tooltip.link": "使用系统集成{learnMoreLink}有关您可收集的数据的信息。",
"xpack.observability_onboarding.systemIntegration.installed.tooltip.link.label": "了解详情",
"xpack.observability_onboarding.systemIntegration.installing": "正在安装系统集成",
"xpack.observability_onboarding.systemIntegration.status.failed": "安装系统集成失败",
"xpack.observability_onboarding.systemLogs.installElasticAgent.description": "要从您的系统收集数据并将其流式传输到 Elastic您首先需要在生成日志的机器上安装传输工具。在此情况下传输工具为由 Elastic 开发的代理。",
"xpack.observability_onboarding.systemLogs.installElasticAgent.progress.logsIngest.completedTitle": "正在传输日志!",
"xpack.observability_onboarding.systemLogs.installElasticAgent.progress.logsIngest.incompleteTitle": "传输日志到 Elastic Observability",
"xpack.observability_onboarding.systemLogs.installElasticAgent.progress.logsIngest.loadingTitle": "等待传输日志......",
"xpack.observability_onboarding.systemLogs.installShipper.title": "安装采集器以收集系统日志",
"xpack.observability_onboarding.windows.installStep.description": "此载入当前仅可用于 Linux 和 MacOS 系统。请参阅我们的文档了解有关将日志文件从 Windows 系统流式传输到 Elastic 的信息。",
"xpack.observability_onboarding.windows.installStep.link.label": "阅读文档",
"xpack.observability..customThreshold.rule.alertFlyout.aggregationText.rate": "比率",

View file

@ -84,36 +84,6 @@ export default function ApiTest({ getService }: FtrProviderContext) {
);
});
});
describe('and onboarding type is systemLogs', () => {
before(async () => {
const req = await observabilityOnboardingApiClient.logMonitoringUser({
endpoint: 'POST /internal/observability_onboarding/logs/flow',
params: {
body: {
type: 'systemLogs',
name: 'name',
},
},
});
onboardingId = req.body.onboardingId;
});
it('should return input properties configured', async () => {
const req = await callApi({
onboardingId,
});
expect(req.status).to.be(200);
const ymlConfig = load(req.text);
expect(ymlConfig.inputs[0].data_stream.namespace).to.be('default');
expect(ymlConfig.inputs[0].streams.length).to.be(2);
expect(ymlConfig.inputs[0].streams[0].data_stream.dataset).to.be('system.auth');
expect(ymlConfig.inputs[0].streams[1].data_stream.dataset).to.be('system.syslog');
});
});
});
});
}

View file

@ -176,73 +176,6 @@ export default function ApiTest({ getService }: FtrProviderContext) {
await synthtrace.clean();
});
});
describe('and onboarding type is systemLogs', () => {
let systemLogsOnboardingId: string;
before(async () => {
const req = await observabilityOnboardingApiClient.logMonitoringUser({
endpoint: 'POST /internal/observability_onboarding/logs/flow',
params: {
body: {
type: 'systemLogs',
name: 'name',
},
},
});
systemLogsOnboardingId = req.body.onboardingId;
await observabilityOnboardingApiClient.logMonitoringUser({
endpoint: 'POST /internal/observability_onboarding/flow/{id}/step/{name}',
params: {
path: {
id: systemLogsOnboardingId,
name: 'ea-status',
},
body: {
status: 'complete',
payload: {
agentId,
},
},
},
});
await synthtrace.index([
timerange('2023-11-20T10:00:00.000Z', '2023-11-20T10:01:00.000Z')
.interval('1m')
.rate(1)
.generator((timestamp) =>
log
.create()
.message('This is a system log message')
.timestamp(timestamp)
.dataset('system.syslog')
.namespace(namespace)
.defaults({
'agent.id': 'another-agent-id',
'log.file.path': '/var/log/system.log',
})
),
]);
});
it('should return log-ingest as incomplete', async () => {
const request = await callApi({
onboardingId: systemLogsOnboardingId,
});
expect(request.status).to.be(200);
const logsIngestProgress = request.body.progress['logs-ingest'];
expect(logsIngestProgress).to.have.property('status', 'loading');
});
after(async () => {
await synthtrace.clean();
});
});
});
describe('with the expected agentId', () => {
@ -283,73 +216,6 @@ export default function ApiTest({ getService }: FtrProviderContext) {
await synthtrace.clean();
});
});
describe('and onboarding type is systemLogs', () => {
let systemLogsOnboardingId: string;
before(async () => {
const req = await observabilityOnboardingApiClient.logMonitoringUser({
endpoint: 'POST /internal/observability_onboarding/logs/flow',
params: {
body: {
type: 'systemLogs',
name: 'name',
},
},
});
systemLogsOnboardingId = req.body.onboardingId;
await observabilityOnboardingApiClient.logMonitoringUser({
endpoint: 'POST /internal/observability_onboarding/flow/{id}/step/{name}',
params: {
path: {
id: systemLogsOnboardingId,
name: 'ea-status',
},
body: {
status: 'complete',
payload: {
agentId,
},
},
},
});
await synthtrace.index([
timerange('2023-11-20T10:00:00.000Z', '2023-11-20T10:01:00.000Z')
.interval('1m')
.rate(1)
.generator((timestamp) =>
log
.create()
.message('This is a system log message')
.timestamp(timestamp)
.dataset('system.syslog')
.namespace(namespace)
.defaults({
'agent.id': agentId,
'log.file.path': '/var/log/system.log',
})
),
]);
});
it('should return log-ingest as complete', async () => {
const request = await callApi({
onboardingId: systemLogsOnboardingId,
});
expect(request.status).to.be(200);
const logsIngestProgress = request.body.progress['logs-ingest'];
expect(logsIngestProgress).to.have.property('status', 'complete');
});
after(async () => {
await synthtrace.clean();
});
});
});
});
});

View file

@ -29,7 +29,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
});
}
async function callApiWithPrivileges(type: 'logFiles' | 'systemLogs', state = {}) {
async function callApiWithPrivileges(type: 'logFiles', state = {}) {
return await observabilityOnboardingApiClient.logMonitoringUser({
endpoint: 'POST /internal/observability_onboarding/logs/flow',
params: {
@ -87,21 +87,6 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expect(savedState.attributes).to.be.eql({ type: 'logFiles', state, progress: {} });
});
it('saves the expected state for systemLogs', async () => {
const state = {
namespace: 'default',
};
const request = await callApiWithPrivileges('systemLogs');
const savedState = await kibanaServer.savedObjects.get({
type: OBSERVABILITY_ONBOARDING_STATE_SAVED_OBJECT_TYPE,
id: request.body.onboardingId,
});
expect(savedState.attributes).to.be.eql({ type: 'systemLogs', state, progress: {} });
});
});
});
}