Add parent-tunnel byte counters (NPU-offload-accurate)#405
Open
maksim-humbility wants to merge 1 commit into
Open
Add parent-tunnel byte counters (NPU-offload-accurate)#405maksim-humbility wants to merge 1 commit into
maksim-humbility wants to merge 1 commit into
Conversation
d7490db to
e592924
Compare
Contributor
|
this also needs a proper test case, can you add that to the vpn_ipsec_test.go / testdata? |
Signed-off-by: Maksim Samonov <maksim.samonov@humbility.io>
e592924 to
ee0ecc5
Compare
Author
|
@bastischubert Added tests for the new metrics in Updated:
Local verification: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per-Phase-2 (proxyid) incoming_bytes/outgoing_bytes stay at 0 on FortiGate models with NPU offload (default on 60F, 100F, 120G, 200F+) because the hardware bypasses the CPU-side per-SA counters. The /api/v2/monitor/vpn/ipsec response also contains parent-level incoming_bytes/outgoing_bytes that aggregate the NPU hardware counters and are accurate.
Add two new metrics that read those parent-level fields. Existing per-proxyid metrics are kept unchanged for backward compatibility.
Tested in production against 4× FortiGate 120G with NPU offload — parent counters match 'diagnose vpn ipsec tunnel summary' rx/tx values; legacy per-proxyid stays at zero.
Refs: #401