Skip to content

Conversation

joostjager
Copy link
Contributor

@joostjager joostjager commented Feb 12, 2021

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
Copy link
Contributor Author

@carlaKC are you open to accepting this PR?

@carlaKC carlaKC self-requested a review February 15, 2021 18:11
@carlaKC
Copy link
Contributor

carlaKC commented Feb 15, 2021

@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.

Copy link
Contributor

@carlaKC carlaKC left a comment

Choose a reason for hiding this comment

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

Happy with the addition of this metric, but I'd like to pair it with adding some panels to the provisioned grafana dash since I'd imagine most people will use the full docker-compose setup. Just pending channels by state and closed channels by close type will do I think.

@joostjager
Copy link
Contributor Author

Panels added

@joostjager joostjager requested a review from carlaKC February 16, 2021 11:33
Copy link
Contributor

@carlaKC carlaKC left a comment

Choose a reason for hiding this comment

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

Just noticed that we already have lnd_channels_pending_total on the existing Channel Count panel, so we don't actually need a new one, just to add status label to it.

Otherwise happy with this!

@joostjager
Copy link
Contributor Author

Hmm yes, I missed that. Merged dashboards.

@carlaKC
Copy link
Contributor

carlaKC commented Feb 17, 2021

Thanks for the PR, latest iteration looks good!

@carlaKC carlaKC merged commit 013423e into lightninglabs:master Feb 17, 2021
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