Unable to activate the check_ro_mount service

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
IT-OPS-SYS
Posts: 184
Joined: Sun Jan 07, 2018 12:56 pm

Unable to activate the check_ro_mount service

Post 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.
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

Post 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?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
IT-OPS-SYS
Posts: 184
Joined: Sun Jan 07, 2018 12:56 pm

Re: Unable to activate the check_ro_mount service

Post 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.
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

Post 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

Code: Select all

$USER1$/check_ro_mount.pl
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
IT-OPS-SYS
Posts: 184
Joined: Sun Jan 07, 2018 12:56 pm

Re: Unable to activate the check_ro_mount service

Post 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.
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

Post 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?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
IT-OPS-SYS
Posts: 184
Joined: Sun Jan 07, 2018 12:56 pm

Re: Unable to activate the check_ro_mount service

Post 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.
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

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
IT-OPS-SYS
Posts: 184
Joined: Sun Jan 07, 2018 12:56 pm

Re: Unable to activate the check_ro_mount service

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Unable to activate the check_ro_mount service

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked