mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-19 15:30:17 +00:00
vmctl: make linter happy (#2578)
Signed-off-by: hagen1778 <roman@victoriametrics.com>
This commit is contained in:
parent
de143323d0
commit
1aa5a19717
2 changed files with 4 additions and 4 deletions
|
@ -67,7 +67,7 @@ func (op *otsdbProcessor) run(silent, verbose bool) error {
|
||||||
queryRanges += len(rt.QueryRanges)
|
queryRanges += len(rt.QueryRanges)
|
||||||
}
|
}
|
||||||
for _, metric := range metrics {
|
for _, metric := range metrics {
|
||||||
log.Println(fmt.Sprintf("Starting work on %s", metric))
|
log.Printf("Starting work on %s", metric)
|
||||||
serieslist, err := op.oc.FindSeries(metric)
|
serieslist, err := op.oc.FindSeries(metric)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("couldn't retrieve series list for %s : %s", metric, err)
|
return fmt.Errorf("couldn't retrieve series list for %s : %s", metric, err)
|
||||||
|
|
|
@ -196,7 +196,7 @@ func (c Client) GetData(series Meta, rt RetentionMeta, start int64, end int64, m
|
||||||
3. bad format of response body
|
3. bad format of response body
|
||||||
*/
|
*/
|
||||||
if resp.StatusCode != 200 {
|
if resp.StatusCode != 200 {
|
||||||
log.Println(fmt.Sprintf("bad response code from OpenTSDB query %v for %q...skipping", resp.StatusCode, q))
|
log.Printf("bad response code from OpenTSDB query %v for %q...skipping", resp.StatusCode, q)
|
||||||
return Metric{}, nil
|
return Metric{}, nil
|
||||||
}
|
}
|
||||||
defer func() { _ = resp.Body.Close() }()
|
defer func() { _ = resp.Body.Close() }()
|
||||||
|
@ -208,7 +208,7 @@ func (c Client) GetData(series Meta, rt RetentionMeta, start int64, end int64, m
|
||||||
var output []OtsdbMetric
|
var output []OtsdbMetric
|
||||||
err = json.Unmarshal(body, &output)
|
err = json.Unmarshal(body, &output)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(fmt.Sprintf("couldn't marshall response body from OpenTSDB query (%s)...skipping", body))
|
log.Printf("couldn't marshall response body from OpenTSDB query (%s)...skipping", body)
|
||||||
return Metric{}, nil
|
return Metric{}, nil
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
@ -309,7 +309,7 @@ func NewClient(cfg Config) (*Client, error) {
|
||||||
*/
|
*/
|
||||||
offsetPrint = offsetPrint - offsetSecs
|
offsetPrint = offsetPrint - offsetSecs
|
||||||
}
|
}
|
||||||
log.Println(fmt.Sprintf("Will collect data starting at TS %v", offsetPrint))
|
log.Printf("Will collect data starting at TS %v", offsetPrint)
|
||||||
for _, r := range cfg.Retentions {
|
for _, r := range cfg.Retentions {
|
||||||
ret, err := convertRetention(r, offsetSecs, cfg.MsecsTime)
|
ret, err := convertRetention(r, offsetSecs, cfg.MsecsTime)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue