fix: get clusters by api (#1030)
This commit is contained in:
parent
98d5dfff8e
commit
315e0ef903
|
@ -87,9 +87,9 @@ type DSReply struct {
|
||||||
Settings struct {
|
Settings struct {
|
||||||
PrometheusAddr string `json:"prometheus.addr"`
|
PrometheusAddr string `json:"prometheus.addr"`
|
||||||
PrometheusBasic struct {
|
PrometheusBasic struct {
|
||||||
PrometheusUser string `json:"promethues.user"`
|
PrometheusUser string `json:"prometheus.user"`
|
||||||
PrometheusPass string `json:"promethues.password"`
|
PrometheusPass string `json:"prometheus.password"`
|
||||||
} `json:"promethues.basic"`
|
} `json:"prometheus.basic"`
|
||||||
PrometheusTimeout int64 `json:"prometheus.timeout"`
|
PrometheusTimeout int64 `json:"prometheus.timeout"`
|
||||||
} `json:"settings,omitempty"`
|
} `json:"settings,omitempty"`
|
||||||
} `json:"items"`
|
} `json:"items"`
|
||||||
|
@ -137,6 +137,7 @@ func loadClustersFromAPI() {
|
||||||
logger.Errorf("read response body of %s fail: %v", url, err)
|
logger.Errorf("read response body of %s fail: %v", url, err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
logger.Debugf("curl %s success, response: %s", url, string(jsonBytes))
|
||||||
|
|
||||||
err = json.Unmarshal(jsonBytes, &reply)
|
err = json.Unmarshal(jsonBytes, &reply)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue