Page 1 of 2
Unable to activate the check_ro_mount service
Posted: Tue Jun 11, 2019 8:49 am
by IT-OPS-SYS
downloaded the perl file from the :
https://exchange.nagios.org/directory/P ... ts/details
kept the file under: /usr/local/nagios/libexec
chmod 777 check_ro_mount.pl
chown nagios check_ro_mount.pl
when I am trying to run the script on the nagios server, output below
[root@cvrmnagiosxi001 libexec]# ./check_ro_mount.pl
RO_MOUNTS CRITICAL: Found ro mounts: /sys/fs/cgroup
I created the command in the nagios and then created service with the available plugin: check_ro_mount.
after adding the service to one of the host, i see the below error in nagios GUI :
execvp(check_ro_mount, ...) failed. errno is 2: No such file or directory.
any help on how to use the check_ro_mount will be appreciated.
Re: Unable to activate the check_ro_mount service
Posted: Tue Jun 11, 2019 11:16 am
by scottwilkerson
IT-OPS-SYS wrote:execvp(check_ro_mount, ...) failed. errno is 2: No such file or directory.
when you created the command in Nagios did you forget to add the .pl to the command? The error is looking for check_ro_mount but your plugin name is check_ro_mount.pl
Can you share the command you created in Nagios?
Re: Unable to activate the check_ro_mount service
Posted: Tue Jun 11, 2019 12:15 pm
by IT-OPS-SYS
my command is ./check_ro_mount.pl and I have made the command as ./check_ro_mount.pl.
when I run this command in nagios server I get the below output:
[root@cvrmnagiosxi001 libexec]# ./check_ro_mount.pl
RO_MOUNTS CRITICAL: Found ro mounts: /sys/fs/cgroup
but in the services we see the same error : (No output on stdout) stderr: execvp(/usr/local/nagios/libexeccheck_ro_mount.pl, ...) failed. errno is 2: No such file or directory.
Do you have a sample command for this plugin, do let me know so that I can replicate the same.
Re: Unable to activate the check_ro_mount service
Posted: Tue Jun 11, 2019 1:14 pm
by scottwilkerson
IT-OPS-SYS wrote:but in the services we see the same error : (No output on stdout) stderr: execvp(/usr/local/nagios/libexeccheck_ro_mount.pl, ...) failed. errno is 2: No such file or directory.
This looks closer, it looks like you are missing a forwardslash
Re: Unable to activate the check_ro_mount service
Posted: Wed Jun 12, 2019 2:24 am
by IT-OPS-SYS
after adding the slash it worked for me. thanks
can you help me with the command (check_ro_mount) for checking the read only machines alert/service in Nagios.
Re: Unable to activate the check_ro_mount service
Posted: Wed Jun 12, 2019 6:52 am
by scottwilkerson
IT-OPS-SYS wrote:after adding the slash it worked for me. thanks
Great!
IT-OPS-SYS wrote:can you help me with the command (check_ro_mount) for checking the read only machines alert/service in Nagios.
Not really sure what you mean by this? Are you looking to add this plugin to other machines to monitor with an agent such as NRPE?
Re: Unable to activate the check_ro_mount service
Posted: Wed Jun 12, 2019 8:04 am
by IT-OPS-SYS
yes that is what i am looking for. how can i use this plugin ./check_ro_mount.pl to monitor the other servers in the group.
i have nrpe on the guest and can we integrate the check_ro_mount with nrpe, if yes then how can we do that.
Re: Unable to activate the check_ro_mount service
Posted: Wed Jun 12, 2019 8:49 am
by scottwilkerson
You would need to install the plugin on each of the machines, then add something like the following to the nrpe.cfg
Code: Select all
command[check_ro_mount]=/usr/local/nagios/libexec/check_ro_mount.pl
then restart NRPE on the remote server
then from XI you can run the NRPE wizard and set the Remote NRPE Command to
check_ro_mount
OR
Setup a new service in the CCM, use the check_nrpe command and ser $ARG1$ to
check_ro_mount
Re: Unable to activate the check_ro_mount service
Posted: Wed Jun 12, 2019 9:16 am
by IT-OPS-SYS
is there any way other then installing the plugin to all the remote machines as we have more then 300 remote machine.
Re: Unable to activate the check_ro_mount service
Posted: Wed Jun 12, 2019 10:46 am
by lmiltchev
Unfortunately, the plugin is needed on the clients in order for you to be able to call it via check_nrpe from the Nagios XI server. Having said that, you could use some kind of mass deployment tool to install the plugin on the remote boxes, such as
Ansible.