Nagios and NCPA
Posted: Tue Jun 06, 2017 5:26 am
Hi guys,
I've problem with Nagios Core and the plugin NCPA, that's the error:
(No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_ncpa.py, ...) failed. errno is 2: No such file or directory
ans that's the scenario:
Nagios Core 4.3.2 On CentOS 6.9
More than 40 Wiondow Server monitored by Nagios and NSCP succesfully
Client NCPA installed on a ContOS 6.9
Web UI run perfectly and port 5693 is open
NAGIOS CONFIGURATION
COMMAND DEFIN. CFG
define command {
command_name check_ncpa
command_line $USER1$/check_ncpa.py -H $HOSTADDRESS$ -p 5693 $ARG1$
}
TEMPLATE DEF CFG
define host {
name ncpa
hostgroups ncpa
use generic-host
check_command check_ncpa
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
contacts nagiosadmin
notification_interval 60
notification_period 24x7
notifications_enabled 1
register 0
}
SERVER FOLDER CONTAIN THIS CFG
define hostgroup{
hostgroup_name ncpa ; The name of the hostgroup
alias NCPA ; Long name of the group
}
define host{
use ncpa ; Inherit default values from a template
host_name ftp-server ; The name we're giving to this host
alias FTP-SERVER ; A longer name associated with the host
address 10.1.3.4 ; IP address of the host
}
define service{
use generic-service
host_name ftp-server
service_description Agent Version
check_command check_ncpa!-t 'mytoken' -P 5693 -M system/agent_version
}
define service{
use generic-service
host_name ftp-server
service_description CPU Usage
check_command check_ncpa!-t 'topconsult' -P 5693 -M cpu/percent -w 20 -c 40 -q 'aggregate=avg'
}
RESOURCE CFG
$USER1$=/usr/local/nagios/libexec
Python is installed, version 2.6.6
...but something sounds bad, when I try to run this check (inside folder libexec where i copy check_ncpa.py)
./check_ncpa.py -H 10.1.3.4 -t mytoken -M 'memory/virtual/percent'
console give me an error: No such file or direcotry
Plugin check_ncpa.py version 1.1.1 is in folder /usr/local/nagios/libexec with 755 permission for the user "nagios".
Any suggestion?
I've a big headache
Thanks man!
I've problem with Nagios Core and the plugin NCPA, that's the error:
(No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_ncpa.py, ...) failed. errno is 2: No such file or directory
ans that's the scenario:
Nagios Core 4.3.2 On CentOS 6.9
More than 40 Wiondow Server monitored by Nagios and NSCP succesfully
Client NCPA installed on a ContOS 6.9
Web UI run perfectly and port 5693 is open
NAGIOS CONFIGURATION
COMMAND DEFIN. CFG
define command {
command_name check_ncpa
command_line $USER1$/check_ncpa.py -H $HOSTADDRESS$ -p 5693 $ARG1$
}
TEMPLATE DEF CFG
define host {
name ncpa
hostgroups ncpa
use generic-host
check_command check_ncpa
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
contacts nagiosadmin
notification_interval 60
notification_period 24x7
notifications_enabled 1
register 0
}
SERVER FOLDER CONTAIN THIS CFG
define hostgroup{
hostgroup_name ncpa ; The name of the hostgroup
alias NCPA ; Long name of the group
}
define host{
use ncpa ; Inherit default values from a template
host_name ftp-server ; The name we're giving to this host
alias FTP-SERVER ; A longer name associated with the host
address 10.1.3.4 ; IP address of the host
}
define service{
use generic-service
host_name ftp-server
service_description Agent Version
check_command check_ncpa!-t 'mytoken' -P 5693 -M system/agent_version
}
define service{
use generic-service
host_name ftp-server
service_description CPU Usage
check_command check_ncpa!-t 'topconsult' -P 5693 -M cpu/percent -w 20 -c 40 -q 'aggregate=avg'
}
RESOURCE CFG
$USER1$=/usr/local/nagios/libexec
Python is installed, version 2.6.6
...but something sounds bad, when I try to run this check (inside folder libexec where i copy check_ncpa.py)
./check_ncpa.py -H 10.1.3.4 -t mytoken -M 'memory/virtual/percent'
console give me an error: No such file or direcotry
Plugin check_ncpa.py version 1.1.1 is in folder /usr/local/nagios/libexec with 755 permission for the user "nagios".
Any suggestion?
I've a big headache
Thanks man!