Antono
(Anton one)
March 24, 2022, 11:17am
1
Hello everybody,
i would like to check a CIFS-Share(s). I know, i must use the command check_disk_smb . This is the Command I used:
It works on the commandline.
This is the result on the commandline:
But i have problems on Icinga2. This is my configuration on Icinga2:
object Host “Share_SRV_Share” {
check_command = "disk_smb"
vars.disk_smb_hostname = "srv1.condoso.local"
vars.disk_smb_share = "share"
}
This is the result from Icinga2
Maybe there is something wrong with the SMBClient? Thank you for the help.
Best Regards
rsx
(Roland Sommer)
March 24, 2022, 12:25pm
2
Icinga executes the plugin as user nagios or icinga (depending on your distribution),however, manually execution is usually done as other user or even as root. Hence, the plugin is executed with different environments.
BTW: Please format postings according to this guideline .
Antono
(Anton one)
March 24, 2022, 5:03pm
3
Ok, thank you for the answer which contained a lot of facts about User/Icinga2.
I have found a Topic about running plugins as root.
https://community.icinga.com/t/running-plugin-as-root/4495
or/and
https://icinga.com/docs/icinga-2/latest/doc/22-selinux/#running-plugins-requiring-sudo
How would you solve the problem? Do you have a example configuration?