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

Emit metrics for local memberlist size and remote memberlist size #276

Merged
merged 12 commits into from Sep 14, 2022

Conversation

jmurret
Copy link
Contributor

@jmurret jmurret commented Aug 26, 2022

Changes proposed

  • emit a "memberlist", "node", "instances" Gauge and pass label so a gauge can be broken out by node state
    • it appears gauges are reported with the host/pod name in the metric. so the above gauge will emit metrics in the sink (grafana) for 1 server and 3 clients as:
      • consul_server_0_memberlist_node_instances
      • consul_client_1_memberlist_node_instances
      • consul_client_2_memberlist_node_instances
      • consul_client_3_memberlist_node_instances

Screen Shot 2022-08-30 at 11 53 49 AM

Screen Shot 2022-08-30 at 11 53 26 AM

  • emit "memberlist", "size", "local" Gauge that reports the size in bytes of the memberlist size before it is sent to another gossip recipient.
    • same condition as above for multiple metrics being create by hostname

Screen Shot 2022-08-30 at 11 56 46 AM

- emit `"memberlist", "size", "remote"` Gauge that reports the size of incoming memberlists from other gossip senders - is this helpful? I feel like we would have to add a label for who is sending it?

@jmurret jmurret closed this Aug 26, 2022
@jmurret jmurret reopened this Aug 26, 2022
@jmurret jmurret changed the title add emitting ofmetrics for local memberlist size and remote memberlist size Emit metrics for local memberlist size and remote memberlist size Aug 26, 2022
@jmurret jmurret changed the base branch from master to jm/intent-queue-metric August 27, 2022 01:58
Base automatically changed from jm/intent-queue-metric to master August 29, 2022 15:45
@jmurret jmurret requested review from rboyer and huikang August 30, 2022 18:15
net.go Outdated Show resolved Hide resolved
net.go Outdated Show resolved Hide resolved
@jmurret jmurret marked this pull request as ready for review August 30, 2022 18:20
@@ -1042,6 +1074,9 @@ func (m *Memberlist) sendLocalState(conn net.Conn, join bool, streamLabel string
}
}

moreBytes := binary.BigEndian.Uint32(bufConn.Bytes()[1:5])
metrics.SetGaugeWithLabels([]string{"memberlist", "size", "local"}, float32(moreBytes), m.metricLabels)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

suggestions for a better metric name? (also, see question below about removing the remote metric, which might make naming this easier.)

@jmurret jmurret requested a review from rboyer August 30, 2022 21:19
state.go Outdated Show resolved Hide resolved
@jmurret jmurret requested a review from rboyer September 13, 2022 21:20
Copy link
Member

@rboyer rboyer left a comment

Choose a reason for hiding this comment

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

Once the library versioning bumps are done these can be documented on the consul telemetry page on the website.

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.

None yet

2 participants