Skip to content

feat: dcipher monitoring agent#169

Merged
CluEleSsUK merged 4 commits into
mainfrom
feat/balance-monitoring
Oct 16, 2025
Merged

feat: dcipher monitoring agent#169
CluEleSsUK merged 4 commits into
mainfrom
feat/balance-monitoring

Conversation

@CluEleSsUK
Copy link
Copy Markdown
Contributor

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

@CluEleSsUK
Copy link
Copy Markdown
Contributor Author

Considering this to close https://github.com/randa-mu/onlysubs-planning/issues/50

@CluEleSsUK CluEleSsUK force-pushed the feat/balance-monitoring branch 3 times, most recently from 36a1941 to f3665a4 Compare October 15, 2025 15:16
A simple agent for monitoring wallet balances and exporting them via
prometheus
@CluEleSsUK CluEleSsUK force-pushed the feat/balance-monitoring branch from f3665a4 to 3489117 Compare October 15, 2025 15:23
Comment thread bin/monitoring/src/config.rs Outdated
short = 'c',
long = "config",
env = "MONITORING_CONFIG",
default_value = "~/.config/monitoring/config.toml"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
default_value = "~/.config/monitoring/config.toml"
default_value = "~/.config/onlyswaps/monitoring/config.toml"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

technically this will transcend onlyswaps, otherwise we should make this onlyswaps-monitoring

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then .config/dcipher 😛

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yeah, that's a much better idea actually

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well the risk is that things take very long and it delays metrics

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apparently doing it on request isn't best practice

Comment thread .github/workflows/push-monitoring.yml Outdated

jobs:
build-and-push:
runs-on: "ubuntu-latest"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use our runners to avoid the egress costs on docker pulls

@CluEleSsUK CluEleSsUK merged commit 104119c into main Oct 16, 2025
10 checks passed
@CluEleSsUK CluEleSsUK deleted the feat/balance-monitoring branch October 16, 2025 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants