diff --git a/src/influx.rs b/src/influx.rs index d9612fc..f07c564 100644 --- a/src/influx.rs +++ b/src/influx.rs @@ -354,6 +354,10 @@ impl InfluxWriter { if meas.timestamp.is_none() { meas.timestamp = Some(now()) } + if meas.fields.is_empty() { + meas.fields.push(("n", OwnedValue::Integer(1))); + } + //#[cfg(feature = "trace")] { if count % 10 == 0 { trace!(logger, "rcvd new measurement"; "count" => count, "key" => meas.key); } } count = next(count, &meas, &mut buf, &loop_time, &mut last);