Closed PlasmaEye closed 5 years ago
I see the issue. The fields are the right types, but the field tags are swapped. I don't have access to my development system again until this weekend. In the meantime, the following patch would fix the issue if you want to apply it and try it yourself:
diff --git a/main.go b/main.go
index 9b9d239..3157d3e 100644
--- a/main.go
+++ b/main.go
@@ -149,8 +149,8 @@ func (scm SCM) AddPoints(msg LogMessage, bp client.BatchPoints) {
// SCMPlus handles Standard Consumption Message Plus messages from rtlamr.
type SCMPlus struct {
- EndpointID uint32 `json:"EndpointType"`
- EndpointType uint8 `json:"EndpointID"`
+ EndpointID uint32 `json:"EndpointID"`
+ EndpointType uint8 `json:"EndpointType"`
Consumption uint32 `json:"Consumption"`
}
That works!
Getting the following error message:
An example of a message that probably generated this (made about 5 minutes prior to the error):
Similar message that is not throwing this error:
SCM vs. SCM+ problem?