Skip to main content
Hello,For the past few days, I've been looking into using Centreon to monitor my IT infrastructure.I installed Centreon 24.10.7 on a VM, then a few hosts and services.My Windows servers are being monitored, butI'm struggling with how to view the status of the disks in a Qnap NAS.I'm monitoring the volumes, but I haven't figured out where to tell Centreon how to check the NAS disks to be notified if they're faulty.Thank you for your help.Eric
I'm making progress thanks to you: from the Centreon server, the nmap command tells me that port 5666 is not open on my remote CentOS

 


on the server to be monitored, the nrpe daemon is active
 

 


for the question asked, telnet cannot reach the host

 


That's it, port 5666 is listening. Phew (and thanks!). My last issue is syntax-related, I think. The service tells me that the "test.txt" file is not present on my server to be monitored (/mnt/save_bali/test.txt). Attached is the result of the command from Centreon and from the interface.

 

 


hmm you are not running a command, your first parameter is the plugin folder (on the screenshot), that’s why you get an error message, this is saying you execute a folder, not a command…

 

next, I think you want to use the “is file” not the “is not file”

this are the default values for the service template, do not remove the command

 


Hello Christophe,By modifying as follows, the command still doesn't execute.

 


I'm making progress in my research. I've created the following command:

 

and the result of the execution:

 


you can stay on the shell to debug now with this command

nrpe needs some command line option to work, and also some config on the host you want to monitor

that error is usually because there are some ssl config to do in the nrpe.cfg of the host

 

at this point I have no idea how you installed the nrpe daemon on the centos host. if you installed it following the centreon documentation the nrpe.cfg sould be correctly configured

I think mostly that step 2 in this procedure : Linux NRPE4 | Centreon Documentation, the first line with “sed” for the “dont blame nrpe” settings (if you google your error message most of the error I can see since 10 years ago are for that parameter)

 

after that, it’s outside what I can do to help you, I have no idea how to configure ssl on nrpe, all I know is you can disable the ssl on the command check with “-n” for “no ssl”


I have a serious doubt:Is the IP address of POLLER_IP_ADDRESS the same as my Centreon server?sed -i 's/allowed_hosts=127.0.0.1,::1/allowed_hosts=POLLER_IP_ADDRESS/' /etc/nagios/nrpe.cfg

REPLACE…

 

the default ip address allowed is 127.0.0.1, that “sed” command replace the content of the file from 127.0.0.1 to the ip of your poller/central you need to input


Hello Christophe,In the same vein, you can discover partitions and monitor space usage with the rule "OS-Linux-NRPE4-Disk-Name".I tried, but the result is "execute command failed".Here is a screenshot of the settings.
Should I indicate the values?

“execute command failed” is almost always a configuration issue/missing installation steps, not a parameter issue

you need to generate a command, copy it from the ui (from the detail panel) and run it in the shell to see what is the error you get


in desperation, I turn to the "chek_by_ssh" plugin.

but the problem probably comes from the syntax because the result received is "0" (whether or not the test.txt file is there).

Additionally, I copied the public key so that SSH commands no longer require a password, but the password is still requested from console mode.

Best regards,


remember that the ssh key is in the user “centreon-engine” not “root”, you shoud do a “su - centreon-engine”  to be in the same “environnement” to run the check command

the check by ssh will run a command on the remote host, as said in a post above

you want to run something, like “ls yourfile”, ls will return 0 if the file exists and 2 if the file is not present

 


Indeed, the behavior of the "centreon-engine" user is different. Thanks for the tip. I'm having trouble getting the result to show me an alert if the iSCSI link isn't mounted. Should I create a command from "configuration/commands/checks" with the "check_by_ssh" command line, or should I go directly through a "service by hosts" using the "OS-Linux-Is-Not-File-Generic-NRPE4" template?

Best regards,


Reply