Closed ghost closed 4 years ago
Hi,
which OS you are using? Typically the icinga
user is used on RPM based distributions like CentOS, Red Hat, but you also have a nagios
user which is typically for DEB based distributions like Debian, Ubuntu.
Did you copied/moved the check_fritz plugin from your home directory to your plugin directory? It is labeled unconfined_u:object_r:admin_home_t
so it hat the wrong context. You can restore the correct context with restorecon -v /usr/lib64/nagios/plugins/check_fritz
Best regards Michael
Did you copied/moved the check_fritz plugin from your home directory to your plugin directory? It is labeled
unconfined_u:object_r:admin_home_t
so it hat the wrong context. You can restore the correct context withrestorecon -v /usr/lib64/nagios/plugins/check_fritz
Indeed this is exactly what happend and your suggestion works perfectly, many thanks. Maybe you could include a heads up in the docs for (SE)Linux noobs like me. :)
Hi,
I just set up a new Icinga2 monitoring instance and began adding hosts starting with my Fritz!Box 5490. This is when I came across this amazing plugin. I installed it according to the "Installtion" chapter in the docs without any issues, but as soon as I restart the icinga2 service I am getting the above error displayed for the check on my IcingaWeb2 dashboard.
The icinga2 log (/var/log/icinga2/icinga2.log) shows the following recurring entry:
[2020-06-30 08:16:00 +0200] warning/PluginCheckTask: Check command for object 'FRITZBox 5490!WAN Status' (PID: 143277, arguments: '/usr/lib64/nagios/plugins/check_fritz' '--method' 'connection_status' '--password' 'xxxxxxxx' '--username' 'icinga2') terminated with exit code 128, output: execvpe(/usr/lib64/nagios/plugins/check_fritz) failed: Permission denied
So I thought I messed up my file permission which look like this:
Note that I added the "icinga" group while debugging it used to be root like almost all file in the plugins directory.
To be sure it is not a permission issue I tried running the check manually as the "icinga" user, which works fine:
[root@xxxxxx xxxx]# sudo -H -u icinga '/usr/lib64/nagios/plugins/check_fritz' '--method' 'connection_status' '--password' 'xxxxxxxx' '--username' 'icinga2' OK - Connection Status: Connected; External IP: 89.245.xxx.xxx
Any suggestion on what might be wrong here?
Edit: Just found another clue. The error seems to be caused by SELinux: