
Grafana Module
- Mikesch
- Thread is marked as Resolved.
This forum was archived to /woltlab and is now in read-only mode.
-
-
-
thank you for this nice icingaweb2-module. works like a charm
-
You are doing an amazing job, be it with its initial creation and idea or by just integrating feature requests or pull requests
I've decided to make this module the default inside the official Icinga Vagrant boxes. Both for InfluxDB and Graphite. A blog post on that is coming soon.
https://github.com/Icinga/icin…er/README.md#icinga-web-2
-
Bin etwas sprachlos
-
Hallo,
ich hatte heute etwas Zeit das Modul bei mir zu einzurichten. Leider war ich nur bedingt erfolgreich und stehe gerade etwas auf dem Schlauch, ob ich etwas falsch gemacht habe.
Und zwar sehe ich im Host-Tab für den hostalive Check den Graphen nicht, dort zeigt er immer No data points an. Bei den Service-Checks die im Service-Tab aufgelistet werden wird jedoch der Graph korrekt dargestellt. Wenn man auf den Graphen klickt, kommt man ins Web-Interface von Grafana jedoch wird hier ebenfalls kein Graph für den hostalive Check angezeigt (nur No data points).
Ich gehe einfach mal die Schritte durch, die ich durchführt habe:
1. Installation InfluxDB/Grafana (da es meine Testumgebung ist, habe ich an den Konfigs. erstmal keine Änderungen durchgeführt)
2. Einrichtung einer Datenbank in InfluxDB wie hier beschrieben
3. Einrichtung InfluxDB Writer Feature, Feature aktiviert und Icinga neugestartet
4. Git Repository geklont, Modul in Icinga Web aktiviert
5. Anlegen der Datasource & Import der Dashboards in Grafana
Ich habe dann angefangen die Variablen im Query des icinga2-default Dashboard gegen die "echten" Werte auszutauschen, dabei ist folgendes raus gekommen:
Damit wird der Graph dann auch korrekt angezeigt.
In Icinga Web 2 zeigt der Link des Graph auf folgende URL: http://<GrafanaServer>:3000/dashboard/db/icinga2-default?var-hostname=srv-win1&var-service=hostalive&from=now-6h&to=now
Kann es sein, dass beim Aufruf eine Variable nicht "richtig" übergeben wird, sodass Grafana keine Datenpunkte findet?
(Falls das hier etwas zu viel ist, mache ich gerne auch ein Ticket auf GitHub dafür auf
)
Vielen Dank & Grüße!
-
-
-
@mcktr Du müsstest den hostalive-Graphen im Icingaweb2 unter Configurations -> Graphana Graphs anlegen:
Name: Name des jeweiligen check_commands, in dem Fall hostalive
Dashboard name: Name des Grafana-Dashboards in dem sich der hostalive-Graph befindet
Panel-ID: ID-Nummer des hostalive-Graphen, in mikesch's Beispiel-Dashboard ist das die ID 9
-
-
Wollt ihr das vielleicht in einen Doku-Patch kippen? Ich hatte unlängst überlegt, neben der README.md auch im doc/-Ordner eine Getting Started sowie Advanced anzulegen, wo man etwa mit Grafana und Icinga Web 2 Einrichtungsscreenshots arbeiten kann.
-
-
-
Here's the promised blog post including the Grafana module integrated with InfluxDB and Graphite: https://www.icinga.com/2017/04…xdb-icinga-web-2-modules/
Now it's me who does not know what to say ... thanks a lot, Carsten!
-
-
-
Cool, thanks. I'm going to wrap my head around unit tests to prevent code execution failures, if I find the time to do more with PHP in the coming weeks.
-
I think i should buy/install me and PHP IDE
Still using vim only.
Can you, or someone from Netways, recommend one?
-
-
JetBrains PHPStorm is the preferred dev IDE here ... you might want to apply for an open source license with your Github project (there's no guarantee though).
I don't know if its applicable, but for simple syntax highlighting, GitHub's Atom might do the trick as well. Sublime as text editor could work too, but also has a price tag.
-
I applied for a free license, lets cross fingers
-
-
-
Update 1.1.4
- Added iframe mode (be warned, Icinga Web 2 will refresh them every 10 seconds)
- If you set default dashboard name to "none" and there is no configured graph, no graph will be displayed.
- Added publicHost/Protocol options if you wnat to have diffrent URL for the graph links.
- Made the images look more fancy in direct/proxy mode (thanks to epinter)
- some minor enchanments
-