mount point monitoring through NCPA

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sunnynani4849
Posts: 31
Joined: Fri Jan 22, 2016 1:04 am

mount point monitoring through NCPA

Post by sunnynani4849 »

Hi ,

Iam trying to monitor the mount point (/opt/splunk/var/lib/splunk/cold/) via NCPA agent. I have searched some website that mount point monitoring cannot be done via NCPA agent.
So i am trying to monitor this via check_disk plugin through the NCPA agent, but getting the below errors. Please help with the below issue
You do not have the required permissions to view the files attached to this post.
kyang

Re: mount point monitoring through NCPA

Post by kyang »

Hi @sunnynani4849,

It looks like the command arguments are not being passed correctly,

Try this, without -a and without agent

Code: Select all

-M 'plugins/check_disk/-w 10%/-c 20%/-p /tmp'
Or this one

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H 192.168.x.xxx -t '<token>' -M 'plugins/check_disk' -a '-w 10% -c 20% -p /tmp'
The output should be like this.

Code: Select all

DISK OK - free space: / 17556 MB (67.01% inode=91%);| /=8640MB;24838;22078;0;2759
Post your output or let me know if this helps
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: mount point monitoring through NCPA

Post by dwhitfield »

Thanks for the assist @kyang!
sunnynani4849
Posts: 31
Joined: Fri Jan 22, 2016 1:04 am

Re: mount point monitoring through NCPA

Post by sunnynani4849 »

Hi kyang,

Thanks for the update and sorry for the delay.

iam trying to monitor the mount points but its showing the output for only the '/' partition.
You do not have the required permissions to view the files attached to this post.
kyang

Re: mount point monitoring through NCPA

Post by kyang »

Hi @sunnynani4849,

Instead of passing the -p
try passing

Code: Select all

'w 10% -c 20% -M /opt'
disk.PNG
Let me know if this helps you.
You do not have the required permissions to view the files attached to this post.
sunnynani4849
Posts: 31
Joined: Fri Jan 22, 2016 1:04 am

Re: mount point monitoring through NCPA

Post by sunnynani4849 »

Hi kyang,

After changing the option to -m for the mount point but still getting the same issue.
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: mount point monitoring through NCPA

Post by tgriep »

What version of NCPA do you have installed in the remote system and can you post your ncpa.cfg file?
Be sure to check out our Knowledgebase for helpful articles and solutions!
sunnynani4849
Posts: 31
Joined: Fri Jan 22, 2016 1:04 am

Re: mount point monitoring through NCPA

Post by sunnynani4849 »

hi tgriep,

on the client server NCPA 2.0.2 rpm is installed on the server. Please find the attached NCPA configuration file
You do not have the required permissions to view the files attached to this post.
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: mount point monitoring through NCPA

Post by jomann »

The -M for check_disk is case sensitive, but it actually does not take a value at all. You can only specify using -p. The -M command only shows the mount point instead of the partition in the output.

Code: Select all

Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_nagios-lv_root
                       27G  8.9G   17G  35% /
tmpfs                 1.9G  440K  1.9G   1% /dev/shm
/dev/sda1             477M  127M  325M  29% /boot
The first run assumes / because you are not actually passing the -p value and -M displays the mount point. The second two are using a path, without -M. The last one uses -M and -p.

Code: Select all

[root@nagios libexec]# /usr/local/nagios/libexec/check_ncpa.py -H localhost -t 'mytoken' -M 'plugins/check_disk' -a '-w 10% -c 20% -M'
DISK OK - free space: /dev/mapper/vg_nagios-lv_root 17168 MB (65.53% inode=90%);| /dev/mapper/vg_nagios-lv_root=9028MB;24838;22078;0;27598

[root@nagios /]# /usr/local/nagios/libexec/check_ncpa.py -H localhost -t 'mytoken' -M 'plugins/check_disk' -a '-w 10% -c 20% -p /boot'
DISK OK - free space: / 17167 MB (65.53% inode=90%);| /=9028MB;24838;22078;0;27598

[root@nagios /]# /usr/local/nagios/libexec/check_ncpa.py -H localhost -t 'mytoken' -M 'plugins/check_disk' -a '-w 10% -c 20% -p /dev/shm'
DISK OK - free space: / 17167 MB (65.53% inode=90%);| /=9028MB;24838;22078;0;27598

[root@nagios libexec]# /usr/local/nagios/libexec/check_ncpa.py -H localhost -t 'mytoken' -M 'plugins/check_disk' -a '-w 10% -c 20% -p /boot -M'
DISK OK - free space: /dev/mapper/vg_nagios-lv_root 17167 MB (65.53% inode=90%);| /dev/mapper/vg_nagios-lv_root=9029MB;24838;22078;0;27598
Also it seems like the check_disk won't return the partition data, and if you wanted to get that, you could just do it with NCPA

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H localhost -t 'mytoken' -M 'disk/logical/|boot' -w 70 -c 90 -u M
OK: Used disk space was 28.10 % (Used: 132.94 MB, Total_size: 499.36 MB, Free: 340.20 MB) | 'used_percent'=28.10%;70;90;
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked