From bb47b014ccaa0fa31487ee014d7ce2c565c867da Mon Sep 17 00:00:00 2001 From: Shulhan Date: Tue, 12 Sep 2023 14:44:59 +0700 Subject: all: set default ops-agent syslog from systemd_journald Systemd journald in ArchLinux does not forward the log to syslog anymore. This fix empty instance log in Cloud Logs Explorer. --- awwan.env | 2 +- build-arch-gce | 4 ++++ current-images.txt | 10 +++++----- sys/etc/google-cloud-ops-agent/config.yaml | 8 ++++++++ 4 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 sys/etc/google-cloud-ops-agent/config.yaml diff --git a/awwan.env b/awwan.env index e479705..aa1c39b 100644 --- a/awwan.env +++ b/awwan.env @@ -5,5 +5,5 @@ region = asia-southeast1 zone = asia-southeast1-b [host] -image = arch-v20230701 +image =arch-v20230912 name = arch-test diff --git a/build-arch-gce b/build-arch-gce index e928e09..b10f16d 100755 --- a/build-arch-gce +++ b/build-arch-gce @@ -128,6 +128,10 @@ echo '-- Configuring initcpio.' cp ./sys/etc/mkinitcpio.conf $mount_dir/etc/ cp ./sys/etc/mkinitcpio.d/linux.preset $mount_dir/etc/mkinitcpio.d/ +echo '-- Configuring Google Cloud Ops Agent.' +mkdir -p $mount_dir/etc/google-cloud-ops-agent/ +cp ./sys/etc/google-cloud-ops-agent/config.yaml $mount_dir/etc/google-cloud-ops-agent/ + arch-chroot -- "$mount_dir" /bin/bash -s <<-'EOS' set -eEuo pipefail trap 'echo "Error: \`$BASH_COMMAND\` exited with status $?"' ERR diff --git a/current-images.txt b/current-images.txt index 14379be..f2ed289 100644 --- a/current-images.txt +++ b/current-images.txt @@ -1,6 +1,6 @@ NAME PROJECT FAMILY DEPRECATED STATUS -arch-v20230216 arch-builder arch READY -arch-v20230223 arch-builder arch READY -arch-v20230302 arch-builder arch READY -arch-v20230313 arch-builder arch READY -arch-v20230320 arch-builder arch READY +arch-v20230812 arch-builder arch READY +arch-v20230819 arch-builder arch READY +arch-v20230902 arch-builder arch READY +arch-v20230906 arch-builder arch READY +arch-v20230912 arch-builder arch READY diff --git a/sys/etc/google-cloud-ops-agent/config.yaml b/sys/etc/google-cloud-ops-agent/config.yaml new file mode 100644 index 0000000..402be29 --- /dev/null +++ b/sys/etc/google-cloud-ops-agent/config.yaml @@ -0,0 +1,8 @@ +logging: + receivers: + syslog: + type: systemd_journald + service: + pipelines: + default_pipeline: + receivers: [syslog] -- cgit v1.3