@@ -17,13 +17,15 @@ type DataSource struct {
17
17
18
18
Database string `json:"database,omitempty"`
19
19
User string `json:"user,omitempty"`
20
+ // Deprecated in favor of secureJsonData.password
20
21
Password string `json:"password,omitempty"`
21
22
22
23
OrgId int64 `json:"orgId,omitempty"`
23
24
IsDefault bool `json:"isDefault"`
24
25
25
- BasicAuth bool `json:"basicAuth"`
26
- BasicAuthUser string `json:"basicAuthUser,omitempty"`
26
+ BasicAuth bool `json:"basicAuth"`
27
+ BasicAuthUser string `json:"basicAuthUser,omitempty"`
28
+ // Deprecated in favor of secureJsonData.basicAuthPassword
27
29
BasicAuthPassword string `json:"basicAuthPassword,omitempty"`
28
30
29
31
JSONData JSONData `json:"jsonData,omitempty"`
@@ -32,18 +34,62 @@ type DataSource struct {
32
34
33
35
// JSONData is a representation of the datasource `jsonData` property
34
36
type JSONData struct {
35
- AssumeRoleArn string `json:"assumeRoleArn,omitempty"`
37
+ // Used by all datasources
38
+ TlsAuth bool `json:"tlsAuth,omitempty"`
39
+ TlsAuthWithCACert bool `json:"tlsAuthWithCACert,omitempty"`
40
+ TlsSkipVerify bool `json:"tlsSkipVerify,omitempty"`
41
+
42
+ // Used by Graphite
43
+ GraphiteVersion string `json:"graphiteVersion,omitempty"`
44
+
45
+ // Used by Prometheus, Elasticsearch, InfluxDB, MySQL, PostgreSQL and MSSQL
46
+ TimeInterval string `json:"timeInterval,omitempty"`
47
+
48
+ // Used by Elasticsearch
49
+ EsVersion int64 `json:"esVersion,omitempty"`
50
+ TimeField string `json:"timeField,omitempty"`
51
+ Interval string `json:"inteval,omitempty"`
52
+ LogMessageField string `json:"logMessageField,omitempty"`
53
+ LogLevelField string `json:"logLevelField,omitempty"`
54
+
55
+ // Used by Cloudwatch
36
56
AuthType string `json:"authType,omitempty"`
37
- CustomMetricsNamespaces string `json:"customMetricsNamespaces ,omitempty"`
57
+ AssumeRoleArn string `json:"assumeRoleArn ,omitempty"`
38
58
DefaultRegion string `json:"defaultRegion,omitempty"`
39
- TlsSkipVerify bool `json:"tlsSkipVerify,omitempty"`
40
- HttpMethod string `json:"httpMethod,omitempty"`
41
- QueryTimeout string `json:"queryTimeout,omitempty"`
42
- TimeInterval string `json:"timeInterval,omitempty"`
59
+ CustomMetricsNamespaces string `json:"customMetricsNamespaces,omitempty"`
60
+
61
+ // Used by OpenTSDB
62
+ TsdbVersion string `json:"tsdbVersion,omitempty"`
63
+ TsdbResolution string `json:"tsdbResolution,omitempty"`
64
+
65
+ // Used by MSSQL
66
+ Encrypt string `json:"encrypt,omitempty"`
67
+
68
+ // Used by PostgreSQL
69
+ Sslmode string `json:"sslmode,omitempty"`
70
+ PostgresVersion int64 `json:"postgresVersion,omitempty"`
71
+ Timescaledb bool `json:"timescaledb,omitempty"`
72
+
73
+ // Used by MySQL, PostgreSQL and MSSQL
74
+ MaxOpenConns int64 `json:"maxOpenConns,omitempty"`
75
+ MaxIdleConns int64 `json:"maxIdleConns,omitempty"`
76
+ ConnMaxLifetime int64 `json:"connMaxLifetime,omitempty"`
77
+
78
+ // Used by Prometheus
79
+ HttpMethod string `json:"httpMethod,omitempty"`
80
+ QueryTimeout string `json:"queryTimeout,omitempty"`
43
81
}
44
82
45
83
// SecureJSONData is a representation of the datasource `secureJsonData` property
46
84
type SecureJSONData struct {
85
+ // Used by all datasources
86
+ TlsCACert string `json:"tlsCACert,omitempty"`
87
+ TlsClientCert string `json:"tlsClientCert,omitempty"`
88
+ TlsClientKey string `json:"tlsClientKey,omitempty"`
89
+ Password string `json:"password,omitempty"`
90
+ BasicAuthPassword string `json:"basicAuthPassword,omitempty"`
91
+
92
+ // Used by Cloudwatch
47
93
AccessKey string `json:"accessKey,omitempty"`
48
94
SecretKey string `json:"secretKey,omitempty"`
49
95
}
0 commit comments