nav icon indicating copy to clipboard operation
nav copied to clipboard

Make snmptrapd able to identify trap agents that use a different IP to send traps than to receive SNMP queries

Open ragnhildbodsberg opened this issue 2 years ago • 5 comments

Closes #2387

ragnhildbodsberg avatar Aug 09 '22 10:08 ragnhildbodsberg

Codecov Report

Merging #2461 (f25b006) into master (26c69f1) will increase coverage by 0.18%. The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2461      +/-   ##
==========================================
+ Coverage   52.72%   52.91%   +0.18%     
==========================================
  Files         552      554       +2     
  Lines       40186    40241      +55     
==========================================
+ Hits        21190    21294     +104     
+ Misses      18996    18947      -49     
Impacted Files Coverage Δ
python/nav/snmptrapd/trap.py 30.23% <ø> (ø)
python/nav/ipdevpoll/pool.py 84.88% <0.00%> (-5.04%) :arrow_down:
python/nav/web/sortedstats/views.py 36.36% <0.00%> (-4.82%) :arrow_down:
python/nav/mibs/cisco_enhanced_memory_pool_mib.py 78.57% <0.00%> (ø)
python/nav/mibs/arista_vrf_mib.py 100.00% <0.00%> (ø)
python/nav/ipdevpoll/plugins/statsystem.py 29.33% <0.00%> (+0.47%) :arrow_up:
python/nav/ipdevpoll/plugins/typeoid.py 48.88% <0.00%> (+0.57%) :arrow_up:
python/nav/ipdevpoll/plugins/arp.py 40.51% <0.00%> (+0.89%) :arrow_up:
python/nav/ipdevpoll/utils.py 61.45% <0.00%> (+3.50%) :arrow_up:
python/nav/ipdevpoll/db.py 84.61% <0.00%> (+3.84%) :arrow_up:
... and 4 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Aug 09 '22 11:08 codecov[bot]

Test results

     12 files       12 suites   10m 59s :stopwatch: 3 090 tests 2 994 :heavy_check_mark:   96 :zzz: 0 :x: 8 745 runs  8 457 :heavy_check_mark: 288 :zzz: 0 :x:

Results for commit f25b0067.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Aug 09 '22 11:08 github-actions[bot]

Was not able to test this solution on an actual device. Tried to find a switch that we could send SNMP trap from and contacted the "stamnett" team for that purpose and tried to test with the switch named "teknobyen-lab-sw.uninett.no". Unfortunately, this was not possible (most likely due to a firewall).

For this reason this might not be the correct solution, but at least a suggestion.

ragnhildbodsberg avatar Aug 09 '22 11:08 ragnhildbodsberg

For this reason this might not be the correct solution, but at least a suggestion.

It's still pretty easy to just verify the SQL statement, and this suggestion does work as intended :) I've only made minor stylistic formatting changes.

lunkwill42 avatar Aug 25 '22 13:08 lunkwill42

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Aug 25 '22 13:08 sonarqubecloud[bot]

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Nov 03 '22 11:11 sonarqubecloud[bot]