-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 tcpstat connection states per source/dest ports #2785
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Tomáš Kadaně <tomas.kadane@cdn77.com>
67bb15b
to
4e094ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, LGTM!
@@ -75,6 +84,11 @@ func NewTCPStatCollector(logger log.Logger) (Collector, error) { | |||
"Number of connection states.", | |||
[]string{"state"}, nil, | |||
), prometheus.GaugeValue}, | |||
descPort: typedDesc{prometheus.NewDesc( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably not be a separate metric, but rather change the labels for the existing metric depending on the flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how to implement this. The new metric is working per source/dest port, that is being described by labels "type" and "port". Based on your comment, the solution should be one metric that based on the flags should contain the labels or not? The prometheus library won't allow me to do so. Can you please explain further, how you mean it? thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SuperQ Hi, can I ask you about the implementation? We need to have the metrics and I would like to finish the MR, thanks:)
This is (will be) really cool @tomachine ! |
Added new metric to tcpstats collector, as requested here #2490.