NCPA Agent Wizard Service Detection Error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mp4783
Posts: 116
Joined: Wed May 14, 2014 11:11 am

NCPA Agent Wizard Service Detection Error

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NCPA Agent Wizard Service Detection Error

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
mp4783
Posts: 116
Joined: Wed May 14, 2014 11:11 am

Re: NCPA Agent Wizard Service Detection Error

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NCPA Agent Wizard Service Detection Error

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mp4783
Posts: 116
Joined: Wed May 14, 2014 11:11 am

Re: NCPA Agent Wizard Service Detection Error

Post by mp4783 »

That fixed the problem. You may lock this post.

Thank you.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NCPA Agent Wizard Service Detection Error

Post by lmiltchev »

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