Skip to content

Commit

Permalink
[OTel Onboarding] Adjust linux snippet and warning (#187691)
Browse files Browse the repository at this point in the history
Address
elastic/observability-dev#3217 (comment)

<img width="1150" alt="Screenshot 2024-07-05 at 17 30 47"
src="https://github.com/elastic/kibana/assets/1508364/228b0531-ac16-46d0-bbf1-5c3bb959121a">

(cherry picked from commit ae802a5)
  • Loading branch information
flash1293 committed Jul 8, 2024
1 parent b10c5bc commit a8ff9d8
Showing 1 changed file with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 should be shown on serverless
// const agentVersion = isServerless ? setup?.elasticAgentVersion : stackVersion;
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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"
Expand All @@ -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}
Expand Down

0 comments on commit a8ff9d8

Please sign in to comment.