mirror of
https://github.com/ClusterCockpit/cc-metric-store.git
synced 2024-12-26 16:59:07 +01:00
commit
a21cedd4a0
2
.gitignore
vendored
2
.gitignore
vendored
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
aditya.creds
|
aditya.creds
|
||||||
test.creds
|
test.creds
|
||||||
config.json
|
./config.json
|
||||||
|
|
||||||
migrateTimestamps.pl
|
migrateTimestamps.pl
|
||||||
test_ccms_api.sh
|
test_ccms_api.sh
|
||||||
|
@ -16,7 +16,6 @@ builds:
|
|||||||
ldflags:
|
ldflags:
|
||||||
- -s -w -X main.version={{.Version}}
|
- -s -w -X main.version={{.Version}}
|
||||||
- -X main.commit={{.Commit}} -X main.date={{.Date}}
|
- -X main.commit={{.Commit}} -X main.date={{.Date}}
|
||||||
- -linkmode external -extldflags -static
|
|
||||||
tags:
|
tags:
|
||||||
- static_build
|
- static_build
|
||||||
archives:
|
archives:
|
||||||
|
@ -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