You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added the parameter socketdir to be able to override Option SocketDir in both zabbix_server.conf and zabbix_proxy.conf via an ENC (such as Foreman).
It was added in zabbix_server.conf for completeness, however, in Zabbix 5.0 the proxy service creates a Unix socket for preprocessing called zabbix_proxy_preprocessing.sock.
In the default location, /tmp, SELinux violations on creating the socket prevented the zabbix-proxy service from starting in my deployment on CentOS 7.
My workaround was to override SocketDir, which was added to zabbix_proxy.conf in 5.0, to change the directory that this socket is created in from the default to /var/run/zabbix.
Because it only exists when the service is running, /var/run seemed the appropriate place, and /var/run/zabbix already existed and had appropriate SELinux labels due to the agent and proxy PID files.
To resolve this issue without explicitly setting the parameter, I set the default for socketdir within zabbix::proxy to be /var/run/zabbix if zabbix_version is >= 5.0.
That seems a safe and sane enough default that works when both SELinux is enabled or disabled so that it's not necessary to do a boolean and comparison against both zabbix_version and facts('os.selinux.enabled').
Copy file name to clipboardExpand all lines: manifests/server.pp
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -261,6 +261,10 @@
261
261
# [*manage_startup_script*]
262
262
# If the init script should be managed by this module. Attention: This might cause problems with some config options of this module (e.g server_configfile_path)
263
263
#
264
+
# [*socketdir*]
265
+
# IPC socket directory.
266
+
# Directory to store IPC sockets used by internal Zabbix services.
267
+
#
264
268
# === Example
265
269
#
266
270
# When running everything on a single node, please check
0 commit comments