racing
racing copied to clipboard
telemetry ingress restrictions
Influx will create the schema on the fly, i.e. the first time it sees a field, it will create the field with the data type. This opens up our pipeline to spam and schema corruption. Let's be a bit more strict and clean up our telegraf.conf
- only allow the crewchief topic (remove crewchief_v2 and racing)
- either don't use the mqtt_consumer.json_v2.object parsing and be specific about the fields
- or keep using it and restrict the fields
documentation is at
- https://www.influxdata.com/blog/mqtt-topic-payload-parsing-telegraf/
- https://github.com/influxdata/telegraf/blob/release-1.27/plugins/inputs/mqtt_consumer/README.md
- https://github.com/influxdata/telegraf/tree/release-1.27/plugins/parsers/json_v2
maybe we have to upgrade our telegraf from 1.22 to 1.27
{
"time": 1692204578177,
"telemetry": {
"Clutch": 0,
"Brake": 0,
"Throttle": 0.9999999,
"Handbrake": 0,
"SteeringAngle": 0.000227941709,
"Rpms": 5677.957,
"Gear": 3,
"SpeedMs": 42.3292656,
"DistanceRoundTrack": 2140.64087,
"WorldPosition_x": 489.178741,
"WorldPosition_y": 6.152093,
"WorldPosition_z": 11.3597507,
"CurrentLap": 5,
"CurrentLapTime": 31.9163818,
"LapTimePrevious": 73.70654,
"CurrentLapIsValid": true,
"PreviousLapWasValid": false,
"CarClass": "GT3"
}
}
and https://gitlab.com/mr_belowski/CrewChiefV4/-/blob/master/CrewChiefV4/mqtt_telemetry.json
/kind feature /assign goern
maybe we have to upgrade our telegraf from 1.22 to 1.27
implemented by #381