feat: dcipher monitoring agent#169
Conversation
|
Considering this to close https://github.com/randa-mu/onlysubs-planning/issues/50 |
36a1941 to
f3665a4
Compare
A simple agent for monitoring wallet balances and exporting them via prometheus
f3665a4 to
3489117
Compare
| short = 'c', | ||
| long = "config", | ||
| env = "MONITORING_CONFIG", | ||
| default_value = "~/.config/monitoring/config.toml" |
There was a problem hiding this comment.
| default_value = "~/.config/monitoring/config.toml" | |
| default_value = "~/.config/onlyswaps/monitoring/config.toml" |
There was a problem hiding this comment.
technically this will transcend onlyswaps, otherwise we should make this onlyswaps-monitoring
There was a problem hiding this comment.
could also do ~/.config/dcipher/monitoring/config.toml?
| let metrics = Arc::new(metrics); | ||
|
|
||
| let probe = ProbeService::new(&config).await?; | ||
| let mut ticker = tokio::time::interval(config.metrics.frequency); |
There was a problem hiding this comment.
Why not just grab the data when the /metrics endpoint is being queried instead of having to configure frequency in both here and in promtail?
There was a problem hiding this comment.
ah yeah, that's a much better idea actually
There was a problem hiding this comment.
well the risk is that things take very long and it delays metrics
There was a problem hiding this comment.
apparently doing it on request isn't best practice
|
|
||
| jobs: | ||
| build-and-push: | ||
| runs-on: "ubuntu-latest" |
There was a problem hiding this comment.
Please use our runners to avoid the egress costs on docker pulls
A simple agent for monitoring wallet balances and exporting them via prometheus
I'll extend this soon to listen for contract events and other interesting data