Page 1 of 5

How to view all the Mount Points on Linux

Posted: Fri Mar 04, 2016 5:07 am
by systemali
Hello,

I can see all the basic details of my server under Nagios ( /, Load, Memory, Ping )

But I need to also view all the mount points on the server, how can i see that ?

Any assistance please ?

Thank you

Re: How to view all the Mount Points on Linux

Posted: Fri Mar 04, 2016 10:16 am
by eloyd

Code: Select all

/usr/local/nagios/libexec/check_disk -h
Notice that you can specify multiple mount points:

Code: Select all

./check_disk -w 10% -c 5% -p / -p /boot
However, this will only alert if ANY of them are in a warning/critical state. You may want to simply create a separate service for each file system so you can alert on each on separately.

Re: How to view all the Mount Points on Linux

Posted: Fri Mar 04, 2016 10:55 am
by rkennedy
Thanks @eloyd! It should be /usr/local/nagios/libexec/check_disk -h to check the help menu.

@systemali - let us know if you have any further questions,

Re: How to view all the Mount Points on Linux

Posted: Fri Mar 04, 2016 10:59 am
by eloyd
Edited. Thanks for the catch.

Re: How to view all the Mount Points on Linux

Posted: Fri Mar 04, 2016 3:05 pm
by hsmith
Thanks Eric :)

Re: How to view all the Mount Points on Linux

Posted: Sat Mar 05, 2016 8:45 am
by systemali
Hey Eloyd and the gang,

Thank you all for your valuable inputs and enlightening me on this.

Yes, i am aware of this "/usr/local/nagios/libexec/check_disk -h" and its help functions,

But as Eloyd mentioned, I will have to create separate service for each file system, Can somebody
please explain me, how do i go about doing that ?

Coz i need to monitor all my servers and their partitions whether critical or not !!

Thank you all once again :)

Cheers !

Re: How to view all the Mount Points on Linux

Posted: Sat Mar 05, 2016 2:54 pm
by eloyd
If this is not something you are comfortable doing or have the knowledge to do, then you will have a tough time managing a Nagios installation. While Nagios is simple in its approach, it can be quite complex to manage and maintain a large installation. You need the basic skills of adding and removing hosts and service checks, and you should be comfortable moving around within the Nagios configuration files. Some basic information is available at https://assets.nagios.com/downloads/nag ... n/toc.html. I recommend you start with the section titled "Configuring Nagios."

In addition to that basic knowledge, assuming you need to monitor this information on remote hosts, you will need to be familiar with SSH, NRPE, or some other agent/wrapper to be able to execute the checks on the remote host and have the results appear within Nagios. There are a number of way to do this, and you should start with the "Monitoring Linux hosts" on the URL that I sent you above.

Having said that, here are two approaches that might help you in the right direction:

Simplest way: Log in to your Nagios server, navigate to the directory that contains your current configuration, and then duplicate the service block that is in the services.cfg file and change the host and mount point for each new section you add to point to the appropriate server and mount point.

Better way: Same as above, but assign the service(s) to a hostgroup and then assign the hostgroup to the machine(s) that needs to be monitored.

Re: How to view all the Mount Points on Linux

Posted: Sat Mar 05, 2016 5:27 pm
by nozlaf
is there honestly no plugin to monitor a linux host that works the same way as the command on nsclient++?
because with nsclient++ you can just set it to check all disks and it reports

Code: Select all

OK: All drives within bounds"
and the performance data reports back all the disks

Code: Select all

C:\ %'=30%;10;5 'C:\'=70.73G;9.9;4.99;0;99 'D:\ %'=19%;10;5 'D:\'=24.3G;3;1;0;29.99
I don't monitor many linux hosts and I generally setup mine the same every time and use pynag to replicate it automatically so its not hard for me but seems like if someone did write a plugin that worked this way they would be somewhat of a legend

Re: How to view all the Mount Points on Linux

Posted: Sun Mar 06, 2016 7:24 pm
by Box293
I'm waiting for the lunix version NSClient++ to include a disk checking module, currently that module is only for Windows.

Re: How to view all the Mount Points on Linux

Posted: Mon Mar 07, 2016 12:53 am
by systemali
Hello Everyone,

In my quest for an nsclient++ variant for linux, i came across these 2 links, which sound like they have achieved what we are all looking
for, but i am still doubtful and skeptical.

https://nsclient.org/download/

https://www.nsclient.org/blog/2014/12/0 ... entos-7-0/

Wanted to know if aybody has ever tired them and what was the outcome !!!

Can anybody share their views about it ?

Thank you