Mainos / Advertisement:

Ero sivun ”Icinga2” versioiden välillä

Kohteesta Taisto
Siirry navigaatioon Siirry hakuun
p (Minh siirsi sivun Icinga uudelle nimelle Icinga2 luomatta ohjausta)
Rivi 19: Rivi 19:
  
 
=== Client konfigurointi ===
 
=== Client konfigurointi ===
 +
 +
* master on icinga master palvelin jonne data tallennetaan. Tätä osoite on icinga.example.org ja IP: 172.16.1.10
 +
* clienttinä on client1.example.org ja IP: 172.16.1.9
  
 
Luo palvelimella avain asiakkaan CN:n eli domain nimellä
 
Luo palvelimella avain asiakkaan CN:n eli domain nimellä
Rivi 30: Rivi 33:
  
 
   icinga2 node wizard
 
   icinga2 node wizard
 +
 +
Noden asennusvelho kyselee tiettyjä asetuksia ja vastaa seuraavasti
 +
 +
 +
<pre>
 +
Welcome to the Icinga 2 Setup Wizard!
 +
 +
We'll guide you through all required configuration details.
 +
 +
 +
 +
Please specify if this is a satellite setup ('n' installs a master setup) [Y/n]: y
 +
Starting the Node setup routine...
 +
Please specifiy the common name (CN) [client1.example.org]:
 +
Please specify the master endpoint(s) this node should connect to:
 +
Master Common Name (CN from your master setup): icinga.example.org
 +
Do you want to establish a connection to the master from this node? [Y/n]: y
 +
Please fill out the master connection information:
 +
Master endpoint host (Your master's IP address or FQDN): 172.16.1.10
 +
Master endpoint port [5665]:
 +
Add more master endpoints? [y/N]: n
 +
Please specify the master connection for CSR auto-signing (defaults to master endpoint host):
 +
Host [172.16.1.10]:
 +
Port [5665]:
 +
</pre>
 +
 +
* Tämän jälkeen kopioi masterin luoma tikettikoodi
 +
 +
<pre>
 +
Please specify the request ticket generated on your Icinga 2 master.
 +
(Hint: # icinga2 pki ticket --cn 'client1.example.org'):
 +
</pre>
 +
 +
Tämän jälkeen muuta masterin konfiguraatiota:
 +
 +
  sudo nano /etc/icinga2/zones.conf
 +
 +
<pre>
 +
object Endpoint "client1.example.org" {
 +
  host = "172.16.1.9"
 +
 +
}
 +
 +
object Zone "client1.example.org" {
 +
    endpoints = [ "client1.example.org" ]
 +
    parent = "master"
 +
}
 +
/pre>
 +
 +
Avaa lisäksi /etc/icinga2/conf.d/hosts.conf
 +
 +
ja lisää konfiguraatioon
 +
 +
<pre>
 +
object Host "client1.example.org" {
 +
  import "generic-host"
 +
 +
  address = "172.16.1.9"
 +
  address6 = "::1"
 +
 +
  vars.os = "Linux"
 +
 +
  vars.remote_client = "client1.example.org"
 +
 +
  /* host specific check arguments */
 +
  vars.users_wgreater = 10
 +
  vars.users_cgreater = 20
 +
}
 +
</pre>
 +
 +
Tällä mahdollistat palveluiden haun etä icingasta.
 +
 +
  sudo nano /etc/icinga2/conf.d/services.conf
 +
 +
<pre>
 +
apply Service "users" {
 +
  import "generic-service"
 +
 +
  check_command = "users"
 +
  command_endpoint = host.vars.remote_client
 +
 +
  /* override (remote) command arguments with host settings */
 +
  vars.users_wgreater = host.vars.users_wgreater
 +
  vars.users_cgreater = host.vars.users_cgreater
 +
 +
  /* assign where a remote client is set */
 +
  assign where host.vars.remote_client
 +
}
 +
</pre>

Versio 29. toukokuuta 2016 kello 10.03

Icinga2 on Nagios tapainen OpenSource monitorintiohjelma.

Asennus

Lisää APT key

 wget -O - http://packages.icinga.org/icinga.key | apt-key add -

Lisää Source listiin Debianiin

deb http://packages.icinga.org/debian icinga-jessie main
deb-src http://packages.icinga.org/debian icinga-jessie main
 aptitude update && aptitude install icinga2 icingaweb2

Konfigurointi

Client konfigurointi

  • master on icinga master palvelin jonne data tallennetaan. Tätä osoite on icinga.example.org ja IP: 172.16.1.10
  • clienttinä on client1.example.org ja IP: 172.16.1.9

Luo palvelimella avain asiakkaan CN:n eli domain nimellä

 icinga2 pki ticket --cn 'client1.example.org'

Kopioi tulostuva tikettinumero talteen.

  • Asenna siis ekaksi icinga2 paketti clientille
  • Aja clientilla seuraavaksi komento jolla yhdistät clientin masteriin.
 icinga2 node wizard

Noden asennusvelho kyselee tiettyjä asetuksia ja vastaa seuraavasti


Welcome to the Icinga 2 Setup Wizard!

We'll guide you through all required configuration details.



Please specify if this is a satellite setup ('n' installs a master setup) [Y/n]: y
Starting the Node setup routine...
Please specifiy the common name (CN) [client1.example.org]:
Please specify the master endpoint(s) this node should connect to:
Master Common Name (CN from your master setup): icinga.example.org
Do you want to establish a connection to the master from this node? [Y/n]: y
Please fill out the master connection information:
Master endpoint host (Your master's IP address or FQDN): 172.16.1.10
Master endpoint port [5665]:
Add more master endpoints? [y/N]: n
Please specify the master connection for CSR auto-signing (defaults to master endpoint host):
Host [172.16.1.10]:
Port [5665]:
  • Tämän jälkeen kopioi masterin luoma tikettikoodi
Please specify the request ticket generated on your Icinga 2 master.
 (Hint: # icinga2 pki ticket --cn 'client1.example.org'):

Tämän jälkeen muuta masterin konfiguraatiota:

 sudo nano /etc/icinga2/zones.conf
object Endpoint "client1.example.org" {
  host = "172.16.1.9"

}

object Zone "client1.example.org" {
    endpoints = [ "client1.example.org" ]
    parent = "master"
}
/pre>

Avaa lisäksi /etc/icinga2/conf.d/hosts.conf 

ja lisää konfiguraatioon 

<pre>
object Host "client1.example.org" {
  import "generic-host"

  address = "172.16.1.9"
  address6 = "::1"

  vars.os = "Linux"

  vars.remote_client = "client1.example.org"

  /* host specific check arguments */
  vars.users_wgreater = 10
  vars.users_cgreater = 20
}

Tällä mahdollistat palveluiden haun etä icingasta.

 sudo nano /etc/icinga2/conf.d/services.conf
apply Service "users" {
  import "generic-service"

  check_command = "users"
  command_endpoint = host.vars.remote_client

  /* override (remote) command arguments with host settings */
  vars.users_wgreater = host.vars.users_wgreater
  vars.users_cgreater = host.vars.users_cgreater

  /* assign where a remote client is set */
  assign where host.vars.remote_client
}
Mainos / Advertisement: