Merge pull request #35 from ClusterCockpit/hotfix

Hotfix
This commit is contained in:
Jan Eitzinger 2024-11-24 08:50:55 +01:00 committed by GitHub
commit 9b32402108
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 4 deletions

View File

@ -4,6 +4,17 @@ This is a minor release of `cc-metric-store`, the metric timeseries cache
implementation of ClusterCockpit.
For release specific notes visit the [ClusterCockpit Documentation](https://clusterockpit.org/docs/release/).
Notable changes:
- Cleanup of code and restructuring
- Document REST API with Swagger
- Introduce REST API versioning
- Provide Swagger UI test web-frontend
- Introduce re-sampling of metric data
- Support also ms, ns in line protocol
- Support NATS credentials
## Breaking changes
None

View File

@ -298,7 +298,7 @@ func decodeLine(dec *lineprotocol.Decoder,
}
if string(key) != "value" {
return fmt.Errorf("unkown field: '%s' (value: %#v)", string(key), val)
return fmt.Errorf("host %s: unknown field: '%s' (value: %#v)", host, string(key), val)
}
if val.Kind() == lineprotocol.Float {
@ -308,7 +308,7 @@ func decodeLine(dec *lineprotocol.Decoder,
} else if val.Kind() == lineprotocol.Uint {
metric.Value = util.Float(val.UintV())
} else {
return fmt.Errorf("unsupported value type in message: %s", val.Kind().String())
return fmt.Errorf("host %s: unsupported value type in message: %s", host, val.Kind().String())
}
}
@ -319,14 +319,14 @@ func decodeLine(dec *lineprotocol.Decoder,
if t, err = dec.Time(lineprotocol.Microsecond, t); err != nil {
t = time.Now()
if t, err = dec.Time(lineprotocol.Nanosecond, t); err != nil {
return fmt.Errorf("timestamp : %#v with error : %#v", t, err.Error())
return fmt.Errorf("host %s: timestamp : %#v with error : %#v", host, t, err.Error())
}
}
}
}
if err != nil {
return fmt.Errorf("timestamp : %#v with error : %#v", t, err.Error())
return fmt.Errorf("host %s: timestamp : %#v with error : %#v", host, t, err.Error())
}
if err := ms.WriteToLevel(lvl, selector, t.Unix(), []memorystore.Metric{metric}); err != nil {