Deploy Agent does nothing

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
taxidis
Posts: 6
Joined: Tue Sep 08, 2020 5:12 am

Deploy Agent does nothing

Post 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?
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Deploy Agent does nothing

Post 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
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
taxidis
Posts: 6
Joined: Tue Sep 08, 2020 5:12 am

Re: Deploy Agent does nothing

Post 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.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Deploy Agent does nothing

Post 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
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
taxidis
Posts: 6
Joined: Tue Sep 08, 2020 5:12 am

Re: Deploy Agent does nothing

Post 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]
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Deploy Agent does nothing

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Deploy Agent does nothing

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked