How to get the datasource segment size for an hour or day in druid .12 version

Hi,

we have druid setup two different geo locations for Bussiness Continuity reasons. Some time we are running into issues where segments sizes are different on both sides. We are planning to have a monitoring to query segment sizes so when it is different to send an alert

How do we get the segment size for a datasource for particular time interval

Tried using API metadata query but the size we are getting is not matching coordinator UI

we use mysql as metadata storage so its not matching over there

I've generally done that sort of thing with semantic checks rather
than checking number of bytes (i.e. ensure that event counts are equal
between them, or a sum of a metric or something like that).
Especially if you are using real-time ingestion, you would have to
guarantee that all nodes saw exactly the same messages in exactly the
same sequence at essentially the exact same time in order to be
guaranteed equivalent byte counts. Otherwise, segments can get cut at
different boundaries without any impact on the correctness of the
data.

Thanks Eric for the update . will try to get the event count