lightninglabs / lndmon

🔎lndmon: A drop-in monitoring solution for your lnd node using Prometheus+Grafana
MIT License
149 stars 47 forks source link

collectors: add close metrics #65

Closed joostjager closed 3 years ago

joostjager commented 3 years ago

This PR adds metrics so that a prometheus alert can be set up when a force-close happens. This is an event that unfortunately still seems to occur occasionally.

Example of an alert that becomes active if at least one channel was force-closed in the past 24 hours:

round(sum(delta(lnd_closed_channels_total{close_type="local_force"}[1d]) or delta(lnd_closed_channels_total{close_type="remote_force"}[1d]) or delta(lnd_channels_pending_total{state="pending_force_close"}[1d]))) > 0

joostjager commented 3 years ago

@carlaKC are you open to accepting this PR?

carlaKC commented 3 years ago

@carlaKC are you open to accepting this PR?

Yes, looks like a nice change to have! Self assigned review, will get to it this week.

joostjager commented 3 years ago

Panels added

joostjager commented 3 years ago

Hmm yes, I missed that. Merged dashboards.

carlaKC commented 3 years ago

Thanks for the PR, latest iteration looks good!