allnau
allnau

Reputation: 361

How to detect package losses and gaps with UDP publisher to QuestDb?

I am using QuestDb with UDP Influx Line Protocol publisher and want to see if there are gaps in the metrics due to package loss or any other reason.

Is there anything I can do on a publisher side or questdb to monitor the percentage of data loss if any?

Upvotes: 1

Views: 128

Answers (1)

Brian Smith
Brian Smith

Reputation: 1315

One thing you can do on the producer side is tag & sequence each publisher

  • The tag has to be unique to a publisher
  • The sequence can be a long value that is monotonically incremented and (ideally) the sequence number should not be reset when a publisher restarts

On the server side you can execute the following query, assuming you have the column names tag and seq for tag and sequence respectively

(SELECT a.tag, a.seq high, b.seq low 
 FROM tab a 
 ASOF JOIN tab b ON (tag)) 
WHERE high > low + 1;

Upvotes: 2

Related Questions