mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
Profiling: amend Add Data page instructions with stack release versions (#163884)
## Summary * amend the "Add Data" page to use artifacts download URLs from the official channels * fetch and propagate stack version of Kibana in the instructions, to bind stack version on the agent * minor correction to the package titles to display nicer names in Fleet agent page ### Checklist Delete any items that are not applicable to this PR. - [X] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [X] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [X] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [X] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [X] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### For maintainers - [X] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Signed-off-by: inge4pres <francesco.gualazzi@elastic.co> Co-authored-by: Cauê Hironimuz Marcondes <caue.marcondes@elastic.co>
This commit is contained in:
parent
4c1428377a
commit
53d2275c9e
13 changed files with 98 additions and 91 deletions
|
@ -21,7 +21,7 @@ import { useHistory } from 'react-router-dom';
|
|||
import { AsyncStatus, useAsync } from '../hooks/use_async';
|
||||
import { useAutoAbortedHttpClient } from '../hooks/use_auto_aborted_http_client';
|
||||
import { useProfilingRouter } from '../hooks/use_profiling_router';
|
||||
import { NoDataTabs } from '../views/no_data_view';
|
||||
import { AddDataTabs } from '../views/add_data_view';
|
||||
import { useLicenseContext } from './contexts/license/use_license_context';
|
||||
import { useProfilingDependencies } from './contexts/profiling_dependencies/use_profiling_dependencies';
|
||||
import { LicensePrompt } from './license_prompt';
|
||||
|
@ -209,7 +209,7 @@ export function CheckSetup({ children }: { children: React.ReactElement }) {
|
|||
// when there's no data redirect the user to the add data instructions page
|
||||
router.push('/add-data-instructions', {
|
||||
path: {},
|
||||
query: { selectedTab: NoDataTabs.Kubernetes },
|
||||
query: { selectedTab: AddDataTabs.Kubernetes },
|
||||
});
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ import { FrameType, getLanguageType } from '../../../common/profiling';
|
|||
import { PROFILING_FEEDBACK_LINK } from '../profiling_app_page_template';
|
||||
import { useProfilingDependencies } from '../contexts/profiling_dependencies/use_profiling_dependencies';
|
||||
import { useProfilingRouter } from '../../hooks/use_profiling_router';
|
||||
import { NoDataTabs } from '../../views/no_data_view';
|
||||
import { AddDataTabs } from '../../views/add_data_view';
|
||||
|
||||
interface Props {
|
||||
frameType: FrameType;
|
||||
|
@ -55,7 +55,7 @@ export function MissingSymbolsCallout({ frameType }: Props) {
|
|||
</p>
|
||||
<EuiButton
|
||||
href={router.link('/add-data-instructions', {
|
||||
query: { selectedTab: NoDataTabs.Symbols },
|
||||
query: { selectedTab: AddDataTabs.Symbols },
|
||||
})}
|
||||
color="warning"
|
||||
>
|
||||
|
|
|
@ -12,7 +12,7 @@ import { useHistory } from 'react-router-dom';
|
|||
import url from 'url';
|
||||
import { ObservabilityAIAssistantActionMenuItem } from '@kbn/observability-ai-assistant-plugin/public';
|
||||
import { useProfilingRouter } from '../hooks/use_profiling_router';
|
||||
import { NoDataTabs } from '../views/no_data_view';
|
||||
import { AddDataTabs } from '../views/add_data_view';
|
||||
|
||||
export function ProfilingHeaderActionMenu() {
|
||||
const router = useProfilingRouter();
|
||||
|
@ -48,7 +48,7 @@ export function ProfilingHeaderActionMenu() {
|
|||
</EuiHeaderLink>
|
||||
<EuiHeaderLink
|
||||
href={router.link('/add-data-instructions', {
|
||||
query: { selectedTab: NoDataTabs.Kubernetes },
|
||||
query: { selectedTab: AddDataTabs.Kubernetes },
|
||||
})}
|
||||
color="primary"
|
||||
>
|
||||
|
|
|
@ -23,7 +23,7 @@ import { FlameGraphView } from '../views/flamegraphs/flamegraph';
|
|||
import { FunctionsView } from '../views/functions';
|
||||
import { DifferentialTopNFunctionsView } from '../views/functions/differential_topn';
|
||||
import { TopNFunctionsView } from '../views/functions/topn';
|
||||
import { NoDataTabs, NoDataView } from '../views/no_data_view';
|
||||
import { AddDataTabs, AddDataView } from '../views/add_data_view';
|
||||
import { StackTracesView } from '../views/stack_traces_view';
|
||||
import { StorageExplorerView } from '../views/storage_explorer';
|
||||
import { RouteBreadcrumb } from './route_breadcrumb';
|
||||
|
@ -42,23 +42,23 @@ const routes = {
|
|||
),
|
||||
children: {
|
||||
'/add-data-instructions': {
|
||||
element: <NoDataView />,
|
||||
element: <AddDataView />,
|
||||
params: t.type({
|
||||
query: t.type({
|
||||
selectedTab: t.union([
|
||||
t.literal(NoDataTabs.Binary),
|
||||
t.literal(NoDataTabs.Deb),
|
||||
t.literal(NoDataTabs.Docker),
|
||||
t.literal(NoDataTabs.ElasticAgentIntegration),
|
||||
t.literal(NoDataTabs.Kubernetes),
|
||||
t.literal(NoDataTabs.RPM),
|
||||
t.literal(NoDataTabs.Symbols),
|
||||
t.literal(AddDataTabs.Binary),
|
||||
t.literal(AddDataTabs.Deb),
|
||||
t.literal(AddDataTabs.Docker),
|
||||
t.literal(AddDataTabs.ElasticAgentIntegration),
|
||||
t.literal(AddDataTabs.Kubernetes),
|
||||
t.literal(AddDataTabs.RPM),
|
||||
t.literal(AddDataTabs.Symbols),
|
||||
]),
|
||||
}),
|
||||
}),
|
||||
defaults: {
|
||||
query: {
|
||||
selectedTab: NoDataTabs.Kubernetes,
|
||||
selectedTab: AddDataTabs.Kubernetes,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -25,6 +25,7 @@ import {
|
|||
EuiText,
|
||||
} from '@elastic/eui';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import major from 'semver/functions/major';
|
||||
import { useProfilingParams } from '../../hooks/use_profiling_params';
|
||||
import { useProfilingRouter } from '../../hooks/use_profiling_router';
|
||||
import { useProfilingRoutePath } from '../../hooks/use_profiling_route_path';
|
||||
|
@ -32,7 +33,7 @@ import { AsyncStatus, useAsync } from '../../hooks/use_async';
|
|||
import { useProfilingDependencies } from '../../components/contexts/profiling_dependencies/use_profiling_dependencies';
|
||||
import { ProfilingAppPageTemplate } from '../../components/profiling_app_page_template';
|
||||
|
||||
export enum NoDataTabs {
|
||||
export enum AddDataTabs {
|
||||
Kubernetes = 'kubernetes',
|
||||
Docker = 'docker',
|
||||
Binary = 'binary',
|
||||
|
@ -42,7 +43,7 @@ export enum NoDataTabs {
|
|||
Symbols = 'symbols',
|
||||
}
|
||||
|
||||
export function NoDataView() {
|
||||
export function AddDataView() {
|
||||
const { query } = useProfilingParams('/add-data-instructions');
|
||||
const { selectedTab } = query;
|
||||
const profilingRouter = useProfilingRouter();
|
||||
|
@ -63,11 +64,12 @@ export function NoDataView() {
|
|||
const secretToken = data?.collector?.secretToken;
|
||||
const collectionAgentHost = data?.collector?.host;
|
||||
const symbolUrl = data?.symbolizer?.host;
|
||||
const hostAgentVersion = 'v3';
|
||||
const stackVersion = data?.stackVersion!;
|
||||
const majorVersion = stackVersion ? major(stackVersion).toString() : undefined;
|
||||
|
||||
const tabs = [
|
||||
{
|
||||
key: NoDataTabs.Kubernetes,
|
||||
key: AddDataTabs.Kubernetes,
|
||||
title: i18n.translate('xpack.profiling.tabs.kubernetesTitle', {
|
||||
defaultMessage: 'Kubernetes',
|
||||
}),
|
||||
|
@ -78,7 +80,7 @@ export function NoDataView() {
|
|||
}),
|
||||
content: (
|
||||
<EuiCodeBlock paddingSize="s" isCopyable>
|
||||
helm repo add optimyze https://optimyze.cloud/helm-charts
|
||||
helm repo add elastic https://helm.elastic.co
|
||||
</EuiCodeBlock>
|
||||
),
|
||||
},
|
||||
|
@ -91,8 +93,9 @@ export function NoDataView() {
|
|||
{`helm install --create-namespace -n=universal-profiling universal-profiling-agent \\
|
||||
--set "projectID=1,secretToken=${secretToken}" \\
|
||||
--set "collectionAgentHostPort=${collectionAgentHost}" \\
|
||||
--set "version=${hostAgentVersion}" \\
|
||||
optimyze/pf-host-agent`}
|
||||
--set "version=${stackVersion}" \\
|
||||
--version=${stackVersion} \\
|
||||
elastic/pf-host-agent`}
|
||||
</EuiCodeBlock>
|
||||
),
|
||||
},
|
||||
|
@ -116,7 +119,7 @@ optimyze/pf-host-agent`}
|
|||
],
|
||||
},
|
||||
{
|
||||
key: NoDataTabs.Docker,
|
||||
key: AddDataTabs.Docker,
|
||||
title: i18n.translate('xpack.profiling.tabs.dockerTitle', {
|
||||
defaultMessage: 'Docker',
|
||||
}),
|
||||
|
@ -127,9 +130,9 @@ optimyze/pf-host-agent`}
|
|||
}),
|
||||
content: (
|
||||
<EuiCodeBlock paddingSize="s" isCopyable>
|
||||
{`docker run --name host-agent --privileged --pid=host -v /etc/machine-id:/etc/machine-id:ro \\
|
||||
{`docker run --name pf-host-agent --privileged --pid=host -v /etc/machine-id:/etc/machine-id:ro \\
|
||||
-v /var/run/docker.sock:/var/run/docker.sock -v /sys/kernel/debug:/sys/kernel/debug:ro \\
|
||||
docker.elastic.co/observability/profiling-agent:${hostAgentVersion} /root/pf-host-agent \\
|
||||
docker.elastic.co/observability/profiling-agent:${stackVersion} /root/pf-host-agent \\
|
||||
-project-id=1 -secret-token=${secretToken} \\
|
||||
-collection-agent=${collectionAgentHost}`}
|
||||
</EuiCodeBlock>
|
||||
|
@ -138,19 +141,29 @@ docker.elastic.co/observability/profiling-agent:${hostAgentVersion} /root/pf-hos
|
|||
],
|
||||
},
|
||||
{
|
||||
key: NoDataTabs.Binary,
|
||||
key: AddDataTabs.Binary,
|
||||
title: i18n.translate('xpack.profiling.tabs.binaryTitle', {
|
||||
defaultMessage: 'Binary',
|
||||
}),
|
||||
steps: [
|
||||
{
|
||||
title: i18n.translate('xpack.profiling.tabs.binaryDownloadStep', {
|
||||
defaultMessage: 'Download the latest binary:',
|
||||
defaultMessage: 'Download the binary for the right architecture:',
|
||||
}),
|
||||
content: (
|
||||
<EuiCodeBlock paddingSize="s" isCopyable>
|
||||
{`wget -O pf-host-agent.tgz "https://ela.st/pf-host-agent-amd64-${hostAgentVersion}" && tar xzf pf-host-agent.tgz`}
|
||||
</EuiCodeBlock>
|
||||
<EuiText>
|
||||
<b>For x86_64:</b>
|
||||
<EuiSpacer size="s" />
|
||||
<EuiCodeBlock paddingSize="s" isCopyable>
|
||||
{`wget -O pf-host-agent.tgz "https://artifacts.elastic.co/downloads/prodfiler/pf-host-agent-${stackVersion}-linux-x86_64.tar.gz" && tar xzf pf-host-agent.tgz`}
|
||||
</EuiCodeBlock>
|
||||
<EuiSpacer size="m" />
|
||||
<b>For ARM64:</b>
|
||||
<EuiSpacer size="s" />
|
||||
<EuiCodeBlock paddingSize="s" isCopyable>
|
||||
{`wget -O pf-host-agent.tgz "https://artifacts.elastic.co/downloads/prodfiler/pf-host-agent-${stackVersion}-linux-arm64.tar.gz" && tar xzf pf-host-agent.tgz`}
|
||||
</EuiCodeBlock>
|
||||
</EuiText>
|
||||
),
|
||||
},
|
||||
{
|
||||
|
@ -176,23 +189,22 @@ docker.elastic.co/observability/profiling-agent:${hostAgentVersion} /root/pf-hos
|
|||
],
|
||||
},
|
||||
{
|
||||
key: NoDataTabs.Deb,
|
||||
key: AddDataTabs.Deb,
|
||||
title: i18n.translate('xpack.profiling.tabs.debTitle', {
|
||||
defaultMessage: 'DEB Package',
|
||||
}),
|
||||
steps: [
|
||||
{
|
||||
title: i18n.translate('xpack.profiling.tabs.debDownloadPackageStep', {
|
||||
defaultMessage:
|
||||
'Open the URL below and download the right DEB package for your CPU architecture:',
|
||||
title: i18n.translate('xpack.profiling.tabs.debConfigureRepoStep', {
|
||||
defaultMessage: 'Configure the apt repository (requires root privileges):',
|
||||
}),
|
||||
content: (
|
||||
<EuiLink
|
||||
target="_blank"
|
||||
href={`https://ela.st/pf-host-agent-linux-${hostAgentVersion}`}
|
||||
>
|
||||
{`https://ela.st/pf-host-agent-linux-${hostAgentVersion}`}
|
||||
</EuiLink>
|
||||
<EuiCodeBlock paddingSize="s" isCopyable>
|
||||
{`wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
|
||||
sudo apt-get install apt-transport-https
|
||||
echo "deb https://artifacts.elastic.co/packages/${majorVersion}.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-${majorVersion}.x.list
|
||||
`}
|
||||
</EuiCodeBlock>
|
||||
),
|
||||
},
|
||||
{
|
||||
|
@ -201,7 +213,7 @@ docker.elastic.co/observability/profiling-agent:${hostAgentVersion} /root/pf-hos
|
|||
}),
|
||||
content: (
|
||||
<EuiCodeBlock paddingSize="s" isCopyable>
|
||||
{`sudo dpkg -i pf-host-agent*.deb`}
|
||||
{`sudo apt-get update && sudo apt-get install pf-host-agent`}
|
||||
</EuiCodeBlock>
|
||||
),
|
||||
},
|
||||
|
@ -229,23 +241,29 @@ docker.elastic.co/observability/profiling-agent:${hostAgentVersion} /root/pf-hos
|
|||
],
|
||||
},
|
||||
{
|
||||
key: NoDataTabs.RPM,
|
||||
key: AddDataTabs.RPM,
|
||||
title: i18n.translate('xpack.profiling.tabs.rpmTitle', {
|
||||
defaultMessage: 'RPM Package',
|
||||
}),
|
||||
steps: [
|
||||
{
|
||||
title: i18n.translate('xpack.profiling.tabs.rpmDownloadPackageStep', {
|
||||
defaultMessage:
|
||||
'Open the URL below and download the right RPM package for your CPU architecture:',
|
||||
title: i18n.translate('xpack.profiling.tabs.rpmConfigureRepoStep', {
|
||||
defaultMessage: 'Configure the yum repository (requires root privileges):',
|
||||
}),
|
||||
content: (
|
||||
<EuiLink
|
||||
target="_blank"
|
||||
href={`https://ela.st/pf-host-agent-linux-${hostAgentVersion}`}
|
||||
>
|
||||
{`https://ela.st/pf-host-agent-linux-${hostAgentVersion}`}
|
||||
</EuiLink>
|
||||
<EuiCodeBlock paddingSize="s" isCopyable>
|
||||
{`sudo rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
|
||||
cat <<EOF > /etc/yum.repos.d/elastic.repo
|
||||
[elastic-${majorVersion}.x]
|
||||
name=Elastic repository for ${majorVersion}.x packages
|
||||
baseurl=https://artifacts.elastic.co/packages/${majorVersion}.x/yum
|
||||
gpgcheck=1
|
||||
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
|
||||
enabled=1
|
||||
autorefresh=1
|
||||
type=rpm-md
|
||||
EOF`}
|
||||
</EuiCodeBlock>
|
||||
),
|
||||
},
|
||||
{
|
||||
|
@ -254,7 +272,7 @@ docker.elastic.co/observability/profiling-agent:${hostAgentVersion} /root/pf-hos
|
|||
}),
|
||||
content: (
|
||||
<EuiCodeBlock paddingSize="s" isCopyable>
|
||||
{`sudo rpm -i pf-host-agent*.rpm`}
|
||||
{`sudo yum install pf-host-agent`}
|
||||
</EuiCodeBlock>
|
||||
),
|
||||
},
|
||||
|
@ -282,26 +300,26 @@ docker.elastic.co/observability/profiling-agent:${hostAgentVersion} /root/pf-hos
|
|||
],
|
||||
},
|
||||
{
|
||||
key: NoDataTabs.ElasticAgentIntegration,
|
||||
title: i18n.translate('xpack.profiling.tabs.elasticAgentIntegrarion.title', {
|
||||
key: AddDataTabs.ElasticAgentIntegration,
|
||||
title: i18n.translate('xpack.profiling.tabs.elasticAgentIntegration.title', {
|
||||
defaultMessage: 'Elastic Agent Integration',
|
||||
}),
|
||||
steps: [
|
||||
{
|
||||
title: i18n.translate('xpack.profiling.tabs.elasticAgentIntegrarion.step1', {
|
||||
title: i18n.translate('xpack.profiling.tabs.elasticAgentIntegration.step1', {
|
||||
defaultMessage: 'Copy credentials',
|
||||
}),
|
||||
content: (
|
||||
<>
|
||||
<EuiText>
|
||||
{i18n.translate('xpack.profiling.tabs.elasticAgentIntegrarion.step1.hint', {
|
||||
{i18n.translate('xpack.profiling.tabs.elasticAgentIntegration.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 />
|
||||
<EuiText style={{ fontWeight: 'bold' }} size="s">
|
||||
{i18n.translate('xpack.profiling.tabs.elasticAgentIntegrarion.step1.secretToken', {
|
||||
{i18n.translate('xpack.profiling.tabs.elasticAgentIntegration.step1.secretToken', {
|
||||
defaultMessage: 'Secret token:',
|
||||
})}
|
||||
</EuiText>
|
||||
|
@ -311,7 +329,7 @@ docker.elastic.co/observability/profiling-agent:${hostAgentVersion} /root/pf-hos
|
|||
<EuiSpacer size="s" />
|
||||
<EuiText style={{ fontWeight: 'bold' }} size="s">
|
||||
{i18n.translate(
|
||||
'xpack.profiling.tabs.elasticAgentIntegrarion.step1.collectionAgentUrl',
|
||||
'xpack.profiling.tabs.elasticAgentIntegration.step1.collectionAgentUrl',
|
||||
{ defaultMessage: 'Universal Profiling Collector url:' }
|
||||
)}
|
||||
</EuiText>
|
||||
|
@ -322,7 +340,7 @@ docker.elastic.co/observability/profiling-agent:${hostAgentVersion} /root/pf-hos
|
|||
),
|
||||
},
|
||||
{
|
||||
title: i18n.translate('xpack.profiling.tabs.elasticAgentIntegrarion.step2', {
|
||||
title: i18n.translate('xpack.profiling.tabs.elasticAgentIntegration.step2', {
|
||||
defaultMessage: 'Fleet',
|
||||
}),
|
||||
content: (
|
||||
|
@ -333,7 +351,7 @@ docker.elastic.co/observability/profiling-agent:${hostAgentVersion} /root/pf-hos
|
|||
`/app/integrations/detail/profiler_agent-${data?.profilerAgent.version}/overview`
|
||||
)}`}
|
||||
>
|
||||
{i18n.translate('xpack.profiling.tabs.elasticAgentIntegrarion.step2.button', {
|
||||
{i18n.translate('xpack.profiling.tabs.elasticAgentIntegration.step2.button', {
|
||||
defaultMessage: 'Manage Universal Profiling agent in Fleet',
|
||||
})}
|
||||
</EuiButton>
|
||||
|
@ -342,7 +360,7 @@ docker.elastic.co/observability/profiling-agent:${hostAgentVersion} /root/pf-hos
|
|||
],
|
||||
},
|
||||
{
|
||||
key: NoDataTabs.Symbols,
|
||||
key: AddDataTabs.Symbols,
|
||||
title: i18n.translate('xpack.profiling.tabs.symbols.title', {
|
||||
defaultMessage: 'Upload Symbols',
|
||||
}),
|
||||
|
@ -356,13 +374,13 @@ docker.elastic.co/observability/profiling-agent:${hostAgentVersion} /root/pf-hos
|
|||
<b>For x86_64:</b>
|
||||
<EuiSpacer size="s" />
|
||||
<EuiCodeBlock paddingSize="s" isCopyable>
|
||||
{`wget -O symbtool-amd64.tgz "https://ela.st/symbtool-linux-amd64" && tar xzf symbtool-amd64.tgz && cd symbtool-*-linux-x86_64`}
|
||||
{`wget -O symbtool-amd64.tgz "https://artifacts.elastic.co/downloads/prodfiler/symbtool-${stackVersion}-linux-x86_64.tar.gz" && tar xzf symbtool-amd64.tgz && cd symbtool-*-linux-x86_64`}
|
||||
</EuiCodeBlock>
|
||||
<EuiSpacer size="m" />
|
||||
<b>For ARM64:</b>
|
||||
<EuiSpacer size="s" />
|
||||
<EuiCodeBlock paddingSize="s" isCopyable>
|
||||
{`wget -O symbtool-arm64.tgz "https://ela.st/symbtool-linux-arm64" && tar xzf symbtool-arm64.tgz && cd symbtool-*-linux-arm64`}
|
||||
{`wget -O symbtool-arm64.tgz "https://artifacts.elastic.co/downloads/prodfiler/pf-host-agent-${stackVersion}-linux-arm64.tar.gz" && tar xzf symbtool-arm64.tgz && cd symbtool-*-linux-arm64`}
|
||||
</EuiCodeBlock>
|
||||
</EuiText>
|
||||
),
|
|
@ -15,8 +15,8 @@ import { ELASTIC_CLOUD_APM_POLICY, getApmPolicy } from './get_apm_policy';
|
|||
import { ProfilingSetupOptions } from './types';
|
||||
|
||||
const CLOUD_AGENT_POLICY_ID = 'policy-elastic-agent-on-cloud';
|
||||
const COLLECTOR_PACKAGE_POLICY_NAME = 'elastic-universal-profiling-collector';
|
||||
const SYMBOLIZER_PACKAGE_POLICY_NAME = 'elastic-universal-profiling-symbolizer';
|
||||
const COLLECTOR_PACKAGE_POLICY_NAME = 'Universal Profiling Collector';
|
||||
const SYMBOLIZER_PACKAGE_POLICY_NAME = 'Universal Profiling Symbolizer';
|
||||
|
||||
async function getPackagePolicy({
|
||||
soClient,
|
||||
|
@ -103,7 +103,7 @@ export async function createCollectorPackagePolicy({
|
|||
enabled: true,
|
||||
package: {
|
||||
name: packageName,
|
||||
title: 'Universal Profiling Collector',
|
||||
title: COLLECTOR_PACKAGE_POLICY_NAME,
|
||||
version,
|
||||
},
|
||||
name: COLLECTOR_PACKAGE_POLICY_NAME,
|
||||
|
@ -161,7 +161,7 @@ export async function createSymbolizerPackagePolicy({
|
|||
enabled: true,
|
||||
package: {
|
||||
name: packageName,
|
||||
title: 'Universal Profiling Symbolizer',
|
||||
title: SYMBOLIZER_PACKAGE_POLICY_NAME,
|
||||
version,
|
||||
},
|
||||
name: SYMBOLIZER_PACKAGE_POLICY_NAME,
|
||||
|
|
|
@ -21,16 +21,20 @@ export interface SetupDataCollectionInstructions {
|
|||
profilerAgent: {
|
||||
version: string;
|
||||
};
|
||||
|
||||
stackVersion: string;
|
||||
}
|
||||
|
||||
export async function getSetupInstructions({
|
||||
packagePolicyClient,
|
||||
soClient,
|
||||
apmServerHost,
|
||||
stackVersion,
|
||||
}: {
|
||||
packagePolicyClient: PackagePolicyClient;
|
||||
soClient: SavedObjectsClientContract;
|
||||
apmServerHost?: string;
|
||||
stackVersion: string;
|
||||
}): Promise<SetupDataCollectionInstructions> {
|
||||
const profilerAgent = await fetchFindLatestPackageOrThrow('profiler_agent', { prerelease: true });
|
||||
const collectorPolicy = await getCollectorPolicy({ packagePolicyClient, soClient });
|
||||
|
@ -59,5 +63,6 @@ export async function getSetupInstructions({
|
|||
profilerAgent: {
|
||||
version: profilerAgent.version,
|
||||
},
|
||||
stackVersion,
|
||||
};
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ export class ProfilingPlugin
|
|||
deps.features.registerKibanaFeature(PROFILING_FEATURE);
|
||||
|
||||
const config = this.initializerContext.config.get();
|
||||
const stackVersion = this.initializerContext.env.packageInfo.version;
|
||||
|
||||
const telemetryUsageCounter = deps.usageCollection?.createUsageCounter(
|
||||
PROFILING_SERVER_FEATURE_ID
|
||||
|
@ -61,6 +62,7 @@ export class ProfilingPlugin
|
|||
start: depsStart,
|
||||
setup: deps,
|
||||
config,
|
||||
stackVersion,
|
||||
telemetryUsageCounter,
|
||||
},
|
||||
services: {
|
||||
|
|
|
@ -35,6 +35,7 @@ export interface RouteRegisterParameters {
|
|||
start: ProfilingPluginStartDeps;
|
||||
setup: ProfilingPluginSetupDeps;
|
||||
config: ProfilingConfig;
|
||||
stackVersion: string;
|
||||
telemetryUsageCounter?: TelemetryUsageCounter;
|
||||
};
|
||||
services: {
|
||||
|
|
|
@ -42,7 +42,7 @@ export function registerSetupRoute({
|
|||
dependencies,
|
||||
}: RouteRegisterParameters) {
|
||||
const paths = getRoutePaths();
|
||||
// Check if Elasticsearch and Fleet are setup for Universal Profiling
|
||||
// Check if Elasticsearch and Fleet are set up for Universal Profiling
|
||||
router.get(
|
||||
{
|
||||
path: paths.HasSetupESResources,
|
||||
|
@ -249,7 +249,7 @@ export function registerSetupRoute({
|
|||
}
|
||||
}
|
||||
);
|
||||
// Show users the instructions on how to setup Universal Profiling agents
|
||||
// Show users the instructions on how to set up Universal Profiling agents
|
||||
router.get(
|
||||
{
|
||||
path: paths.SetupDataCollectionInstructions,
|
||||
|
@ -259,10 +259,12 @@ export function registerSetupRoute({
|
|||
async (context, request, response) => {
|
||||
try {
|
||||
const apmServerHost = dependencies.setup.cloud?.apm?.url;
|
||||
const stackVersion = dependencies.stackVersion;
|
||||
const setupInstructions = await getSetupInstructions({
|
||||
packagePolicyClient: dependencies.start.fleet.packagePolicyService,
|
||||
soClient: (await context.core).savedObjects.client,
|
||||
apmServerHost,
|
||||
stackVersion,
|
||||
});
|
||||
|
||||
return response.ok({ body: setupInstructions });
|
||||
|
|
|
@ -28301,24 +28301,17 @@
|
|||
"xpack.profiling.tabs.binaryGrantPermissionStep": "Accorder des autorisations d'exécution :",
|
||||
"xpack.profiling.tabs.binaryRunHostAgentStep": "Exécuter l'agent hôte Universal Profiling (requiert des privilèges racine) :",
|
||||
"xpack.profiling.tabs.binaryTitle": "Binaire",
|
||||
"xpack.profiling.tabs.debDownloadPackageStep": "Ouvrir l'URL ci-dessous et télécharger le pack DEB correct pour votre architecture CPU :",
|
||||
"xpack.profiling.tabs.debEditConfigStep": "Modifier la configuration (requiert des privilèges racine) :",
|
||||
"xpack.profiling.tabs.debInstallPackageStep": "Installer le pack DEB (requiert des privilèges racine) :",
|
||||
"xpack.profiling.tabs.debStartSystemdServiceStep": "Démarrer le service systemd Universal Profiling (requiert des privilèges racine) :",
|
||||
"xpack.profiling.tabs.debTitle": "Pack DEB",
|
||||
"xpack.profiling.tabs.dockerRunContainerStep": "Exécuter le conteneur Universal Profiling :",
|
||||
"xpack.profiling.tabs.dockerTitle": "Docker",
|
||||
"xpack.profiling.tabs.elasticAgentIntegrarion.step1": "Copier des informations d’identification",
|
||||
"xpack.profiling.tabs.elasticAgentIntegrarion.step1.hint": "Vous aurez besoin de ces informations d’identification pour configurer Universal Profiling. Veuillez les conserver en lieu sûr, car elles seront nécessaires pour l’étape suivante.",
|
||||
"xpack.profiling.tabs.elasticAgentIntegrarion.step2": "Fleet",
|
||||
"xpack.profiling.tabs.elasticAgentIntegrarion.step2.button": "Gérer un agent Universal Profiling dans Fleet",
|
||||
"xpack.profiling.tabs.elasticAgentIntegrarion.title": "Intégration d'Elastic Agent",
|
||||
"xpack.profiling.tabs.kubernetesInstallStep": "Installer l'agent hôte via Helm :",
|
||||
"xpack.profiling.tabs.kubernetesRepositoryStep": "Configurer le référentiel Helm de l'agent hôte Universal Profiling :",
|
||||
"xpack.profiling.tabs.kubernetesTitle": "Kubernetes",
|
||||
"xpack.profiling.tabs.kubernetesValidationStep": "Confirmer que les pods de l'agent hôte sont en cours d'exécution :",
|
||||
"xpack.profiling.tabs.postValidationStep": "Utiliser la sortie d'installation Helm pour obtenir les logs de l'agent hôte et repérer les erreurs potentielles",
|
||||
"xpack.profiling.tabs.rpmDownloadPackageStep": "Ouvrir l'URL ci-dessous et télécharger le pack RPM correct pour votre architecture CPU :",
|
||||
"xpack.profiling.tabs.rpmEditConfigStep": "Modifier la configuration (requiert des privilèges racine) :",
|
||||
"xpack.profiling.tabs.rpmInstallPackageStep": "Installer le pack RPM (requiert des privilèges racine) :",
|
||||
"xpack.profiling.tabs.rpmStartSystemdServiceStep": "Démarrer le service systemd Universal Profiling (requiert des privilèges racine) :",
|
||||
|
|
|
@ -28301,24 +28301,17 @@
|
|||
"xpack.profiling.tabs.binaryGrantPermissionStep": "実行可能権限を付与:",
|
||||
"xpack.profiling.tabs.binaryRunHostAgentStep": "ユニバーサルプロファイリングホストエージェントを実行(ルート権限が必要):",
|
||||
"xpack.profiling.tabs.binaryTitle": "バイナリー",
|
||||
"xpack.profiling.tabs.debDownloadPackageStep": "以下のURLを開き、CPUアーキテクチャにあった適切なDEBパッケージをダウンロード:",
|
||||
"xpack.profiling.tabs.debEditConfigStep": "構成を編集(ルート権限が必要):",
|
||||
"xpack.profiling.tabs.debInstallPackageStep": "DEBパッケージをインストール(ルート権限が必要):",
|
||||
"xpack.profiling.tabs.debStartSystemdServiceStep": "ユニバーサルプロファイリングシステムサービスを開始(ルート権限が必要):",
|
||||
"xpack.profiling.tabs.debTitle": "DEBパッケージ",
|
||||
"xpack.profiling.tabs.dockerRunContainerStep": "ユニバーサルプロファイリングコンテナーを実行:",
|
||||
"xpack.profiling.tabs.dockerTitle": "Docker",
|
||||
"xpack.profiling.tabs.elasticAgentIntegrarion.step1": "資格情報をコピー",
|
||||
"xpack.profiling.tabs.elasticAgentIntegrarion.step1.hint": "ユニバーサルプロファイリングを設定するには、以下の資格情報が必要です。次のステップで必要となるため、安全な場所に保存してください。",
|
||||
"xpack.profiling.tabs.elasticAgentIntegrarion.step2": "Fleet",
|
||||
"xpack.profiling.tabs.elasticAgentIntegrarion.step2.button": "Fleetでユニバーサルプロファイリングエージェントを管理",
|
||||
"xpack.profiling.tabs.elasticAgentIntegrarion.title": "Elasticエージェント統合",
|
||||
"xpack.profiling.tabs.kubernetesInstallStep": "Helm経由でホストエージェントをインストール:",
|
||||
"xpack.profiling.tabs.kubernetesRepositoryStep": "ユニバーサルプロファイリングホストエージェントHelmリポジトリを構成:",
|
||||
"xpack.profiling.tabs.kubernetesTitle": "Kubernetes",
|
||||
"xpack.profiling.tabs.kubernetesValidationStep": "ホストエージェントポッドが実行中であることを検証:",
|
||||
"xpack.profiling.tabs.postValidationStep": "Helmインストール出力を使用して、ホストエージェントログを取得し、潜在的なエラーを特定",
|
||||
"xpack.profiling.tabs.rpmDownloadPackageStep": "以下のURLを開き、CPUアーキテクチャにあった適切なRPMパッケージをダウンロード:",
|
||||
"xpack.profiling.tabs.rpmEditConfigStep": "構成を編集(ルート権限が必要):",
|
||||
"xpack.profiling.tabs.rpmInstallPackageStep": "RPMパッケージをインストール(ルート権限が必要):",
|
||||
"xpack.profiling.tabs.rpmStartSystemdServiceStep": "ユニバーサルプロファイリングシステムサービスを開始(ルート権限が必要):",
|
||||
|
|
|
@ -28299,24 +28299,17 @@
|
|||
"xpack.profiling.tabs.binaryGrantPermissionStep": "授予可执行权限:",
|
||||
"xpack.profiling.tabs.binaryRunHostAgentStep": "运行 Universal Profiling 主机代理(需要根权限):",
|
||||
"xpack.profiling.tabs.binaryTitle": "二进制",
|
||||
"xpack.profiling.tabs.debDownloadPackageStep": "打开下面的 URL 并为您的 CPU 架构下载正确的 DEB 软件包:",
|
||||
"xpack.profiling.tabs.debEditConfigStep": "编辑配置(需要根权限):",
|
||||
"xpack.profiling.tabs.debInstallPackageStep": "安装 DEB 软件包(需要根权限):",
|
||||
"xpack.profiling.tabs.debStartSystemdServiceStep": "启动 Universal Profiling systemd 服务(需要根权限):",
|
||||
"xpack.profiling.tabs.debTitle": "DEB 软件包",
|
||||
"xpack.profiling.tabs.dockerRunContainerStep": "运行 Universal Profiling 容器:",
|
||||
"xpack.profiling.tabs.dockerTitle": "Docker",
|
||||
"xpack.profiling.tabs.elasticAgentIntegrarion.step1": "复制凭据",
|
||||
"xpack.profiling.tabs.elasticAgentIntegrarion.step1.hint": "您需要这些凭据才能设置 Universal Profiling。请将它们保存到安全位置,因为在后续步骤中将需要用到它们。",
|
||||
"xpack.profiling.tabs.elasticAgentIntegrarion.step2": "Fleet",
|
||||
"xpack.profiling.tabs.elasticAgentIntegrarion.step2.button": "在 Fleet 中管理 Universal Profiling 代理",
|
||||
"xpack.profiling.tabs.elasticAgentIntegrarion.title": "Elastic 代理集成",
|
||||
"xpack.profiling.tabs.kubernetesInstallStep": "通过 Helm 安装主机代理:",
|
||||
"xpack.profiling.tabs.kubernetesRepositoryStep": "配置 Universal Profiling 主机代理 Helm 存储库:",
|
||||
"xpack.profiling.tabs.kubernetesTitle": "Kubernetes",
|
||||
"xpack.profiling.tabs.kubernetesValidationStep": "验证主机代理 Pod 是否正在运行:",
|
||||
"xpack.profiling.tabs.postValidationStep": "使用 Helm 安装输出以获取主机代理日志并发现潜在错误",
|
||||
"xpack.profiling.tabs.rpmDownloadPackageStep": "打开下面的 URL 并为您的 CPU 架构下载正确的 RPM 软件包:",
|
||||
"xpack.profiling.tabs.rpmEditConfigStep": "编辑配置(需要根权限):",
|
||||
"xpack.profiling.tabs.rpmInstallPackageStep": "安装 RPM 软件包(需要根权限):",
|
||||
"xpack.profiling.tabs.rpmStartSystemdServiceStep": "启动 Universal Profiling systemd 服务(需要根权限):",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue