Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests using journalctl tool to start a custom independent agent #11186

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,18 @@ data_stream:
paths:
- "/run/service_logs/iptables.journal"
agent:
base_image: complete # Related issue: https://github.com/elastic/integrations/issues/10998
base_image: systemd # Related issue: https://github.com/elastic/integrations/issues/10998
runtime: docker
provisioning_script:
language: "sh"
contents: |
set -eu
if grep fedora /etc/os-release > /dev/null ; then
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added support in case the base image is an UBI image (e.g. docker.elastic.co/elastic-agent/elastic-agent-ubi).

microdnf update
microdnf install -y systemd
microdnf clean all
else
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes systemd
apt-get clean all
fi
16 changes: 15 additions & 1 deletion packages/journald/_dev/test/system/test-journald-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,18 @@ vars:
- "/run/service_logs/test.journal"
tags: [forwarded]
agent:
base_image: complete # Related issue: https://github.com/elastic/integrations/issues/10998
base_image: systemd # Related issue: https://github.com/elastic/integrations/issues/10998
runtime: docker
provisioning_script:
language: "sh"
contents: |
set -eu
if grep fedora /etc/os-release > /dev/null ; then
microdnf update
microdnf install -y systemd
microdnf clean all
else
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes systemd
apt-get clean all
fi