help on correct path for passive disk check

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
techgeek
Posts: 18
Joined: Mon Mar 25, 2019 5:50 am

help on correct path for passive disk check

Post by techgeek »

Hey Folks,

Using ncpa passive checs to monitor disk space. Works fine for and the ones below except the very last one on the list (the linuxsfs9).

[root@serverx tmp]# df -h

Filesystem Size Used Avail Use% Mounted on
/dev/sda3 976M 616M 309M 67% /
tmpfs 37G 0 37G 0% /dev/shm
/dev/sda1 186M 116M 62M 66% /boot
/dev/mapper/vg00-home
2.0G 102M 1.8G 6% /home
/dev/mapper/vg00-opt 2.9G 924M 1.9G 33% /opt
/dev/mapper/vg00-tidal
2.0G 3.0M 1.9G 1% /opt/Tidal
/dev/mapper/vg00-tmp 12G 674M 11G 6% /tmp
/dev/mapper/vg00-usr 2.9G 951M 1.9G 34% /usr
/dev/mapper/vg00-var 2.9G 791M 2.0G 29% /var
/dev/mapper/disk1-oracle
50G 31G 17G 65% /home/oracle
/dev/mapper/disk1-admin
3.0G 4.6M 2.8G 1% /home/admin
/dev/mapper/disk1-root
30G 6.4G 22G 23% /root
/dev/mapper/disk1-software
50G 30G 18G 63% /software
/dev/mapper/disk1-devtmp
5.0G 11M 4.7G 1% /devtmp
/dev/mapper/disk2-u01
964G 523G 393G 58% /u01
/dev/mapper/vg00-crash
1.8G 769M 936M 46% /var/crash
linuxsfs9.glb.itcs.mycompany.net:/FileShare_PROD
500G 226G 275G 46% /profileshare

so in the nrdp config I have the below and again all good except Nagios GUI reports "UNKNOWN: The node (profileshare) requested does not exist."

# ***Disk space check - monitor mount points eg. var ***
%HOSTNAME%|File System Check U01 = /disk/logical/|u01/used_percent --warning 80 --critical 90
%HOSTNAME%|File System Check Usr = /disk/logical/|usr/used_percent --warning 80 --critical 90
%HOSTNAME%|File System Check Var = /disk/logical/|var/used_percent --warning 80 --critical 90
%HOSTNAME%|File System Check Profileshare = /disk/logical/|profileshare/used_percent --warning 80 --critical 90
%HOSTNAME%|File System Check Home Oracle = /disk/logical/|home|oracle/used_percent --warning 80 --critical 90

Can anyone tell me what I'm doing wrong - it's probably something very simple but I've tried all sorts or permutations for the /profileshare path and it just will not work. if itype cd /profileshare at command prompt it takes me right in.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: help on correct path for passive disk check

Post by benjaminsmith »

Hi,

The passive configuration definitions look OK. Can share the permissions of this mount point along with the permissions of one those that are working correctly?

Also, try to log into the GUI for NCPA, and let me know if the mount point is showing up in the API. The web guide is available at https://<ip address>:5693
ncpa-api.png
Benjamin
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
techgeek
Posts: 18
Joined: Mon Mar 25, 2019 5:50 am

Re: help on correct path for passive disk check

Post by techgeek »

Hi,
Yeah turned out it was a permissions thing which threw me off as if I become Nagios and do a df -h I can see the % of all the mount points so I didn't join the dots until you said it.

Can't change the permissions so have done a custom script instead - below for reference for anyone else that may need to do the same

#!/bin/bash

RESULT=$(df -h | grep /profileshare | awk '{ print $4 }' | sed 's/%//g')
PERCENTAGE=$(df -h | grep /profileshare | awk '{ print $4 }')



if [ "$RESULT" -ge "80" ]; then
echo "WARNING: Used_percent was $RESULT%"
exit 1

else

if [ "$RESULT" -ge "90" ]; then
echo "CRITICAL: Used_percent was $RESULT%"
exit 2

else

echo "OK: Used_percent was $RESULT%"


exit 0


fi
fi
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: help on correct path for passive disk check

Post by scottwilkerson »

Thanks for sharing your solution!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked