teach influxpusher that nullptr fields can be ignored - good to programatically not send out some data

timework
bert hubert 2020-07-09 21:46:56 +02:00
parent 2400a166f0
commit c5a96a3e11
1 changed files with 5 additions and 0 deletions

View File

@ -40,6 +40,8 @@ void InfluxPusher::addValueObserver(int src, string_view name, const initializer
buffer+= " ";
bool lefirst=true;
for(const auto& v : values) {
if(!v.first) // trick to null out certain fields
continue;
d_numvalues++;
if(!lefirst) {
buffer +=",";
@ -102,6 +104,9 @@ void InfluxPusher::addValue(const vector<pair<string,var_t>>& tags, string_view
buffer+= " ";
bool lefirst=true;
for(const auto& v : values) {
if(!v.first) // trick to null out certain fields
continue;
d_numvalues++;
if(!lefirst) {
buffer +=",";