Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Info Metric #45

Merged
merged 1 commit into from
Jul 7, 2020
Merged

Add Info Metric #45

merged 1 commit into from
Jul 7, 2020

Conversation

ajcrowe
Copy link
Contributor

@ajcrowe ajcrowe commented Sep 12, 2019

This adds an metric for collecting miscellaneous node information

Currently collects

  • Alias
  • Pubkey
  • Version
# HELP lnd_info lnd node info
# TYPE lnd_info gauge
lnd_info{alias="02e47c1ee7c53fdd445f",pubkey="02e47c1007c43fdd9423f6e473a9bda81de6e95784749e10bf2dcaf95267c39f38",version="0.7.0-beta commit=v0.7.0-beta"} 0

Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

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

Nice! The version metric will be especially useful once we expand support to monitor multiple nodes, as you'll be able to track the versions of each erected nodes during processes like rolling updates.


// InfoCollector is a collector that keeps track of node information.
type InfoCollector struct {
info *prometheus.Desc
Copy link
Member

Choose a reason for hiding this comment

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

Is this actually useful in its current form? Given that the value is always zero, and AFAIK, there's no easy way to project only a label name into the graphs on Grafana.

Copy link
Contributor Author

@ajcrowe ajcrowe Dec 7, 2019

Choose a reason for hiding this comment

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

You can use these label values with a Singlestat visualisation.

You format the metric as a table, then you can select the Field in the visualisation setting to be any of the labels

Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

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

LGTM 🚧

@Roasbeef Roasbeef merged commit ff9aac9 into lightninglabs:master Jul 7, 2020
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