Check_disk_smb

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:
_CLI

It works on the commandline.

This is the result on the commandline:
Result_CLI

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

Pluging

Maybe there is something wrong with the SMBClient? Thank you for the help.

Best Regards

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.

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?