Skip to content

Strip white space when reading from proc_conntrack_max_path#3365

Merged
ofek merged 1 commit into
masterfrom
ianb/network_rstrip
Mar 25, 2019
Merged

Strip white space when reading from proc_conntrack_max_path#3365
ofek merged 1 commit into
masterfrom
ianb/network_rstrip

Conversation

@ian28223

@ian28223 ian28223 commented Mar 25, 2019

Copy link
Copy Markdown
Contributor

What does this PR do?

strips potential whitespaces when reading from proc_conntrack_max_path

Motivation

Running the check manually on agent 5 includes trailing whitespaces for the value.

Metrics:
[('system.net.conntrack.max',
  1553479163,
  '16384\n',
  {'hostname': 'ubuntu-a5-1', 'type': 'gauge'})]
Events:
[]
Service Checks:
[]
Service Metadata:
[{}]
    network (5.32.1)
    ----------------
      - instance #0 [OK]
      - Collected 1 metric, 0 events & 0 service checks

Additional Notes

Note: Actual value is actually successfully converted to float so there should be no impact to the values seen in UI.

Review checklist (to be filled by reviewers)

  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached
  • Feature or bugfix must have tests
  • Git history must be clean
  • If PR adds a configuration option, it must be added to the configuration file.

Running the check manually on agent 5 includes trailing whitespaces for the value.

```
Metrics:
[('system.net.conntrack.max',
  1553479163,
  '16384\n',
  {'hostname': 'ubuntu-a5-1', 'type': 'gauge'})]
Events:
[]
Service Checks:
[]
Service Metadata:
[{}]
    network (5.32.1)
    ----------------
      - instance #0 [OK]
      - Collected 1 metric, 0 events & 0 service checks
```

Note: Actual value is actually successfully converted to float so there should be no impact to the values seen in UI.
@ian28223
ian28223 requested a review from a team as a code owner March 25, 2019 02:11
@ian28223 ian28223 changed the title For agent5: strip whitespace [network] strips whitespace from reading proc_conntrack_max_path Mar 25, 2019
@codecov

codecov Bot commented Mar 25, 2019

Copy link
Copy Markdown

Codecov Report

Merging #3365 into master will decrease coverage by 17.42%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##           master    #3365       +/-   ##
===========================================
- Coverage   85.81%   68.39%   -17.43%     
===========================================
  Files         703        4      -699     
  Lines       36420      386    -36034     
  Branches     4313       72     -4241     
===========================================
- Hits        31255      264    -30991     
+ Misses       3951      100     -3851     
+ Partials     1214       22     -1192

@ofek ofek changed the title [network] strips whitespace from reading proc_conntrack_max_path Strip white space when reading from proc_conntrack_max_path Mar 25, 2019
@ofek
ofek merged commit 0cc48d4 into master Mar 25, 2019
@ofek
ofek deleted the ianb/network_rstrip branch March 25, 2019 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants