FS monitoring not working fine on Cent-OS machine

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jyoti22
Posts: 254
Joined: Mon Mar 23, 2015 4:50 am

FS monitoring not working fine on Cent-OS machine

Post by jyoti22 »

Hi,
I have installed NRPE agent on cent-os server. This server has below FS however I can see only 1 FS on XI console.
Kindly help to monitor all 3 FS (/,/u1,/boot)
[root@Neagle ~]# df -k
/ (/dev/sda3 ): 2307056 blocks 256150 i-nodes
/dev/shm (tmpfs ): 1027172 blocks 256792 i-nodes
/boot (/dev/sda1 ): 66110 blocks 25650 i-nodes
/u1 (/dev/sda5 ): 64969616 blocks 4389802 i-nodes

In nrpe.cfg file, we have updated commands like this
command[check_disk]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/sda1
command[check_disk]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/sda3
command[check_disk]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/sda5

On XI console, we get out as below. It shows only /u1 parameter and not /boot and /
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: FS monitoring not working fine on Cent-OS machine

Post by rkennedy »

In NRPE's mind, you have defined the same command 3 times, you'll need to assign different ones to each check. Then, update your Nagios services to correspond with how you updated.

Code: Select all

command[check_disk]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/sda1
command[check_disk]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/sda3
command[check_disk]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/sda5
Could be changed to this for example -

Code: Select all

command[check_disk1]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/sda1
command[check_disk2]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/sda3
command[check_disk3]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/sda5
Then, update your XI service definition to use check_disk1 rather then check_disk. Do the same for the additional ones as well.
Former Nagios Employee
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: FS monitoring not working fine on Cent-OS machine

Post by bwallace »

Not exactly on topic, but there is a Linux Server Wizard in XI which makes this very easy - you specify whatever mount points you want to monitor (provided you have NRPE installed on the target machine)--
https://www.youtube.com/watch?v=NjlDHvNkpes
Be sure to check out the Knowledgebase for helpful articles and solutions!
jyoti22
Posts: 254
Joined: Mon Mar 23, 2015 4:50 am

Re: FS monitoring not working fine on Cent-OS machine

Post by jyoti22 »

Thanks a lot!
My issue got resolved and I am able to monitor all FS on the server. You can lock this post.
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: FS monitoring not working fine on Cent-OS machine

Post by bwallace »

Glad to hear its resolved! I'll go ahead and lock this thread now.
Be sure to check out the Knowledgebase for helpful articles and solutions!
Locked