Building and automating distributed Icinga 2 environments with Puppet.
The talk contains an introduction into distributed monitoring with Icinga 2, the integration of Icinga with Puppet, and automating the monitoring of hosts as well as different services.
4. www.netways.de
• Open Source Monitoring Framework (GPL v2)
• Multi-Threading für tausende Checks pro Sekunde
• Cluster-Protokoll für verteiltes Monitoring
• Tausende Plugins verfügbar
Icinga 2 - Open Source Monitoring
5. www.netways.de
• Icinga 2 Core
• Icinga Web 2 (Webinterface)
• IDO DB auf MySQL / PostgreSQL
• Überwachung per Plugins
• Icinga 2 Agent für eine sichere Verbindung
(Linux und Windows)
Icinga 2 - Architektur
14. www.netways.de
• Puppet nutzt Facter um Daten über das Hostsystem zu sammeln
• Liste von Key-Value Paaren
Puppet - Facts
15. www.netways.de
• Resource – Einzelner Baustein
• Jede Resource hat einen type, einen title und einen Satz an Attributen mit Werten
• Main Resources: package, file, service, user, group, host, …
• Defined Resources: selbst definierte types, z.B. icinga2::object::host
• Dependencies: Reihenfolge festlegen zwischen einzelnen Resources
Puppet - DSL (Domain Specific Language)
22. www.netways.de
• Vorgegebene Struktur, die Klassen und Daten zusammenfasst
• „Auto loading“ von Klassen
• „File serving“ von Daten und Templates
• Erweiterungen von Puppet, z.B. eigene Facts, Funktionen, etc.
• Einfaches Teilen mit anderen
• Puppet Forge
• https://forge.puppet.com
Puppet - Module
26. www.netways.de
Konzept
• Zentrale Konfiguration auf Icinga 2 Master
• Informationen befinden sich aber am Puppet Agent
• Konfiguration muss vom Puppet Agenten zum Icinga 2 Master
• Stored Configuration (PuppetDB)
• Installation/Konfiguration Icinga 2 Pakete
• Verbindung Satellit und Master
• Verbindung Agent und Master/Satellit
33. www.netways.de
• Entscheidet wann und was gequotet wird, Trennung durch Leerzeichen
• +, -, &&, ||, etc.
• attr => 'string1 + string2 – string3‚
• attr => '3 * (value1 - value2) / 2‚
• attr => 'function(param1, param2, ...)‚
• true, false
• Konstanten, z.B. NodeName, ZoneName
• alle Attribute und Custom Attribute
• Attribute aus anderem Kontext, z.B. host.address oder service.name
• Zahlen: 2.5, 2h, …
Abschalten des Parsers mit Prefix -:
Eigene Konfigurationsdateien als file-Resource mit Tag icinga2::config::file
Konfigurations-Parser