From 43485dd6aaa09a5772ef188d81d67df1bf661a44 Mon Sep 17 00:00:00 2001 From: Ben Erickson Date: Sun, 20 Oct 2024 21:24:18 -0700 Subject: [PATCH] Updating http_access_log_combined Application Documentation w/SELinux Instructions --- doc/Extensions/Applications.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/doc/Extensions/Applications.md b/doc/Extensions/Applications.md index 8abd912194d8..03dff09cab8b 100644 --- a/doc/Extensions/Applications.md +++ b/doc/Extensions/Applications.md @@ -1119,6 +1119,27 @@ log that the size will be checked for and reported via the stat } ``` +8. (Optional) If you have SELinux in Enforcing mode, you must add a module so the script can open and read the httpd log files: +``` +cat << EOF > snmpd_http_access_log_combined.te +module snmp_http_access_log_combined 1.0; + +require { + type httpd_log_t; + type snmpd_t; + class file { open read }; +} + +#============= snmpd_t ============== + +allow snmpd_t httpd_log_t:file { open read }; + +EOF +checkmodule -M -m -o snmpd_http_access_log_combined.mod snmpd_http_access_log_combined.te +semodule_package -o snmpd_http_access_log_combined.pp -m snmpd_http_access_log_combined.mod +semodule -i snmpd_http_access_log_combined.pp +``` + ## HV Monitor HV Monitor provides a generic way to monitor hypervisors. Currently