|
|
|
@ -200,6 +200,8 @@ var ( |
|
|
|
|
|
|
|
|
|
grafanaPluginBuildInfoDesc *prometheus.GaugeVec |
|
|
|
|
|
|
|
|
|
grafanaPluginTargetInfoDesc *prometheus.GaugeVec |
|
|
|
|
|
|
|
|
|
// StatsTotalLibraryPanels is a metric of total number of library panels stored in Grafana.
|
|
|
|
|
StatsTotalLibraryPanels prometheus.Gauge |
|
|
|
|
|
|
|
|
@ -570,6 +572,12 @@ func init() { |
|
|
|
|
Namespace: ExporterName, |
|
|
|
|
}, []string{"plugin_id", "plugin_type", "version", "signature_status"}) |
|
|
|
|
|
|
|
|
|
grafanaPluginTargetInfoDesc = prometheus.NewGaugeVec(prometheus.GaugeOpts{ |
|
|
|
|
Name: "plugin_target_info", |
|
|
|
|
Help: "A metric with a constant '1' value labeled by pluginId and target", |
|
|
|
|
Namespace: ExporterName, |
|
|
|
|
}, []string{"plugin_id", "target"}) |
|
|
|
|
|
|
|
|
|
StatsTotalDashboardVersions = prometheus.NewGauge(prometheus.GaugeOpts{ |
|
|
|
|
Name: "stat_totals_dashboard_versions", |
|
|
|
|
Help: "total amount of dashboard versions in the database", |
|
|
|
@ -710,6 +718,10 @@ func SetPluginBuildInformation(pluginID, pluginType, version, signatureStatus st |
|
|
|
|
grafanaPluginBuildInfoDesc.WithLabelValues(pluginID, pluginType, version, signatureStatus).Set(1) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func SetPluginTargetInformation(pluginID, target string) { |
|
|
|
|
grafanaPluginTargetInfoDesc.WithLabelValues(pluginID, target).Set(1) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func initMetricVars(reg prometheus.Registerer) { |
|
|
|
|
reg.MustRegister( |
|
|
|
|
MInstanceStart, |
|
|
|
@ -764,6 +776,7 @@ func initMetricVars(reg prometheus.Registerer) { |
|
|
|
|
StatsTotalActiveAdmins, |
|
|
|
|
StatsTotalDataSources, |
|
|
|
|
grafanaPluginBuildInfoDesc, |
|
|
|
|
grafanaPluginTargetInfoDesc, |
|
|
|
|
StatsTotalDashboardVersions, |
|
|
|
|
StatsTotalAnnotations, |
|
|
|
|
StatsTotalAlertRules, |
|
|
|
|