-
Notifications
You must be signed in to change notification settings - Fork 813
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 UDP metrics. #1974
Add UDP metrics. #1974
Conversation
Thanks @gphat we'll review this soon |
@@ -239,6 +244,20 @@ def _check_linux(self, instance): | |||
|
|||
for key, metric in tcp_metrics_name.iteritems(): | |||
self.rate(metric, self._parse_value(tcp_metrics[key])) | |||
|
|||
asert(udp_metrics['Udp:'] == 'Udp:') |
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.
small typo, asert
--> assert
Hi @gphat, thanks for the contribution! A few typos to fix, but apart from that it looks good to me. |
b7c4ca4
to
ae2d52d
Compare
Thanks @hkaj! Gonna do some testing here to verify things work before I say this is ready again. Sorry for not testing this. |
Ok, I verified this works as expected locally. Sorry again, @hkaj! |
No worries. Thanks for the contribution, UDP metrics will join their TCP counterpart in 5.6.0! 🎊 |
🎉 Yeah @alq666 I guess I type "stripe" a lot. 😅 |
FYI, the A simple test on the existence of the metrics here could be enough to fix this. I won't be super available for the next couple of days, could you have a further look at this @hkaj? :) |
Added a test, good catch! |
Good catch indeed! I checked on Ubuntu and CentOS 7 but didn't test on them oldies. #1986 should fix that. |
What's this PR do?
Adds UDP metrics from
/proc/net/snmp
in addition to the existing TCP metrics.Motivation
We have some things using UDP and they are having trouble keeping up. Our most reliable indicator of this problem are dropped UDP due to full buffers. This adds that functionality to the agent so that we can see it in charts!
Notes
I basically lifted the existing TCP code and made few modifications to have different variables for TCP versus UDP. If you'd prefer this refactored some for lessening code duplication, I'm open to refactoring with guidance.