So you can use it later
sudo setenforce 0
Run the thing that is broken
sudo systemctl restart nagios
Now get the module output
sudo audit2allow -a -r -m nagios_var_lib_t
If everything looks well send it to a file
sudo audit2allow -a -r -m nagios_var_lib_t -o nagios_var_lib_t.te
This is the file to transfer around
Make sure you always set SELinux back to enforcing
sudo setenforce 1
Now lets install it.
sudo checkmodule -M -m -o nagios_var_lib_t.mod nagios_var_lib_t.te
sudo semodule_package -o nagios_var_lib_t.pp -m nagios_var_lib_t.mod
sudo semodule -i nagios_var_lib_t.pp