Check for RO File system

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
disrael
Posts: 116
Joined: Tue Jun 19, 2012 3:16 pm

Check for RO File system

Post by disrael »

We had an issue the other day where an issue with our VMs where a couple of servers made the file systems turn read only. This caused some issues. I did a quick google and saw a few options on your site. I am thinking the first one might be the best, though I wanted to get your guys opinion first: https://www.google.com/search?q=nagios+ ... e&ie=UTF-8

My manager requested that I look into this and he specified the solution shouldn't use root.

-Doron
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Check for RO File system

Post by slansing »

Hey Doron, I'd recommend searching Exchange next time so you get a clean search result that does not grab random bits of other web pages, etc.. This plugin looks as if it would be a good fit for you:

http://exchange.nagios.org/directory/Pl ... ts/details

How does it look?
disrael
Posts: 116
Joined: Tue Jun 19, 2012 3:16 pm

Re: Check for RO File system

Post by disrael »

I see nothing to specify host name, can this script be executed remotely against a server we are wanting to monitor?

-Doron
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Check for RO File system

Post by sreinhardt »

You are correct, this does not seem to allow remote execution within the script itself. However you could run either with check_by_ssh or through a local nrpe client on that server. There may also be a linux snmp oid that can be checked for this information as well.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
disrael
Posts: 116
Joined: Tue Jun 19, 2012 3:16 pm

Re: Check for RO File system

Post by disrael »

Does nrpe require root to be installed or run?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Check for RO File system

Post by abrist »

NRPE requires root for installation. It runs as user nagios, but the plugin may require root.
Just FYI: Most plugins that are checking the disk/filesystem want root access. You could write a custom script that runs mount -l and greps the output for (ro) and returns a string with a proper exit code. This requires that standard users have access to the mount bin.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked