Closed LukePrior closed 2 years ago
Here is a simple prototype graph page: https://jsfiddle.net/1yLqhca6/
GET https://api.v2.sondehub.org/listener/stats
now returns stats as below. It is cached for 5 minutes. Does this meet your requirements @LukePrior ?
{
"radiosonde_auto_rx": {
"telemetry_count": 39540539,
"unique_callsigns": 553,
"versions": {
"1.5.8": {
"telemetry_count": 25482738,
"unique_callsigns": 328
},
"1.5.7": {
"telemetry_count": 4657769,
"unique_callsigns": 83
},
"1.5.6": {
"telemetry_count": 3011163,
"unique_callsigns": 52
},
"1.5.5": {
"telemetry_count": 1668648,
"unique_callsigns": 30
},
"1.5.3": {
"telemetry_count": 1545693,
"unique_callsigns": 21
},
"1.5.4": {
"telemetry_count": 398691,
"unique_callsigns": 16
},
"1.5.1": {
"telemetry_count": 840853,
"unique_callsigns": 14
},
"1.5.2": {
"telemetry_count": 516157,
"unique_callsigns": 10
},
"1.5.0": {
"telemetry_count": 299957,
"unique_callsigns": 6
},
"1.5.8-Z3": {
"telemetry_count": 110221,
"unique_callsigns": 2
}
}
},
"rdzTTGOsonde": {
"telemetry_count": 6316474,
"unique_callsigns": 154,
"versions": {
"devel20211101": {
"telemetry_count": 4358131,
"unique_callsigns": 97
},
"master_v0.9.0": {
"telemetry_count": 1138525,
"unique_callsigns": 38
},
"devel20211023": {
"telemetry_count": 61601,
"unique_callsigns": 7
},
"devel20211003": {
"telemetry_count": 86372,
"unique_callsigns": 3
},
"devel20211016": {
"telemetry_count": 144274,
"unique_callsigns": 3
},
"devel20211005": {
"telemetry_count": 164342,
"unique_callsigns": 2
},
"devel20211010": {
"telemetry_count": 116775,
"unique_callsigns": 2
},
"devel20211031": {
"telemetry_count": 19485,
"unique_callsigns": 2
},
"devel20210913": {
"telemetry_count": 126205,
"unique_callsigns": 1
},
"devel20210914": {
"telemetry_count": 46328,
"unique_callsigns": 1
}
}
},
"SondeMonitor": {
"telemetry_count": 87314,
"unique_callsigns": 11,
"versions": {
"6.2.5.8": {
"telemetry_count": 36082,
"unique_callsigns": 9
},
"6.2.4.7": {
"telemetry_count": 50975,
"unique_callsigns": 1
},
"6.2.5.3": {
"telemetry_count": 257,
"unique_callsigns": 1
}
}
},
"rdzTTGO": {
"telemetry_count": 131422,
"unique_callsigns": 2,
"versions": {
"DL2MF-20220111": {
"telemetry_count": 131422,
"unique_callsigns": 2
}
}
}
}
Yeah that looks perfect to me, I do have one question and I'm assuming it's an ElasticSearch problem that we can't do much about but the sum of versions doesn't always equal the top sum. I think ElasticSearch creates an other category at least in the case of visualisations but that doesn't even make sense as the sum of versions is sometimes greater than the total sum for auto rx: 553 total vs 562 sum of top 10 versions, I'm assuming this is from people upgrading and getting counted twice?
Yes that's right, when people upgrade they'll be counted twice. Not a lot we can do about that. I'm not exactly how Kibana manages displaying this, but I'd guess that they just create their own sum rather than using the top level agg, and only use the top level agg for labels.
We can generate graphs showing the number and breakdown of receivers using the Visualise tool in ElasticSearch however it can be hard to make these publically accessible. The solution to this would be to create an API that returns the necessary data to generate these graphs.
The following ElasticSearch requests gets the last 7 days of telemetry data (~44 million packets) and returns the software names and versions according to the unique number of callsigns for each. The response also includes the raw number of packets which match each software and version.
I'm not sure if this can easily be made into an API, it shouldn't require any input fields.
This is the ElasticSearch response from the above request:
The API would need to return the following information:
The ElasticSearch query takes about 7000ms so I would suggest caching it heavily using Cloudfront.