[8.8] [Profling] Adding Elastic agent instructions (#158936) (#158949)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[Profling] Adding Elastic agent instructions
(#158936)](https://github.com/elastic/kibana/pull/158936)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Cauê
Marcondes","email":"55978943+cauemarcondes@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-06-02T16:13:29Z","message":"[Profling]
Adding Elastic agent instructions (#158936)\n\n<img width=\"1249\"
alt=\"Screenshot 2023-06-02 at 3 51 04
PM\"\r\nsrc=\"46f007ad-def6-42e7-930e-98d453d3a06d\">","sha":"1b3f23829c9a41d2995e279b37b04fc457befa6e","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","v8.9.0","v8.8.1"],"number":158936,"url":"https://github.com/elastic/kibana/pull/158936","mergeCommit":{"message":"[Profling]
Adding Elastic agent instructions (#158936)\n\n<img width=\"1249\"
alt=\"Screenshot 2023-06-02 at 3 51 04
PM\"\r\nsrc=\"46f007ad-def6-42e7-930e-98d453d3a06d\">","sha":"1b3f23829c9a41d2995e279b37b04fc457befa6e"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/158936","number":158936,"mergeCommit":{"message":"[Profling]
Adding Elastic agent instructions (#158936)\n\n<img width=\"1249\"
alt=\"Screenshot 2023-06-02 at 3 51 04
PM\"\r\nsrc=\"46f007ad-def6-42e7-930e-98d453d3a06d\">","sha":"1b3f23829c9a41d2995e279b37b04fc457befa6e"}},{"branch":"8.8","label":"v8.8.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Cauê Marcondes <55978943+cauemarcondes@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2023-06-02 14:00:15 -04:00 committed by GitHub
parent 17559fa778
commit b7064bd537
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,6 +5,7 @@
* 2.0.
*/
import {
EuiButton,
EuiCode,
EuiCodeBlock,
EuiFlexGroup,
@ -30,6 +31,7 @@ import { ProfilingAppPageTemplate } from './profiling_app_page_template';
export function NoDataPage({ subTitle }: { subTitle: string }) {
const {
services: { setupDataCollectionInstructions },
start: { core },
} = useProfilingDependencies();
const { data, status } = useAsync(
@ -347,6 +349,61 @@ docker.elastic.co/observability/profiling-agent:${hostAgentVersion} /root/pf-hos
},
],
},
{
key: 'elasticAgentIntegration',
title: i18n.translate('xpack.profiling.tabs.elasticAgentIntegrarion.title', {
defaultMessage: 'Elastic Agent Integration',
}),
steps: [
{
title: i18n.translate('xpack.profiling.tabs.elasticAgentIntegrarion.step1', {
defaultMessage: 'Copy credentials',
}),
content: (
<>
<EuiText>
{i18n.translate('xpack.profiling.tabs.elasticAgentIntegrarion.step1.hint', {
defaultMessage:
"You'll need these credentials to set up Universal Profiling. Please save them in a secure location, as they will be required in the subsequent step.",
})}
</EuiText>
<EuiSpacer />
<EuiCodeBlock paddingSize="s" isCopyable>
{i18n.translate('xpack.profiling.tabs.elasticAgentIntegrarion.step1.secretToken', {
defaultMessage: 'Secret token: {secretToken}',
values: { secretToken },
})}
</EuiCodeBlock>
<EuiSpacer size="s" />
<EuiCodeBlock paddingSize="s" isCopyable>
{i18n.translate('xpack.profiling.tabs.elasticAgentIntegrarion.step1.apmServerUrl', {
defaultMessage: 'APM server url: {apmServerUrl}',
values: { apmServerUrl: collectionAgentHostPort },
})}
</EuiCodeBlock>
</>
),
},
{
title: i18n.translate('xpack.profiling.tabs.elasticAgentIntegrarion.step2', {
defaultMessage: 'Fleet',
}),
content: (
<EuiButton
iconType="gear"
fill
href={`${core.http.basePath.prepend(
'/app/integrations/detail/profiler_agent-8.8.1-preview/overview'
)}`}
>
{i18n.translate('xpack.profiling.tabs.elasticAgentIntegrarion.step2.button', {
defaultMessage: 'Manage Universal Profiling agent in Fleet',
})}
</EuiButton>
),
},
],
},
];
const [selectedTab, setSelectedTab] = useState(tabs[0].key);