Hello everybody,
Today I want to add new host to my icinga2, but I do everything from this tutorial.
But when I start my script (from icingaweb2 - director) it showed me this problem. 
root@ns62198:/home# ./deploy-agent.sh
./deploy-agent.sh: line 2: DEPLOYMENT: command not found
INFO: This should be a Debian system
check: icinga2 installed - OK: 2.11.4-1
INFO: Using new SSL directory: /var/lib/icinga2/certs
information/base: Writing private key to '/var/lib/icinga2/certs/ns62198.key'.
information/base: Writing X509 certificate to '/var/lib/icinga2/certs/ns62198.cr t'.
information/base: Writing certificate signing request to '/var/lib/icinga2/certs /ns62198.csr'.
information/cli: Retrieving X.509 certificate for 'ns62197.hicoria.cloud:5665'.
critical/pki: Cannot connect to host 'ns62197.hicoria.cloud' on port '5665'
critical/cli: Failed to fetch certificate from host.
ERROR: Could not retrieve trusted certificate from host ns62197.hicoria.cloud
Both VPS are running on Debian 10.
icinga2 version of second VPS
root@ns62198:/home# icinga2 --version
icinga2 - The Icinga 2 network monitoring daemon (version: r2.11.4-1)
Copyright (c) 2012-2020 Icinga GmbH (https://icinga.com/)
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl2.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
System information:
Platform: Debian GNU/Linux
Platform version: 10 (buster)
Kernel: Linux
Kernel version: 4.19.0-9-amd64
Architecture: x86_64
Build information:
Compiler: GNU 8.3.0
Build host: runner-ltrjqz9n-project-298-concurrent-0
Application information:
General paths:
Config directory: /etc/icinga2
Data directory: /var/lib/icinga2
Log directory: /var/log/icinga2
Cache directory: /var/cache/icinga2
Spool directory: /var/spool/icinga2
Run directory: /run/icinga2
Old paths (deprecated):
Installation root: /usr
Sysconf directory: /etc
Run directory (base): /run
Local state directory: /var
Internal paths:
Package data directory: /usr/share/icinga2
State path: /var/lib/icinga2/icinga2.state
Modified attributes path: /var/lib/icinga2/modified-attributes.conf
Objects path: /var/cache/icinga2/icinga2.debug
Vars path: /var/cache/icinga2/icinga2.vars
PID path: /run/icinga2/icinga2.pid
Icinga2 version on master server (first VPS)
root@ns62197:~# icinga2 --version
icinga2 - The Icinga 2 network monitoring daemon (version: r2.11.4-1)
Copyright (c) 2012-2020 Icinga GmbH (https://icinga.com/)
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl2.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
System information:
Platform: Debian GNU/Linux
Platform version: 10 (buster)
Kernel: Linux
Kernel version: 4.19.0-9-amd64
Architecture: x86_64
Build information:
Compiler: GNU 8.3.0
Build host: runner-ltrjqz9n-project-298-concurrent-0
Application information:
General paths:
Config directory: /etc/icinga2
Data directory: /var/lib/icinga2
Log directory: /var/log/icinga2
Cache directory: /var/cache/icinga2
Spool directory: /var/spool/icinga2
Run directory: /run/icinga2
Old paths (deprecated):
Installation root: /usr
Sysconf directory: /etc
Run directory (base): /run
Local state directory: /var
Internal paths:
Package data directory: /usr/share/icinga2
State path: /var/lib/icinga2/icinga2.state
Modified attributes path: /var/lib/icinga2/modified-attributes.conf
Objects path: /var/cache/icinga2/icinga2.debug
Vars path: /var/cache/icinga2/icinga2.vars
PID path: /run/icinga2/icinga2.pid
Where is problem?
Thanks for help.
//EDIT: It looks like on the problem with script… I can´t find IP adress in script. 
How?
