Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revise kickstart script for Linux Agents #1944

Closed
mwaldmueller opened this issue Sep 18, 2019 · 3 comments
Closed

Revise kickstart script for Linux Agents #1944

mwaldmueller opened this issue Sep 18, 2019 · 3 comments
Assignees
Labels
Milestone

Comments

@mwaldmueller
Copy link

Expected Behavior

The current kickstart script for the deyploment of Linux Agents should be revised.

Current Behavior/Possible Solution

Conspicuousnesses:

  1. Parent node

In a distributed setup ICINGA2_CA_NODE should be set to the parent satellite node(s) of the Agent.

  1. Version compare

Does the opposite:

version_compare() {
  # args: v1 op v2
  return "$(awk "BEGIN {!print ($1 $2 $3)}")"
}

From my point of view it should be:

version_compare() {
  # args: v1 op v2
  return "$(awk "BEGIN {print ($1 $2 $3)}")"
}
  1. Restart command

Instead of:

  echo "Please restart icinga2:"
  echo "  service icinga2 restart"
else

Could be changed to:

  echo "Please restart icinga2:"
  echo "  systemctl restart icinga2"
else

Your Environment

  • Director version (System - About): v1.6.2
  • Icinga Web 2 version and modules (System - About): not relevant
  • Icinga 2 version (icinga2 --version): not relevant
  • Operating System and version: not relevant
  • Webserver, PHP versions: not relevant
@syrof
Copy link

syrof commented Sep 19, 2019

There is a problem in kickstart with icinga2 version detection with new 2.11.0-1.

Previous version:

# icinga2 --version
icinga2 - The Icinga 2 network monitoring daemon (version: r2.10.5-1)

Current version:

# icinga2 --version
 icinga2 - The Icinga 2 network monitoring daemon (version: 2.11.0-1)

kickstart script expecting "r" or "v" just before version like in "r2.10.5-1"

icinga_version() {
  "$ICINGA2_BIN" --version 2>/dev/null | grep -oP 'version: [rv]\K\d+\.\d+\.\d+[^\)]*'
}

which generates an error while runnig kickstart

INFO: This should be a RedHat system
check: icinga2 installed - ERROR: You need to install icinga2!

In my case I just removed [rv] but this part of regex needs update.

My environment:

  • Director version (System - About): v1.6.2
  • Icinga Web 2 version and modules (System - About): 2.7.1
  • Icinga 2 version (icinga2 --version): 2.11.0-1
  • Operating System and version: Centos 7.7.1908
  • Webserver, PHP versions: PHP 7.1.32

@dnsmichi
Copy link
Contributor

Similar thing as with Icinga/icingaweb2#3881

@Thomas-Gelf
Copy link
Contributor

@mwaldmueller: thanks for testing the proposed fix. Regarding the CA-Proxy part: @mwaldmueller will create a dedicated issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants