Usage Stats: Report usage for all signed plugins (#31545)
* Report usage for all the signed plugins * Remove no longer used code * Fix tests by manipulating the global state * Minor test fix
This commit is contained in:
@@ -9,25 +9,15 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
DS_GRAPHITE = "graphite"
|
||||
DS_INFLUXDB = "influxdb"
|
||||
DS_INFLUXDB_08 = "influxdb_08"
|
||||
DS_ES = "elasticsearch"
|
||||
DS_OPENTSDB = "opentsdb"
|
||||
DS_CLOUDWATCH = "cloudwatch"
|
||||
DS_KAIROSDB = "kairosdb"
|
||||
DS_PROMETHEUS = "prometheus"
|
||||
DS_POSTGRES = "postgres"
|
||||
DS_MYSQL = "mysql"
|
||||
DS_MSSQL = "mssql"
|
||||
DS_ACCESS_DIRECT = "direct"
|
||||
DS_ACCESS_PROXY = "proxy"
|
||||
// Stackdriver was renamed Google Cloud monitoring 2020-05 but we keep
|
||||
// "stackdriver" to avoid breaking changes in reporting.
|
||||
DS_CLOUD_MONITORING = "stackdriver"
|
||||
DS_AZURE_MONITOR = "grafana-azure-monitor-datasource"
|
||||
DS_LOKI = "loki"
|
||||
DS_ES_OPEN_DISTRO = "grafana-es-open-distro-datasource"
|
||||
DS_GRAPHITE = "graphite"
|
||||
DS_INFLUXDB = "influxdb"
|
||||
DS_INFLUXDB_08 = "influxdb_08"
|
||||
DS_ES = "elasticsearch"
|
||||
DS_PROMETHEUS = "prometheus"
|
||||
DS_MYSQL = "mysql"
|
||||
DS_ACCESS_DIRECT = "direct"
|
||||
DS_ACCESS_PROXY = "proxy"
|
||||
DS_ES_OPEN_DISTRO = "grafana-es-open-distro-datasource"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -89,50 +79,6 @@ func (ds *DataSource) decryptedValue(field string, fallback string) string {
|
||||
return fallback
|
||||
}
|
||||
|
||||
var knownDatasourcePlugins = map[string]bool{
|
||||
DS_ES: true,
|
||||
DS_GRAPHITE: true,
|
||||
DS_INFLUXDB: true,
|
||||
DS_INFLUXDB_08: true,
|
||||
DS_KAIROSDB: true,
|
||||
DS_CLOUDWATCH: true,
|
||||
DS_PROMETHEUS: true,
|
||||
DS_OPENTSDB: true,
|
||||
DS_POSTGRES: true,
|
||||
DS_MYSQL: true,
|
||||
DS_MSSQL: true,
|
||||
DS_CLOUD_MONITORING: true,
|
||||
DS_AZURE_MONITOR: true,
|
||||
DS_LOKI: true,
|
||||
"opennms": true,
|
||||
"abhisant-druid-datasource": true,
|
||||
"dalmatinerdb-datasource": true,
|
||||
"gnocci": true,
|
||||
"zabbix": true,
|
||||
"newrelic-app": true,
|
||||
"grafana-datadog-datasource": true,
|
||||
"grafana-simple-json": true,
|
||||
"grafana-splunk-datasource": true,
|
||||
"udoprog-heroic-datasource": true,
|
||||
"grafana-openfalcon-datasource": true,
|
||||
"opennms-datasource": true,
|
||||
"rackerlabs-blueflood-datasource": true,
|
||||
"crate-datasource": true,
|
||||
"ayoungprogrammer-finance-datasource": true,
|
||||
"monasca-datasource": true,
|
||||
"vertamedia-clickhouse-datasource": true,
|
||||
"alexanderzobnin-zabbix-datasource": true,
|
||||
"grafana-influxdb-flux-datasource": true,
|
||||
"doitintl-bigquery-datasource": true,
|
||||
"grafana-azure-data-explorer-datasource": true,
|
||||
"tempo": true,
|
||||
}
|
||||
|
||||
func IsKnownDataSourcePlugin(dsType string) bool {
|
||||
_, exists := knownDatasourcePlugins[dsType]
|
||||
return exists
|
||||
}
|
||||
|
||||
// ----------------------
|
||||
// COMMANDS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user