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

# Backport

This will backport the following commits from `main` to `8.15`:
- [[OTel Onboarding] Adjust linux snippet and warning
(#187691)](https://github.com/elastic/kibana/pull/187691)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Joe
Reuter","email":"johannes.reuter@elastic.co"},"sourceCommit":{"committedDate":"2024-07-08T14:31:42Z","message":"[OTel
Onboarding] Adjust linux snippet and warning
(#187691)\n\nAddress\r\nhttps://github.com/elastic/observability-dev/issues/3217#issuecomment-2210741356\r\n\r\n<img
width=\"1150\" alt=\"Screenshot 2024-07-05 at 17 30
47\"\r\nsrc=\"228b0531-ac16-46d0-bbf1-5c3bb959121a\">","sha":"ae802a5776e8f64e43ef7c6d26024d7cd8117745","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-logs","v8.15.0","v8.16.0"],"title":"[OTel
Onboarding] Adjust linux snippet and
warning","number":187691,"url":"https://github.com/elastic/kibana/pull/187691","mergeCommit":{"message":"[OTel
Onboarding] Adjust linux snippet and warning
(#187691)\n\nAddress\r\nhttps://github.com/elastic/observability-dev/issues/3217#issuecomment-2210741356\r\n\r\n<img
width=\"1150\" alt=\"Screenshot 2024-07-05 at 17 30
47\"\r\nsrc=\"228b0531-ac16-46d0-bbf1-5c3bb959121a\">","sha":"ae802a5776e8f64e43ef7c6d26024d7cd8117745"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"8.15","label":"v8.15.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/187691","number":187691,"mergeCommit":{"message":"[OTel
Onboarding] Adjust linux snippet and warning
(#187691)\n\nAddress\r\nhttps://github.com/elastic/observability-dev/issues/3217#issuecomment-2210741356\r\n\r\n<img
width=\"1150\" alt=\"Screenshot 2024-07-05 at 17 30
47\"\r\nsrc=\"228b0531-ac16-46d0-bbf1-5c3bb959121a\">","sha":"ae802a5776e8f64e43ef7c6d26024d7cd8117745"}}]}]
BACKPORT-->

Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
This commit is contained in:
Kibana Machine 2024-07-09 12:46:05 +02:00 committed by GitHub
parent d765ed3550
commit bcee10739e
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 should be 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}