summaryrefslogtreecommitdiff
path: root/0001-build-sh.patch
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-07-15 14:53:27 +0700
committerShulhan <ms@kilabit.info>2023-07-15 15:34:53 +0700
commite7e623fc461b34b52265456674deff5bafd26c3c (patch)
treefc9a6032aa03686de55724bc1495c1cbab6b773d /0001-build-sh.patch
parent5257844578f6b7f87551930b25e3f0bbe3e895a3 (diff)
downloadgoogle-cloud-ops-agent-git-e7e623fc461b34b52265456674deff5bafd26c3c.tar.xz
all: patch the default config.yaml to use systemd_journald #2
Previosly, the default config.yaml receivers for syslog is using "type: files" that read /var/log/messages and /var/log/syslog. In Arch Linux, those files are not exist anymore, so we replace the with "type: systemd_journald" to make all the system logs forwarded to Cloud Logging. # Conflicts: # .SRCINFO # PKGBUILD
Diffstat (limited to '0001-build-sh.patch')
-rw-r--r--0001-build-sh.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/0001-build-sh.patch b/0001-build-sh.patch
index 29b9210..0c77457 100644
--- a/0001-build-sh.patch
+++ b/0001-build-sh.patch
@@ -1,3 +1,19 @@
+diff --git a/apps/builtinconf.go b/apps/builtinconf.go
+index 361f2f206..597ecc36f 100644
+--- a/apps/builtinconf.go
++++ b/apps/builtinconf.go
+@@ -21,9 +21,8 @@ var (
+ "linux": {
+ Logging: &cg.Logging{
+ Receivers: map[string]cg.LoggingReceiver{
+- "syslog": &cg.LoggingReceiverFiles{
+- ConfigComponent: cg.ConfigComponent{Type: "files"},
+- IncludePaths: []string{"/var/log/messages", "/var/log/syslog"},
++ "syslog": &cg.LoggingReceiverSystemd{
++ ConfigComponent: cg.ConfigComponent{Type: "systemd_journald"},
+ },
+ },
+ Processors: map[string]cg.LoggingProcessor{},
diff --git a/build.sh b/build.sh
index 4a97050f7..041b3ac72 100755
--- a/build.sh