mount point monitoring through NCPA
-
sunnynani4849
- Posts: 31
- Joined: Fri Jan 22, 2016 1:04 am
mount point monitoring through NCPA
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
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
Hi @sunnynani4849,
It looks like the command arguments are not being passed correctly,
Try this, without -a and without agent
Or this one
The output should be like this.
Post your output or let me know if this helps
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'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'Code: Select all
DISK OK - free space: / 17556 MB (67.01% inode=91%);| /=8640MB;24838;22078;0;2759-
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
Thanks for the assist @kyang!
-
sunnynani4849
- Posts: 31
- Joined: Fri Jan 22, 2016 1:04 am
Re: mount point monitoring through NCPA
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.
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
Hi @sunnynani4849,
Instead of passing the -p
try passing
Let me know if this helps you.
Instead of passing the -p
try passing
Code: Select all
'w 10% -c 20% -M /opt'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
Hi kyang,
After changing the option to -m for the mount point but still getting the same issue.
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.
Re: mount point monitoring through NCPA
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
hi tgriep,
on the client server NCPA 2.0.2 rpm is installed on the server. Please find the attached NCPA configuration file
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.
Re: mount point monitoring through NCPA
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.
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.
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
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
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
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.