Unable to activate the check_ro_mount service
-
IT-OPS-SYS
- Posts: 184
- Joined: Sun Jan 07, 2018 12:56 pm
Unable to activate the check_ro_mount service
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.
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.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Unable to activate the check_ro_mount service
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.plIT-OPS-SYS wrote:execvp(check_ro_mount, ...) failed. errno is 2: No such file or directory.
Can you share the command you created in Nagios?
-
IT-OPS-SYS
- Posts: 184
- Joined: Sun Jan 07, 2018 12:56 pm
Re: Unable to activate the check_ro_mount service
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.
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.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Unable to activate the check_ro_mount service
This looks closer, it looks like you are missing a forwardslashIT-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.
Code: Select all
$USER1$/check_ro_mount.pl-
IT-OPS-SYS
- Posts: 184
- Joined: Sun Jan 07, 2018 12:56 pm
Re: Unable to activate the check_ro_mount service
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.
can you help me with the command (check_ro_mount) for checking the read only machines alert/service in Nagios.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Unable to activate the check_ro_mount service
Great!IT-OPS-SYS wrote:after adding the slash it worked for me. thanks
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?IT-OPS-SYS wrote:can you help me with the command (check_ro_mount) for checking the read only machines alert/service in Nagios.
-
IT-OPS-SYS
- Posts: 184
- Joined: Sun Jan 07, 2018 12:56 pm
Re: Unable to activate the check_ro_mount service
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.
i have nrpe on the guest and can we integrate the check_ro_mount with nrpe, if yes then how can we do that.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Unable to activate the check_ro_mount service
You would need to install the plugin on each of the machines, then add something like the following to the nrpe.cfg
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
Code: Select all
command[check_ro_mount]=/usr/local/nagios/libexec/check_ro_mount.plthen 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
-
IT-OPS-SYS
- Posts: 184
- Joined: Sun Jan 07, 2018 12:56 pm
Re: Unable to activate the check_ro_mount service
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
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.
Be sure to check out our Knowledgebase for helpful articles and solutions!