enable TotalPeerDisConnected metrics #35
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
My Understanding about metrics of websocket connection on peers
According to my understanding, for monitoring websocket connection between rancher-server peers, it usually needs the following metrics. ( I will call rancher-server who sends the establishment request as client, rancher-server who received the establishment request as server)
TotalAddPeerAttempt: It is increased before one rancher-server sends the Websocket connection establishment request to its peers in client rancher-server side
TotalPeerConnected: It is increased after the WebSocket connection is established successfully to its peers in client rancher-server side
TotalPeerDisConnected: It should be increased after the Websocket connection between peers is disconnected in client rancher-server side.
TotalAddWS: It should be increased when the rancher-server finished the Websocket connection establishment by sending the HTTP response in server rancher-server side.
TotalRemoveWS: It should be increased after agents or peers close the Websocket connection in server rancher-server side
Issues
Why I would like to enable it