Add Zabbix agent rules - #15128
Add Zabbix agent rules#15128israel-villar wants to merge 3 commits into
Conversation
Zabbix is a widely used open-source network monitoring solution; the project already has SELinux booleans referencing it (sebool_httpd_can_connect_zabbix, sebool_zabbix_can_network) but no rules covering the monitoring agent itself. Adds a new zabbix service group with three rules: - package_zabbix_agent_installed and service_zabbix_agent_enabled (from templates). - zabbix_agent_server_configured: check-only, verifies Server and ServerActive are set in zabbix_agentd.conf and not left at the packaged 127.0.0.1 default. No remediation is shipped, since the correct monitoring server address is site-specific. Adds the zabbix component. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
zabbix_agent_server_configured has custom OVAL (not template-based), so it isn't covered by any template's built-in test suite. Adds 5 scenarios covering the AND of the four OVAL criteria: both directives configured (pass), both left at the packaged default, either directive missing entirely, and either directive individually left at default while the other is configured (fail). Verified with Automatus against the debian13 test container: all 5 scenarios evaluate as expected. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Hi @israel-villar. Thanks for your PR. I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Hello @israel-villar, thanks for the submission. In order to consider this for a review, and to review this properly, please provide exact official Zabbix documentation sources for the decisions you made when creating these rules. Also please provide full documentation (comments) into the test benches you provided (expected results) Thanks. |
| @@ -0,0 +1,7 @@ | |||
| name: zabbix | |||
There was a problem hiding this comment.
▎ Thanks for the review, @macko1. Here are the exact official Zabbix sources for the decisions in this PR:
▎
▎ Server / ServerActive directive names and semantics — Zabbix agent (UNIX) configuration parameter reference:
▎ https://www.zabbix.com/documentation/current/en/manual/appendix/config/zabbix_agentd
▎ This confirms Server governs passive checks (mandatory unless StartAgents=0) and ServerActive governs active checks, which is why the check requires both to be set.
▎
▎ The 127.0.0.1 "packaged default" — the official upstream Zabbix source repository ships zabbix_agentd.conf with these two directives uncommented and set to 127.0.0.1:
▎ https://github.com/zabbix/zabbix/blob/master/conf/zabbix_agentd.conf#L132-L200
▎ (see ### Option: Server and ### Option: ServerActive — the parameter reference page itself documents no default, but this reference template is the file that ships as-is in the zabbix-agent package, which is why an unmodified install ends up with both directives pointing at 127.0.0.1.)
▎
▎ Passive vs. active checks concept, explaining why both directives are relevant to a correctly-configured agent:
▎ https://www.zabbix.com/documentation/current/en/manual/concepts/agent
▎
▎ I've also pushed a commit adding expected-result comments to each test scenario per your second request (587f3a8).
Add a comment to each Automatus test scenario explaining what it exercises and the expected pass/fail outcome, as requested in review. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Description:
zabbixrule group underlinux_os/guide/services/zabbix/with three rules:package_zabbix_agent_installedandservice_zabbix_agent_enabled(both using existing templates), andzabbix_agent_server_configured(custom OVAL check verifyingServer/ServerActiveare set inzabbix_agentd.confand not left at the packaged127.0.0.1default). Adds thezabbixcomponent.Rationale:
sebool_httpd_can_connect_zabbix,sebool_zabbix_can_network) but had no rules covering the monitoring agent itself.zabbix_agent_server_configuredships without remediation since the correct monitoring server address is site-specific.Review Hints:
./build_product --datastream-only debian13.linux_os/guide/services/zabbix/*/rule.yml,linux_os/guide/services/zabbix/zabbix_agent_server_configured/oval/shared.xml,components/zabbix.yml.