mirror of
https://github.com/ClusterCockpit/cc-metric-store.git
synced 2024-12-26 00:49:05 +01:00
commit
9b32402108
@ -4,6 +4,17 @@ This is a minor release of `cc-metric-store`, the metric timeseries cache
|
|||||||
implementation of ClusterCockpit.
|
implementation of ClusterCockpit.
|
||||||
For release specific notes visit the [ClusterCockpit Documentation](https://clusterockpit.org/docs/release/).
|
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
|
## Breaking changes
|
||||||
|
|
||||||
None
|
None
|
||||||
|
@ -298,7 +298,7 @@ func decodeLine(dec *lineprotocol.Decoder,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if string(key) != "value" {
|
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 {
|
if val.Kind() == lineprotocol.Float {
|
||||||
@ -308,7 +308,7 @@ func decodeLine(dec *lineprotocol.Decoder,
|
|||||||
} else if val.Kind() == lineprotocol.Uint {
|
} else if val.Kind() == lineprotocol.Uint {
|
||||||
metric.Value = util.Float(val.UintV())
|
metric.Value = util.Float(val.UintV())
|
||||||
} else {
|
} 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 {
|
if t, err = dec.Time(lineprotocol.Microsecond, t); err != nil {
|
||||||
t = time.Now()
|
t = time.Now()
|
||||||
if t, err = dec.Time(lineprotocol.Nanosecond, t); err != nil {
|
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 {
|
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 {
|
if err := ms.WriteToLevel(lvl, selector, t.Unix(), []memorystore.Metric{metric}); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user