mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Add SELinux instructions for systemd monitoring (#14809)
This commit is contained in:
@@ -2186,6 +2186,29 @@ chmod +x /etc/snmp/redis.py
|
||||
extend redis /etc/snmp/redis.py
|
||||
```
|
||||
|
||||
4. (Optional) If you have SELinux in Enforcing mode, you must add a module so the script can get redis informations and write them:
|
||||
```
|
||||
cat << EOF > snmpd_redis.te
|
||||
module snmpd_redis 1.0;
|
||||
|
||||
require {
|
||||
type tmp_t;
|
||||
type redis_port_t;
|
||||
type snmpd_t;
|
||||
class tcp_socket name_connect;
|
||||
class dir { add_name write };
|
||||
}
|
||||
|
||||
#============= snmpd_t ==============
|
||||
|
||||
allow snmpd_t redis_port_t:tcp_socket name_connect;
|
||||
allow snmpd_t tmp_t:dir { write add_name };
|
||||
EOF
|
||||
checkmodule -M -m -o snmpd_redis.mod snmpd_redis.te
|
||||
semodule_package -o snmpd_redis.pp -m snmpd_redis.mod
|
||||
semodule -i snmpd_redis.pp
|
||||
```
|
||||
|
||||
### Agent
|
||||
|
||||
[Install the agent](Agent-Setup.md) on this device if it isn't already
|
||||
|
||||
Reference in New Issue
Block a user