Mikesch-mp / icingaweb2-module-grafana

Grafana module for Icinga Web 2 (supports InfluxDB & Graphite)
https://icinga.com/community/
GNU General Public License v2.0
241 stars 95 forks source link

Feature Request: eliminate Dashboard UID from config...use name #303

Closed mdetrano closed 1 year ago

mdetrano commented 1 year ago

The configuration of this module could be made easier and more portable if the particular Dashboard UID was not required for the default and graph dashboards to be used. The UID is assigned by Grafana on import or creation...the name is constant and known.

Expected Behavior

Configure Default and Graph dashboards using the Dashboard name from Grafana.

Current Behavior

It is always necessary to enter the Dashboard UID (which the module uses to construct the URL).

Possible Solution

The Grafana API returns dashboard information if requested. ( example api/search?query=icinga2-default returns json data that includes the uid of the default dashboard included with this module after it has been imported to Grafana). That uid could be requested and used to construct the needed URLs to retrieve graphs for this module.

Context

This feature would help sync up multiple systems with the same basic graph templates to be used with Grafana. Easier to deploy and automate.

(This could also pave the way for a naming convention to be implemented which would let this module find applicable templates on its own...no further config necessary)

Your Environment

Mikesch-mp commented 1 year ago

Just copy the graphs.ini to all systems and use the same database for grafana