Add MESHCORE_TELEMETRY_POLL_24H_EXEMPT cooldown exemption for telemetry - #905
Merged
Merged
Conversation
nicjansma
force-pushed
the
auto-telemetry
branch
from
September 7, 2026 01:11
ca42d33 to
d05f35f
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've recently started playing with MeshCore in addition to a few Meshtastic nodes I have deployed.
For Meshtastic, I run a solar node and use Potato Mesh to gather telemetry and alert on its health (e.g. using prometheus metrics).
I've now deployed a MeshCore node, and wanted to track its health (e.g. battery) as well. I know MeshCore has a different telemetry philosophy, i.e. poll vs. a push model. This is controlled by
MESHCORE_TELEMETRY_POLL_SECONDS, but the current behavior is "each contact is additionally polled at most once per 24 h".I'd like to get more granular health data, i.e. every 5 minutes like I get from my Meshtastic nodes. I don't want this from every connectable MeshCore node, just my specific telemetry devices.
To do this I've added a
MESHCORE_TELEMETRY_POLL_24H_EXEMPTconfig variable that is an allow-list of nodes to poll more frequently. They will not be limited to one poll every 24h. TheMESHCORE_TELEMETRY_POLL_SECONDSstill applies, and only gathers a single telemetry request each poll interval, so nodes inMESHCORE_TELEMETRY_POLL_24H_EXEMPTwill approximately only get metrics eachMESHCORE_TELEMETRY_POLL_SECONDS * num_eligible_nodesseconds (the exempt nodes, plus any other contact whose 24 h cooldown has lapsed that rotation).AI Disclosure
This PR was co-authored with Claude. I have independently reviewed, tested and tweaked the output.