node: Add metrics for current GRPC endpoint status #580
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#580
Loading…
Reference in a new issue
No description provided.
Delete branch "acid-ant/frostfs-node:bugfix/565-metrics-for-grpc-endpnt"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Close #565
Metrics example:
Signed-off-by: Anton Nikiforov an.nikiforov@yadro.com
@ -69,9 +69,11 @@ func initGRPC(c *cfg) {
lis, err := net.Listen("tcp", sc.Endpoint())
if err != nil {
c.metricsCollector.GrpcMetrics().MarkUnhealthy(sc.Endpoint())
srv.Serve
can fail too, what about setting status there?My fault, updated. Introduced new slice because listener return string representation of address based on implementation.
What are the differences between representations?
According to doc it is up to implementation the exact form of the string. Looks like there are no guarantees that String() will return the value which equal to arguments of
net.Listen(...)
https://github.com/golang/go/blob/master/src/net/net.go#L96
@ -0,0 +20,4 @@
prometheus.GaugeOpts{
Namespace: namespace,
Subsystem: grpcSubsystem,
Name: "health",
Maybe
frostfs_grpc_server_health
?Agree, updated. Now it looks like this:
aca9cfba17
to1d65a1addb
LGTM