Page 1 of 1

NCPA Agent Wizard Service Detection Error

Posted: Wed Jul 22, 2015 10:03 am
by mp4783
I am getting the following error in the Apache ssl_error_log when I attempt to use the NCPA Agent wizard. I am running Nagios XI 2014R1.5 on an RHEL 5 Linux server.

Code: Select all

PHP Warning:  Invalid argument supplied for foreach() in /usr/local/nagios/nagiosxi/html/includes/configwizards/ncpa/ncpa.inc.php on line 391, referer: https://m5labnagios01.gcsc.att.com:8443/nagiosxi/config/monitoringwizard.php?update=1&nextstep=2&nsp=XXXXXXXXXXXXXXXXXXXXXXX&wizard=ncpa
Following is the code snippet from the referenced wizard:

Code: Select all

            foreach ($root['services'] as $service => $status) {
                $service_list .= '<option value="' . $service . '" data-status="' . $status . '">' . $service . ' (' . $status . ')</option>';
            }
The following always precedes the above, but other posts indicate this can be ignored:

Code: Select all

PHP Notice:  Undefined index: service in /usr/local/nagios/nagiosxi/html/includes/configwizards/ncpa/ncpa.inc.php on line 149, referer: 
When I click the icon next to the "Service Name" text box which is supposed to list the services on the host (I tried this on Linux, SunOS, and Windows), the list is blank. I should also note that in the Web interface for each agent, the API "tree" lists no entries for either processes or services. This "sort of" indicates that the issue may be with the agent configuration or performance and that the Warning above is simply the result of it finding no services to list.

If I manually navigate to the "api/services" part of the API tree (e.g. http://myserver.com:5693/api/services), I do get a listing for the Linux and Windows servers.

Re: NCPA Agent Wizard Service Detection Error

Posted: Wed Jul 22, 2015 1:23 pm
by lmiltchev
What is the NCPA version that you install on the client machine? What is version of the "NCPA Agent" wizard that you are currently using?

Admin->Manage Config Wizards

Run the following command on the Nagios XI server and show the output:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py  -V

Re: NCPA Agent Wizard Service Detection Error

Posted: Wed Jul 22, 2015 4:22 pm
by mp4783
Check version on Nagios XI server: check_ncpa.py, Version 0.3.5

NCPA Agent deployed to monitored hosts: NCPA Agent 1.8.1

NCPA Config Wizard Version: 1.3.0

Re: NCPA Agent Wizard Service Detection Error

Posted: Wed Jul 22, 2015 4:30 pm
by lmiltchev
Your wizard needs to be updated to version 1.3.1. Go to Admin->Manage Config Wizards and click on "Check for Updates". Download the latest wizard, install it (Browse->...->Upload Wizard), and try rerunning it. Let us know if this fixed your issue.

Re: NCPA Agent Wizard Service Detection Error

Posted: Thu Jul 23, 2015 7:07 am
by mp4783
That fixed the problem. You may lock this post.

Thank you.

Re: NCPA Agent Wizard Service Detection Error

Posted: Thu Jul 23, 2015 8:34 am
by lmiltchev
I am glad I could help! :)