Page 1 of 1

Deploy Agent does nothing

Posted: Tue Sep 15, 2020 7:23 am
by taxidis
Hi there,

We are using Nagios XI 5.7.3.

I choose Deploy Agent, fill in the credentials (root and pass) and choose NCPA agent. The process is completed succesfully (Status: Completed) but nothing happens and Raw logs are empty.

The target host is a Debian 10 fresh installation.

I then proceeded with manual installation of NCPA and nagios was able to discover all item on host via the NCPA Wizard.

What is Deploy Agent supposed to do?

Re: Deploy Agent does nothing

Posted: Tue Sep 15, 2020 4:35 pm
by benjaminsmith
Hello @taxidis,

Thank you for contacting Nagios Support.

If you received a successful confirmation message then it should have installed the NCPA agent on the remote system. I just tested on a fresh Debian 10 install and it did work. The account ou must have root access.
deploy-debian.png
Automatic Agent Deployment

If you go to the following directory:

Code: Select all

/usr/local/nagiosxi/html/config/deployment/jobs
You'll find the jobs folder. Can you attach the output.json file to the thread or PM it?

Regards,
Benjamin

Re: Deploy Agent does nothing

Posted: Wed Sep 16, 2020 4:52 am
by taxidis
Hi Benjamin,

The output.json is empty on every try.

All tries show up as completed but when I click on one, nothing shows up in the table.

https://prnt.sc/ui6wwh

Ansible files have been generated on every job folder.

Re: Deploy Agent does nothing

Posted: Wed Sep 16, 2020 5:16 pm
by benjaminsmith
Hi,

So in order to get some more debug output, I have a modified script from development to help us capture some more information and help us figure the root cause. If you'd like to install this to collect the error log, please follow the steps below.

Make a backup of the existing.

Code: Select all

cp /usr/local/nagiosxi/html/config/deployment/includes/utils-deployment.inc.php /usr/local/nagiosxi/html/config/deployment/includes/utils-deployment.inc.php.old
The zip file that is attached to the thread, unzip the file and overwrite this file /usr/local/nagiosxi/html/config/deployment/includes/utils-deployment.inc.php with the zip version.

After running the deployment, this will create an errors.txt file in the jobs folder. Please upload this to the thread. Thanks, Benjamin

Example

Code: Select all

 /usr/local/nagiosxi/html/config/deployment/jobs/5f628db8e3f63/errors.txt

Re: Deploy Agent does nothing

Posted: Thu Sep 17, 2020 3:42 am
by taxidis
Hi,


The error I get is

##############################################
ERROR! We were unable to read either as JSON nor YAML, these are the errors we got from each:
JSON: No JSON object could be decoded

Syntax Error while loading YAML.
found character that cannot start any token

The error appears to be in '/usr/local/nagiosxi/html/config/deployment/jobs/5f6320a544275/5f6320a544275.yml': line 9, column 23, but may
be elsewhere in the file depending on the exact syntax problem.
##############################################

The /5f6320a544275.ym file looks like this:

$ANSIBLE_VAULT;1.1;AES256
[encrypted key here]

Re: Deploy Agent does nothing

Posted: Thu Sep 17, 2020 5:07 pm
by benjaminsmith
Hi @taxidis,

Thanks for enabling that. I'm going to reach to our developer on this message to help troubleshoot this and I will follow up with you.

Benjamin

Re: Deploy Agent does nothing

Posted: Fri Sep 18, 2020 9:00 am
by tgriep
Go to the following folder on the system.

Code: Select all

/usr/local/nagiosxi/html/config/deployment/jobs/5f6320a544275/
If you see an errors.txt file that has messages in it, post it so we can see it.

Also, run this command in that folder and post the output here.

Code: Select all

ansible-playbook 5f6320a544275.yml -i hosts --vault-password-file=.vp -vvv