Performance Zahlen ansprechend als Grafik mit Hilfe von Grafana in Icinga Web2 einbinden. Von der Installation über die Konfiguration des Grafana Modules bis hin zum Erstellen eigener Dasboards/Panels, sowie Annotations aus Datenquellen wie der Icinga2 IDO oder Elastic Search. Zum Abschluss ein kurzer Ausflug in die Welt der Themes für Icinga Web2, denn Themes erstellen kann jeder und Monitoring darf auch Spaß machen.
4. Module Konfiguration
• Grafana Version 4 oder 5
• Host + Port oder Url
• Protokoll
• Default Dashboard wird benutzt, wenn keine passende
Graphkonfiguration gefunden wird.
• Default Panel ID
• Default Organization ID
• Datasource Type (schon wieder vergessen zu patchen ☺ )
• Grafana Access -> Direkt, iFrame, Proxy oder indirekter Proxy
• Authentifizierung
5. Host Graph Konfiguration
• Name
Suchreihenfolge:
1. Konfiguriert via Custom Variable
2. Servicename
3. Servicename ohne Parameter
4. check_command
• Dasboardname
• Panel ID
7. Annotations: IDO Kommentare
SELECT Unix_timestamp(entry_time) AS time_sec,
Concat(author_name, ":", comment_data) AS text,
Concat(“Kommentar") AS tags
FROM icinga_commenthistory
WHERE entry_time >= Date_format(From_unixtime("$__unixEpochFrom()"),
'%Y-%m-%d %H:%i:%S’)
AND entry_time <= Date_format(From_unixtime("$__unixEpochTo()"),
'%Y-%m-%d %H:%i:%S’
)
AND entry_type = 1
AND comment_type = 2
AND object_id = (SELECT object_id
FROM icinga_objects
WHERE is_active = 1
AND objecttype_id = 1
AND name1 = "$hostname")
SELECT Unix_timestamp(entry_time) AS time_sec,
Concat(author_name, ":", comment_data) AS text,
Concat(“Kommentar") AS tags
FROM icinga_commenthistory
WHERE entry_time >= Date_format(From_unixtime("$__unixEpochFrom()"),
'%Y-%m-%d %H:%i:%S’)
AND entry_time <= Date_format(From_unixtime("$__unixEpochTo()"),
'%Y-%m-%d %H:%i:%S’
)
AND entry_type = 1
AND comment_type = 1
AND object_id = (SELECT object_id
FROM icinga_objects
WHERE is_active = 1
AND objecttype_id = 2
AND name1 = "$hostname"
AND name2 = "$service")
Hosts Services
11. Voraussetzungen um ein Theme zu erstellen
• Nur für Web-Designer
• Sehr gute CSS Kentnisse
• HTML Profi
• JS sollte kein Fremdwort sein
• PHP
• Nicht älter als 25 Jahre mit 15 Jahren Berufserfahrung!