How to monitor the mount point using NCPA agent

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
IT-OPS-SYS
Posts: 184
Joined: Sun Jan 07, 2018 12:56 pm

How to monitor the mount point using NCPA agent

Post by IT-OPS-SYS »

hi team,

I am trying to monitor a mount point disk on one of my RHEL systems which has latest NCPA agent installed on it.
mount point is :/banapp

command used in the Nagios XI is below:

/usr/local/nagios/libexec/check_ncpa.py -H 149.24.41.83 -t 'token' -P 5693 -M 'disk/mount/|banapp' -D -v
Connecting to: https://149.24.41.83:5693/api/disk/moun ... lk&check=1
File returned contained:
{
"returncode": 3,
"stdout": "UNKNOWN: The node (/banapp) requested does not exist."
}
UNKNOWN: The node (/banapp) requested does not exist.

When I tried other partition, I am able to run this command to get the boot disk space as below:

/usr/local/nagios/libexec/check_ncpa.py -H 149.24.41.83 -t 'cFvgpWMXjaZojGlk' -P 5693 -M 'disk/logical/|boot' -D -v
Connecting to: https://149.24.41.83:5693/api/disk/logi ... n>&check=1
File returned contained:
{
"returncode": 0,
"stdout": "OK: Used disk space was 27.40 % (Used: 0.27 GiB, Free: 0.72 GiB, Total: 0.99 GiB) | 'used'=0.27GiB;;; 'free'=0.72GiB;;; 'total'=0.99GiB;;;"
}
OK: Used disk space was 27.40 % (Used: 0.27 GiB, Free: 0.72 GiB, Total: 0.99 GiB) | 'used'=0.27GiB;;; 'free'=0.72GiB;;; 'total'=0.99GiB;;;


M I missing anything or could you please provide me the way to monitor the mount point un my RHEL machine using the NCPA.
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: How to monitor the mount point using NCPA agent

Post by dchurch »

What are the outputs from the following commands (on the RHEL machine you want to monitor):

Code: Select all

mount
df -h
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
IT-OPS-SYS
Posts: 184
Joined: Sun Jan 07, 2018 12:56 pm

Re: How to monitor the mount point using NCPA agent

Post by IT-OPS-SYS »

df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 15G 0 15G 0% /dev
tmpfs 15G 0 15G 0% /dev/shm
tmpfs 15G 42M 15G 1% /run
tmpfs 15G 0 15G 0% /sys/fs/cgroup
/dev/mapper/rhel-root 50G 14G 37G 27% /
/dev/sda1 1014M 279M 736M 28% /boot
/dev/sdb1 40G 9.3G 29G 25% /u01
/dev/mapper/rhel-home 26G 33M 26G 1% /home
tmpfs 2.9G 0 2.9G 0% /run/user/511
10.xx.xx.xx:/u02/banapp 74G 68G 2.9G 96% /banapp
tmpfs 2.9G 0 2.9G 0% /run/user/0

mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=14990836k,nr_inodes=3747709,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,seclabel,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,devices)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,pids)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,net_prio,net_cls)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,cpuacct,cpu)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,freezer)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,cpuset)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,perf_event)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,hugetlb)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,blkio)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/mapper/rhel-root on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=22,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=11462)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime,seclabel)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sda1 on /boot type xfs (rw,nodev,relatime,seclabel,attr2,inode64,noquota)
/dev/sdb1 on /u01 type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/rhel-home on /home type xfs (rw,nosuid,nodev,relatime,seclabel,attr2,inode64,noquota)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
tmpfs on /run/user/511 type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=3000548k,mode=700,uid=511,gid=511)
xx.xx.xx.xx:/u02/banapp on /banapp type nfs (rw,relatime,vers=3,rsize=32768,wsize=32768,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=xx.xx.xx.xx,mountvers=3,mountport=855,mountproto=udp,local_lock=none,addr=xx.xx.xx.xx)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=3000548k,mode=700)

and i wanted to monitor the mount point /banapp on this RHEL machine. I am using NCPA agent on this machine.

Moderator's Note: This post has been edited to omit potentially sensitive information.
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: How to monitor the mount point using NCPA agent

Post by dchurch »

That's an NFS mount. By default ncpa.cfg excludes NFS mounts. You'll want to un-exclude nfs mounts by editing ncpa.cfg and edit exclude_fs_types to not include nfs.

Then restart the ncpa listener process.
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
IT-OPS-SYS
Posts: 184
Joined: Sun Jan 07, 2018 12:56 pm

Re: How to monitor the mount point using NCPA agent

Post by IT-OPS-SYS »

that really worked for me. thanks and close the thread
Locked