Skip to content

Added metrics from Linux /proc stats as sockstat and others#1904

Closed
maatthc wants to merge 5 commits into
DataDog:masterfrom
maatthc:master
Closed

Added metrics from Linux /proc stats as sockstat and others#1904
maatthc wants to merge 5 commits into
DataDog:masterfrom
maatthc:master

Conversation

@maatthc

@maatthc maatthc commented Sep 10, 2015

Copy link
Copy Markdown
  • /proc/net/sockstat
  • /proc/sys/net/ipv4/tcp_mem
  • /proc/sys/net/ipv4/tcp_max_orphans
  • /proc/sys/net/ipv4/netfilter/ip_conntrack_count
  • /proc/sys/net/ipv4/ip_conntrack_max
    Also from the command :
    /usr/bin/getconf PAGESIZE
    Those are critical metrics for high performance applications.

- /proc/net/sockstat
- /proc/sys/net/ipv4/tcp_mem
- /proc/sys/net/ipv4/tcp_max_orphans
- /proc/sys/net/ipv4/netfilter/ip_conntrack_count
- /proc/sys/net/ipv4/ip_conntrack_max
Also from the command :
 /usr/bin/getconf PAGESIZE
Those are critical metrics for high performance applications.
@remh

remh commented Sep 15, 2015

Copy link
Copy Markdown

Thanks a lot @maatthc
Our master branch is currently frozen in regards of our 5.5.0 release.

We'll review this PR for our 5.6.0 release.
Thanks again !

@remh remh added this to the 5.6.0 milestone Sep 15, 2015
@remh remh modified the milestones: 5.7.0, 5.6.0 Oct 23, 2015
Comment thread checks.d/network.py

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@maatthc This line seems to be causing tests to fail. Would you mind confirming when you have a moment?

ImportError: cannot import name check_output

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hi,
check_output is only available with Python 2.7 - It will work well with the embedded version that comes with Datadog:
sudo -u dd-agent dd-agent check network

Cheers

@irabinovitch

Copy link
Copy Markdown
Contributor

@maatthc Thank you for your work on this and for being a part of the Datadog community. We'd like to include in this in an upcoming release, but at the moment it looks to be failing tests. Would you mind taking a look at getting them passing? Happy to help if you need any assistance.

Most of the failures look to be simple style issues raised by flake8. You can validate these by running flake8 locally. However there also seems to be an issue with the new imports added on line 7.

flake8
./checks.d/network.py:226:1: W293 blank line contains whitespace
./checks.d/network.py:230:1: W293 blank line contains whitespace
./checks.d/network.py:340:37: E127 continuation line over-indented for visual indent
./checks.d/network.py:341:37: E127 continuation line over-indented for visual indent
./checks.d/network.py:449:1: W293 blank line contains whitespace
./checks.d/network.py:462:1: W293 blank line contains whitespace
./checks.d/network.py:475:1: W293 blank line contains whitespace
./checks.d/network.py:487:13: F821 undefined name 'self'
./checks.d/network.py:487:50: E225 missing whitespace around operator
./checks.d/network.py:488:1: W293 blank line contains whitespace
./checks.d/network.py:489:18: W291 trailing whitespace
./checks.d/network.py:492:1: W293 blank line contains whitespace
./checks.d/network.py:495:71: W291 trailing whitespace
./checks.d/network.py:496:54: W291 trailing whitespace
./checks.d/network.py:503:1: W293 blank line contains whitespace
./checks.d/network.py:505:13: F821 undefined name 'self'
./checks.d/network.py:505:50: E225 missing whitespace around operator
./checks.d/network.py:506:39: E703 statement ends with a semicolon
./checks.d/network.py:506:40: W291 trailing whitespace
./checks.d/network.py:507:61: E703 statement ends with a semicolon
./checks.d/network.py:507:62: W291 trailing whitespace
./checks.d/network.py:508:38: E703 statement ends with a semicolon
./checks.d/network.py:509:1: W293 blank line contains whitespace
./checks.d/network.py:531:17: F821 undefined name 'self'
./checks.d/network.py:531:55: E225 missing whitespace around operator
./checks.d/network.py:533:1: W293 blank line contains whitespace
./checks.d/network.py:551:117: E225 missing whitespace around operator
./checks.d/network.py:551:118: E202 whitespace before ')'
./checks.d/network.py:551:120: E225 missing whitespace around operator
./checks.d/network.py:557:13: F821 undefined name 'self'
./checks.d/network.py:557:50: E225 missing whitespace around operator
./checks.d/network.py:559:1: W293 blank line contains whitespace
./checks.d/network.py:562:30: W292 no newline at end of file

@maatthc

maatthc commented Nov 10, 2015

Copy link
Copy Markdown
Author

Added support to Talk to the PHP process using FCGI instead of HTTP protocol - this way you don't need a WebServer running in front of the PHP_FPM process.

@remh

remh commented Nov 10, 2015

Copy link
Copy Markdown

Thanks a lot @maatthc
I think you should split this PR into multiple ones as this PR is doing a lot of different stuff.

Also can you please make sure to comply with the contributing guidelines please ?
https://github.com/DataDog/dd-agent/blob/master/CONTRIBUTING.md

Thanks again for this work!

@maatthc maatthc closed this Nov 12, 2015
@maatthc

maatthc commented Nov 16, 2015

Copy link
Copy Markdown
Author

Hi guys,
I've raised the pull #2070 with the network part and I will raise a different one for the PHP part.

Cheers

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.

3 participants