-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Logs are stored on a tmpfs to limit writes to storage. Logs are persisted through Graylog anyway. But seems Zabbix agent isn't recreating its log dir if it's missing. This fix ensures the logging directory is created on boot.
- Loading branch information
Showing
4 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Unit] | ||
Description=Ensure /var/log/zabbix exists | ||
After=var-log.mount | ||
Requires=var-log.mount | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStartPre=/usr/bin/mkdir -p /var/log/zabbix | ||
ExecStart=/usr/bin/chown zabbix:zabbix /var/log/zabbix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[Unit] | ||
After=ensure-var-log-zabbix-exists.service | ||
Requires=ensure-var-log-zabbix-exists.service |