Nagios and NCPA

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
cerino
Posts: 9
Joined: Mon Jun 05, 2017 10:22 am

Re: Nagios and NCPA

Post by cerino »

Hi lmiltchev,
that's the result...

/usr/local/nagios/libexec/check_ncpa.py -H 10.1.3.4 -P 5693 -t mytoken -M 'disk/logical/C:|/used_percent' -w 80 -c 90
The node (C:|) requested does not exist. You may be trying to access the '|' node.

/usr/local/nagios/libexec/check_ncpa.py -H 10.1.3.4 -P 5693 -t mytoken -M 'disk/logical/C:|/used_percent' -w 80 -c 90 -vvv
Connecting to: https://10.1.3.4:5693/api/disk/logical/ ... 90&check=1
File returned contained:
{
"returncode": 3,
"stdout": "The node (C:|) requested does not exist. You may be trying to access the '|' node."
}
The node (C:|) requested does not exist. You may be trying to access the '|' node.


That is what I see in the NCPA web console:

disk/logical/|sys/used_percent
Current 0.00 % Min 0.00 % Max 0.00 % Average 0.00 %
disk/logical/|proc/used_percent
Current 0.00 % Min 0.00 % Max 0.00 % Average 0.00 %
disk/logical/|boot/used_percent
Current 19.80 % Min 19.80 % Max 19.80 % Average 19.80 %
disk/logical/|dev|pts/used_percent
Current 0.00 % Min 0.00 % Max 0.00 % Average 0.00 %
disk/logical/|dev|shm/used_percent
Current 0.00 % Min 0.00 % Max 0.00 % Average 0.00 %
disk/logical/|/used_percent
Current 28.20 % Min 28.20 % Max 28.20 % Average 28.20 %
disk/logical/|proc|sys|fs|binfmt_misc/used_percent
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios and NCPA

Post by lmiltchev »

This looks like a Linux system... Do you actually have a "C:" drive on 10.1.3.4?
Be sure to check out our Knowledgebase for helpful articles and solutions!
cerino
Posts: 9
Joined: Mon Jun 05, 2017 10:22 am

Re: Nagios and NCPA

Post by cerino »

Do you actually have a "C:" drive on 10.1.3.4?
The FTP server I would like to monitor has a CentOS 6.9 System on board, partitions are shown in the previews post, sorry but I don't understand your question.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios and NCPA

Post by lmiltchev »

I was referring to this:
Now I have another question about check command syntax.
As you can see in the attached screen capture probably there's something wrong in the definition service I wrote in Nagios Config file:

define service{
use generic-service
host_name ftp-server
service_description Disk Usage
check_command check_ncpa!-t 'mytoken' -P 5693 -M disk/logical/C:| -w 80 -c 90
}

My goal is to monitor all disk partitions and send an alert message when 80% of disk usage is reached or a critical alert when 90% of disk usage is reached.

Thank you for your patient!
example01.PNG
What is the IP of the ftp-server? If this is a CentOS 6.9 system, you shouldn't have a "C:" drive there... and yes, I saw the partitions in your previous post, that's why I am puzzled about the "C:" drive...

To monitor these partitions, you could run something like this:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H 10.1.3.4 -P 5693 -t mytoken -M 'disk/logical/|/used_percent' -w 80 -c 90
/usr/local/nagios/libexec/check_ncpa.py -H 10.1.3.4 -P 5693 -t mytoken -M 'disk/logical/|proc/used_percent' -w 80 -c 90
/usr/local/nagios/libexec/check_ncpa.py -H 10.1.3.4 -P 5693 -t mytoken -M 'disk/logical/|boot/used_percent' -w 80 -c 90
Be sure to check out our Knowledgebase for helpful articles and solutions!
cerino
Posts: 9
Joined: Mon Jun 05, 2017 10:22 am

Re: Nagios and NCPA

Post by cerino »

Thank you lmiltchev!!!
Of course partition C does not exixt, it's CentOS, but looking in the help section of NCPA web site every reference to the partitions is described by letter C, so I thought it was a feature of the plugin, but obviously it is not.
Now works fine and all partition can be monitored.

I attach an exemple of service definition that works ;-)

define service{
use generic-service
host_name ftp-server
service_description Sys Usage
check_command check_ncpa!-t 'mytoken' -P 5693 -M 'disk/logical/|sys/used_percent' -w 80 -c 90
}

Thank you so much!
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios and NCPA

Post by lmiltchev »

I am glad I could help! :)
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked