forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Observability Onboarding] Show existing data callout in Firehose flow (
elastic#203072) Closes elastic#190795 Adds the logic to display a message to the user in case there is already an existing Firehose data in their cluster and to show the identified AWS services in the "Visualize Data" step right away without waiting for the window to loose focus first. ![CleanShot 2024-12-05 at 11 50 59@2x](https://github.com/user-attachments/assets/00653bf0-f711-4029-9011-a34a160b4b9b) ## How to test 1. Open the Firehose flow 2. Make sure there is no callout and the third step is not active 3. Go to Kibana dev console and ingest some dummy data (see examples bellow) 4. Refresh the page with the Firehose flow 5. make sure there is a callout and the third steps shows the identified AWS service ``` POST logs-aws.apigateway_logs-default/_doc { "@timestamp": "2024-11-25T13:32:01.000Z", "some": 111, "aws.kinesis.name": "Elastic-CloudwatchLogs" } POST metrics-aws.apigateway_metrics-default/_doc { "@timestamp": "2024-11-25T13:31:01.000Z", "agent": { "type": "firehose" }, "aws": { "cloudwatch": { "namespace": "AWS/ApiGateway" }, "exporter": { "arn": "arn:aws:cloudwatch:us-west-2:975050175126:metric-stream/Elastic-CloudwatchLogsAndMetricsToFirehose-CloudWatchMetricStream-Nhb4NhzPdL4J" } }, "cloud": { "account": { "id": "975050175126" }, "provider": "aws", "region": "us-west-2" } } ``` (cherry picked from commit 6cb1430)
- Loading branch information
1 parent
4fa7135
commit c073210
Showing
5 changed files
with
122 additions
and
27 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
...ability_onboarding/public/application/quickstart_flows/firehose/existing_data_callout.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* 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 { EuiCallOut, useIsWithinMaxBreakpoint } from '@elastic/eui'; | ||
import { i18n } from '@kbn/i18n'; | ||
|
||
export function ExistingDataCallout() { | ||
const isMobile = useIsWithinMaxBreakpoint('s'); | ||
|
||
return ( | ||
<div css={{ maxWidth: isMobile ? '100%' : '80%' }}> | ||
<EuiCallOut | ||
title={i18n.translate('xpack.observability_onboarding.firehose.existingDataCallout.title', { | ||
defaultMessage: 'This workflow has been used before.', | ||
})} | ||
iconType="iInCircle" | ||
color="warning" | ||
data-test-subj="observabilityOnboardingFirehosePanelExistingDataCallout" | ||
> | ||
<p> | ||
{i18n.translate( | ||
'xpack.observability_onboarding.firehose.existingDataCallout.description', | ||
{ | ||
defaultMessage: `If the Amazon Firehose Data stream(s) associated with this workflow are still active, you will encounter errors during onboarding. Navigate to Step 3 below in order to explore your services.`, | ||
} | ||
)} | ||
</p> | ||
</EuiCallOut> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...y_onboarding/public/application/quickstart_flows/firehose/use_populated_aws_index_list.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* 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 { useFetcher } from '../../../hooks/use_fetcher'; | ||
import { | ||
FIREHOSE_CLOUDFORMATION_STACK_NAME, | ||
FIREHOSE_LOGS_STREAM_NAME, | ||
} from '../../../../common/aws_firehose'; | ||
|
||
export function usePopulatedAWSIndexList() { | ||
return useFetcher((callApi) => { | ||
return callApi('GET /internal/observability_onboarding/firehose/has-data', { | ||
params: { | ||
query: { | ||
logsStreamName: FIREHOSE_LOGS_STREAM_NAME, | ||
stackName: FIREHOSE_CLOUDFORMATION_STACK_NAME, | ||
}, | ||
}, | ||
}); | ||
}, []); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters