[OTel Onboarding] Adjust linux snippet and warning (#187691)

Address
https://github.com/elastic/observability-dev/issues/3217#issuecomment-2210741356

<img width="1150" alt="Screenshot 2024-07-05 at 17 30 47"
src="228b0531-ac16-46d0-bbf1-5c3bb959121a">
This commit is contained in:
Joe Reuter 2024-07-08 16:31:42 +02:00 committed by GitHub
parent dddcf2ef43
commit ae802a5776
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -69,7 +69,7 @@ export const OtelLogsPanel: React.FC = () => {
} = useKibana<ObservabilityOnboardingAppServices>();
const AGENT_CDN_BASE_URL = isServerless
? 'snapshots.elastic.co/8.15.0-474afc1d/downloads/beats/elastic-agent'
? 'snapshots.elastic.co/8.15.0-dd63864e/downloads/beats/elastic-agent'
: 'artifacts.elastic.co/downloads/beats/elastic-agent';
// TODO change once otel flow is shown on serverless
// const agentVersion = isServerless ? setup?.elasticAgentVersion : stackVersion;
@ -545,6 +545,8 @@ spec:
content: `arch=$(if ([[ $(arch) == "arm" || $(arch) == "aarch64" ]]); then echo "arm64"; else echo $(arch); fi)
curl --output elastic-distro-${agentVersion}-linux-$arch.tar.gz --url https://${AGENT_CDN_BASE_URL}/elastic-agent-${agentVersion}-linux-$arch.tar.gz --proto '=https' --tlsv1.2 -fOL && mkdir elastic-distro-${agentVersion}-linux-$arch && tar -xvf elastic-distro-${agentVersion}-linux-$arch.tar.gz -C "elastic-distro-${agentVersion}-linux-$arch" --strip-components=1 && cd elastic-distro-${agentVersion}-linux-$arch
sudo setcap 'cap_dac_read_search=ep' ./data/elastic-agent-*/elastic-agent
rm ./otel.yml && cp ./otel_samples/platformlogs_hostmetrics.yml ./otel.yml && mkdir -p ./data/otelcol && sed -i 's#\\\${env:STORAGE_DIR}#'"$PWD"/data/otelcol'#g' ./otel.yml && sed -i 's#\\\${env:ELASTIC_ENDPOINT}#${setup?.elasticsearchUrl}#g' ./otel.yml && sed -i 's/\\\${env:ELASTIC_API_KEY}/${apiKeyData?.apiKeyEncoded}/g' ./otel.yml`,
start: './otelcol --config otel.yml',
@ -721,8 +723,8 @@ rm ./otel.yml && cp ./otel_samples/platformlogs_hostmetrics.yml ./otel.yml && mk
<EuiFlexGroup direction="column">
<EuiCallOut
title={i18n.translate(
'xpack.observability_onboarding.otelLogsPanel.historicalDataTitle',
{ defaultMessage: 'Historical logs will not be collected' }
'xpack.observability_onboarding.otelLogsPanel.limitationTitle',
{ defaultMessage: 'Configuration Information' }
)}
color="warning"
iconType="iInCircle"
@ -731,11 +733,21 @@ rm ./otel.yml && cp ./otel_samples/platformlogs_hostmetrics.yml ./otel.yml && mk
{i18n.translate(
'xpack.observability_onboarding.otelLogsPanel.historicalDataDescription',
{
defaultMessage:
'We only collect new log messages from the setup onward.',
defaultMessage: 'New log messages are collected from the setup onward.',
}
)}
</p>
{selectedTab !== 'kubernetes' && (
<p>
{i18n.translate(
'xpack.observability_onboarding.otelLogsPanel.historicalDataDescription2',
{
defaultMessage:
'The default log path is /var/log/*. You can change this path in the otel.yml file if needed.',
}
)}
</p>
)}
</EuiCallOut>
{selectedContent.prompt}