Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 12375002: Implement more detailed bandwidth monitoring (Closed)

Created:
Oct. 1, 2013, 5:30 p.m. by Wladimir Palant
Modified:
Nov. 8, 2013, 8:07 a.m.
Reviewers:
Felix Dahlke
Visibility:
Public.

Description

The point here is to provide a more detailed breakdown for the traffic - in particular, it allows seeing HTTP/HTTPS/SSH traffic separately and will also list any unusual traffic (unknown Level 3/Level 4 protocol or unknown port).

Patch Set 1 #

Patch Set 2 : Do not account for Ethernet overhead #

Patch Set 3 : Fixed permissions #

Patch Set 4 : Increased socket timeout and offloaded time calculations to tcpdump #

Total comments: 21

Patch Set 5 : Fixed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+128 lines, -13 lines) Patch
M manifests/monitoringserver.pp View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
M modules/nagios/files/check_bandwidth View 1 2 3 4 1 chunk +109 lines, -10 lines 0 comments Download
A modules/nagios/files/sudoers View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M modules/nagios/manifests/client.pp View 1 2 1 chunk +13 lines, -2 lines 0 comments Download

Messages

Total messages: 9
Wladimir Palant
Oct. 1, 2013, 5:30 p.m. (2013-10-01 17:30:39 UTC) #1
Wladimir Palant
The point here is to provide a more detailed breakdown for the traffic - in ...
Oct. 1, 2013, 6:15 p.m. (2013-10-01 18:15:26 UTC) #2
Wladimir Palant
Running this tcpdump-based script and bwm-ng in parallel it seems that bwm-ng doesn't account for ...
Oct. 2, 2013, 7:37 a.m. (2013-10-02 07:37:08 UTC) #3
Wladimir Palant
I forgot to check whether nagios plugins run with root privileges - turns out they ...
Oct. 4, 2013, 12:49 p.m. (2013-10-04 12:49:52 UTC) #4
Wladimir Palant
For the record, the changes here turned out to be not sufficient - pnp4nagios reacts ...
Oct. 4, 2013, 12:54 p.m. (2013-10-04 12:54:23 UTC) #5
Wladimir Palant
It wasn't really obvious but tcpdump has a parameter combination that makes it stop after ...
Oct. 9, 2013, 7:39 a.m. (2013-10-09 07:39:05 UTC) #6
Felix Dahlke
http://codereview.adblockplus.org/12375002/diff/16001/manifests/monitoringserver.pp File manifests/monitoringserver.pp (right): http://codereview.adblockplus.org/12375002/diff/16001/manifests/monitoringserver.pp#newcode146 manifests/monitoringserver.pp:146: check_command => 'check_nrpe_timeout!check_bandwidth!20', Why does this need a timeout ...
Oct. 10, 2013, 8:29 a.m. (2013-10-10 08:29:07 UTC) #7
Wladimir Palant
I've addressed the comments unless noted otherwise. Also, the previous changeset didn't include a sudoers ...
Oct. 10, 2013, 9:37 a.m. (2013-10-10 09:37:46 UTC) #8
Felix Dahlke
Oct. 10, 2013, 9:44 a.m. (2013-10-10 09:44:34 UTC) #9
LGTM

http://codereview.adblockplus.org/12375002/diff/16001/modules/nagios/files/ch...
File modules/nagios/files/check_bandwidth (right):

http://codereview.adblockplus.org/12375002/diff/16001/modules/nagios/files/ch...
modules/nagios/files/check_bandwidth:57: length = float(orig_len * 8) / INTERVAL
On 2013/10/10 09:37:46, Wladimir Palant wrote:
> On 2013/10/10 08:29:08, Felix H. Dahlke wrote:
> > length -> bits_per_second?
> 
> bps?

Sure.

http://codereview.adblockplus.org/12375002/diff/16001/modules/nagios/files/ch...
modules/nagios/files/check_bandwidth:73: ihl = ord(payload[0]) & 0xF
On 2013/10/10 09:37:46, Wladimir Palant wrote:
> On 2013/10/10 08:29:08, Felix H. Dahlke wrote:
> > Shouldn't it be 0x4? 0xF would get us both version and IHL I think.
> 
> No, that's correct - "& 0xF0" gives you the first 4 bits, "& 0x0F" the last 4
> bits.

Um, yes, I confused something there, it's the number of bits of course :)

Powered by Google App Engine
This is Rietveld