zabbix: bring to parity between agent, server, and proxy; and do some cleanup#30010
zabbix: bring to parity between agent, server, and proxy; and do some cleanup#30010danielfdickinson wants to merge 9 commits into
Conversation
|
Oh dear, I've confused the bot with the sed scripts. |
Update to latest LTS. See release notes: https://www.zabbix.com/rn/rn7.0.28 Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
This is the upstream recommendation, and fits with our seperation of agent and server. Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
Tweak the agentd and server patch configuration and bring agentd and server confgurations to parity. Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
openwrt-ai
left a comment
There was a problem hiding this comment.
Reviewed the sed-script conversion and proxy additions. Two functional issues flagged inline (both in the "replace conf file patches with sed scripts" commit); the commit messages themselves accurately describe their changes.
Generated by Claude Code
* Genericize zabbix_server initscript. * Add shellcheck overrides where needed. * Add a 'never_root' config option (default true) that determines whether server starts as an unprivileged user or starts as root and drops to an unprivileged user (unless config is changed so it always runs as root). * Bring zabbix_agentd initscript to parity with zabbix_server for the initscript and configuration. * Tweak Makefile to reduce repetition Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
* Add config file patch for proxy * Add initscript for proxy * Update Makefile and support files to bring proxy to parity with agentd and server. Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
e8eab1a to
a6deb39
Compare
|
@BKPepe More files/* issues 🤷 Do you want me to create another issue, as suggested at the bottom of the comment, or is this enough for you? |
| @@ -0,0 +1 @@ | |||
| /etc/zabbix_agentd.conf.d | |||
There was a problem hiding this comment.
I think just put this into the conffiles and you dont need to use keep.d, right?
There was a problem hiding this comment.
Hmmm... I thought conffiles had to be files not directories. Will test.
There was a problem hiding this comment.
afaik it works with directories as well. :) We can document it somewhere, if it isnt.
There was a problem hiding this comment.
Once you confirm that conffiles works for directories as well, I’ll update the bot to recommend using conffiles instead. This will also fix the false positive where it flags things not strictly meant for /etc/config.
Well, new feature. It's a bit cheeky, but we'll fine-tune it
There was a problem hiding this comment.
I can confirm directories in conffiles are preserved.
d2a08f6 to
1c47514
Compare
27c6b43 to
b4db7a0
Compare
b4db7a0 to
2111888
Compare
|
Built while I slept. Will run-test when I am back from work this evening. |
Add the user config file directories (/etc/zabbix_x.conf.d) to the list of directories and files to preserve across sysupgrade. Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
2111888 to
5f297cc
Compare
Avoid treating openwrt-supplies params files as configuration data. Instead have them in a separate directory which is included in the zabbix_agentd configuration by default. Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
The sysctl file increases max files to allow the default full complement of discovery workers, however this is probably not a hard requirement and such a conf not shipped elsewhere in tree, so leave that to the user to configure. (The syslog messages from zabbix-server and/or zabbix-proxy provided the needed information). Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
While the frontend can mostly operate without php8-mod-simplexml, when trying to import XML templates the user only gets unhelpful error messages and is unlikely to realize the module is required for that functionality. Therefore have the frontend depend on php8-mod-simplexml. Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
5f297cc to
ed755c1
Compare
|
@BKPepe Would you prefer this split into two or three PRs? The commits are reasonably atomic, so I don't think a split is required, but I thought I would ask, despite the fact that waiting for PRs to clear is a pain. |
openwrt-ai
left a comment
There was a problem hiding this comment.
Re-reviewed at head after the restructure from sed-scripts back to config patches (9 commits since my last review). Each commit message matches its diff, the three USERIDs and per-service conf.d dirs line up, and the sysctl removal is consistent across file/install/conffiles. One minor parity nit left inline.
Generated by Claude Code
| if [ "$never_root" -eq 1 ]; then | ||
| procd_set_param user ${USER} | ||
| fi | ||
| procd_set_param respawn |
There was a problem hiding this comment.
nit: This commit brings agentd to parity with zabbix_server, but the agentd instance omits procd_set_param file ${CONFIG}, which both zabbix_server.init:45 and zabbix_proxy.init:44 set. Without it procd won't track the config file, so editing /etc/zabbix_agentd.conf and running reload won't restart the agent. If the omission is intentional, ignore; otherwise:
| procd_set_param respawn | |
| procd_set_param file ${CONFIG} | |
| procd_set_param respawn |
Generated by Claude Code
There was a problem hiding this comment.
Fixed this is #30026 where these changes now live.
Oh, that's up to you, but from my point of view, it is always better to have it splitted. |
📦 Package Details
Maintainer: @danielfdickinson
Description:
fits with our seperation of agent and server.
server confgurations to parity.
whether server starts as an unprivileged user or starts as root and
drops to an unprivileged user (unless config is changed so it always
runs as root).
initscript and configuration.
agentd and server.
🧪 Run Testing Details
✅ Formalities
If your PR contains a patch:
git amN/A: OpenWrt-specific configuration tweaks