check_ncpa.py plugin issue

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

check_ncpa.py plugin issue

Postby nickanderson1982 » Thu Feb 07, 2019 8:44 pm

I finally setup my nagios and I was starting to edit cfg files with new hosts.
I'm having an issue where it seems like check_ncpa.py plugin isn't working because everything polling is not communicating and listed as critical.
When I do my pre flight check everything is ok with no errors. I'm not sure why this is not working. Now I only did ncpa and not nrdp
nickanderson1982
 
Posts: 44
Joined: Wed Feb 06, 2019 3:22 pm

Re: check_ncpa.py plugin issue

Postby scottwilkerson » Fri Feb 08, 2019 9:14 am

Can you show the commands you have configured for check_ncpa and the service cnfigurations?

Additionally, can you should the results of the commands being run from the command line?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 15398
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: check_ncpa.py plugin issue

Postby nickanderson1982 » Fri Feb 08, 2019 9:44 am

command.cfg
define command {
command_name check_ncpa
command_line $USER1$/check_ncpa.py -H $HOSTADDRESS$ $ARG1$


Sample of one of my host.cfg files:
define host {
host_name host
address xxx.xxx.xxx.xxx
check_command check_ncpa!-t 'token' -P 5693 -M system/agent_version
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
contacts nagiosadmin
notification_interval 60
notification_period 24x7
notifications_enabled 1
icon_image ncpa.png
statusmap_image ncpa.png
register 1
}

define service {
host_name host
service_description CPU Usage
check_command check_ncpa!-t 'token' -P 5693 -M cpu/percent -w 50 -c 80 -q 'aggregate=avg'
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contacts nagiosadmin
register 1
}

define service {
host_name host
service_description Memory Usage
check_command check_ncpa!-t 'token' -P 5693 -M memory/virtual -w 50 -c 80 -u G
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contacts nagiosadmin
register 1
}

define service {
host_name host
service_description Process Count
check_command check_ncpa!-t 'token' -P 5693 -M processes -w 150 -c 200
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contacts nagiosadmin
register 1
}

define service {
host_name host
service_description Disk Usage
check_command check_ncpa!-t 'token' -P 5693 -M 'disk/logical/C:|/used_percent' -w 80 -c 90
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contacts nagiosadmin
register 1
}

I'm not sure if this is what you mean:
[root@name objects]# check_ncpa!-t token -P 5693 -M 'disk/logical/C:|/used_percent' -w 80
check_ncpatar xvf check_ncpa.tar.gz token -P 5693 -M 'disk/logical/C:|/used_percent' -w 80
bash: check_ncpatar: command not found

I'm seeing this in the status information on the gui monitor:
Usage: check_ncpa.py [options] and everything is listed on as critical
nickanderson1982
 
Posts: 44
Joined: Wed Feb 06, 2019 3:22 pm

Re: check_ncpa.py plugin issue

Postby scottwilkerson » Fri Feb 08, 2019 9:53 am

What I meant was what if you run this, what do you get? (replacing xxx.xxx.xxx.xxx and token)

Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -H xxx.xxx.xxx.xxx -t 'token' -P 5693 -M 'disk/logical/C:|/used_percent' -w 80 -c 90


Also, if token contains special chars, specifically ! this could be a problem in the GUI
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 15398
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: check_ncpa.py plugin issue

Postby nickanderson1982 » Fri Feb 08, 2019 10:52 am

You were correct on the ! character in the token. I can't believe that was the issue. Thank you for pointing that out everything is working as intended now. I appreciate the assistance.
nickanderson1982
 
Posts: 44
Joined: Wed Feb 06, 2019 3:22 pm


Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 11 guests