Linux File System Read Only Check
Linux File System Read Only Check
I need to remotely periodically check if a Linux file system is mounted read only on lots of servers. I found this plugin, http://exchange.nagios.org/directory/Pl ... ts/details, but wondering if there is another way to use nrpe or a plugin already deployed. Trying to avoid deploying a plugin to all these Linux servers.
Re: Linux File System Read Only Check
I believe the check_disk option is what you'd normally be looking for, but I do not see an option to check if it's a read only file system.
Your best bet is using the plugin you linked already in conjunction with NRPE.
Your best bet is using the plugin you linked already in conjunction with NRPE.
Former Nagios Employee
Re: Linux File System Read Only Check
That's what I was afraid of. I configured and deployed the file to a test server but when I try to get back results from nagios I am getting this message:
Can't find string terminator '"' anywhere before EOF at ./check_ro_mounts.pl line 56.
Can't find string terminator '"' anywhere before EOF at ./check_ro_mounts.pl line 56.
Re: Linux File System Read Only Check
What OS is the test server running? I was unable to replicate this issue against CentOS 6 using the unmodified file on the exchange.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Linux File System Read Only Check
These are SUSE boxes, SLES 11sp4 primarily and a handful of 12sp1.
Re: Linux File System Read Only Check
The error you posted looks like the script may be corrupted in that line.
That line prints out an message that it cannot open the mtab file.
Can you upload the script here so we can view it and also how you ran it on that server?
That line prints out an message that it cannot open the mtab file.
Can you upload the script here so we can view it and also how you ran it on that server?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Linux File System Read Only Check
I added the txt extension so I could upload to the board. I tested this on a test Nagios server running CentOS 6.8 and got the same results.
[nagios@nagiosl1t libexec]$ ./check_ro_mounts.pl
Can't find string terminator '"' anywhere before EOF at ./check_ro_mounts.pl line 56.
[nagios@nagiosl1t libexec]$ ./check_ro_mounts.pl
Can't find string terminator '"' anywhere before EOF at ./check_ro_mounts.pl line 56.
You do not have the required permissions to view the files attached to this post.
Re: Linux File System Read Only Check
Ah, it looks like only half of the plugin was downloaded to the server and that is causing the issue.
Go back to that site, download the plugin to your PC, then in the Nagios XI GUI, go to the Admin > Manage Plugins menu, brows to the plugin on your PC and upload it.
That should fix it for you.
Go back to that site, download the plugin to your PC, then in the Nagios XI GUI, go to the Admin > Manage Plugins menu, brows to the plugin on your PC and upload it.
That should fix it for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Linux File System Read Only Check
You can close this up.
That fixed the problem. Thanks!
That fixed the problem. Thanks!