Icinga: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 6: | Zeile 6: | ||
==== Master Server ==== | ==== Master Server ==== | ||
==== Agent/Client Installation ==== | ==== Agent/Client Installation ==== | ||
Am Agent/Client: | |||
<syntaxhighlight lang="bash" line="1"> | <syntaxhighlight lang="bash" line="1"> | ||
curl -sSL https://packages.icinga.com/icinga.key | apt-key add - | curl -sSL https://packages.icinga.com/icinga.key | apt-key add - | ||
| Zeile 18: | Zeile 19: | ||
sudo -u nagios ssh-copy-id icinga@<remote-server> | sudo -u nagios ssh-copy-id icinga@<remote-server> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Am Agent/Client: | |||
<syntaxhighlight lang="bash" line="1"> | <syntaxhighlight lang="bash" line="1"> | ||
sudo sed -i 's/^#\?\s*PasswordAuthentication\s\+yes/PasswordAuthentication no/' /etc/ssh/sshd_config && service ssh restart | sudo sed -i 's/^#\?\s*PasswordAuthentication\s\+yes/PasswordAuthentication no/' /etc/ssh/sshd_config && service ssh restart | ||
Version vom 5. Juni 2025, 09:26 Uhr
Beschreibung
Download
Installation
Master Server
Agent/Client Installation
Am Agent/Client:
curl -sSL https://packages.icinga.com/icinga.key | apt-key add -
apt-add-repository "deb https://packages.icinga.com/$(lsb_release -cs) icinga-$(lsb_release -cs) main"
apt-get update
apt install monitoring-plugins -y
adduser icinga
sudo sed -i 's/^#\?\s*PasswordAuthentication\s\+no/PasswordAuthentication yes/' /etc/ssh/sshd_config && service ssh restartVom Icinga-Server aus:
sudo -u nagios ssh-copy-id icinga@<remote-server>Am Agent/Client:
sudo sed -i 's/^#\?\s*PasswordAuthentication\s\+yes/PasswordAuthentication no/' /etc/ssh/sshd_config && service ssh restartVom Icinga-Server aus:
sudo -u nagios /usr/bin/ssh -i /var/lib/nagios/.ssh/id_rsa icinga@<remote-server> "/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /" #testenEmailversand
Siehe Postfix
Agent/Client
icinga2 node wizardWährend der Konfiguration:
- Typ des Setups: Wähle agent.
- Master-Verbindung: Gib die IP/Hostname des Masters ein.
- Port: 5665 (Standardport für den Agent).
- Zertifikatsanforderung: Bestätige, dass der Agent ein Zertifikat vom Master anfordert.
- Zone: Stelle sicher, dass die Zone des Agents korrekt benannt ist.
- Endpunkt: Füge den Endpunkt des Masters hinzu.
Am Master, neuen Client hinzufügen:
icinga2 pki ticket --cn '<client hostname>' --salt '<salt>' #die Ausgabe dann beim Client eintragen
icinga2 ca listClient:
sudo systemctl restart icinga2
sudo systemctl enable icinga2Füge den Agent in der /etc/icinga2/zones.conf hinzu:
object Endpoint "vps-hostname" {
host = "IP-Adresse-des-VPS"
}
object Zone "vps-hostname" {
endpoints = [ "vps-hostname" ]
parent = "icinga"
}Füge den Host in der Datei /etc/icinga2/conf.d/hosts.conf hinzu:
object Host "vps-hostname" {
address = "IP-Adresse-des-VPS"
check_command = "hostalive"
vars.os = "Linux"
}Konfiguration neu laden:
icinga2 daemon -C && systemctl restart icinga2Update
Test
Fehlerbehebung
Starten/Stoppen funktioniert nicht
Lösung 1
auszufüllen