Repository navigation
Collect HA link counters and Advanced Routing Engine BGP and OSPF in Palo Alto Networks Firewall - #25806
Conversation
✅ Dispatcher tests: passed
✅ 2 passed · nothing failed Batches · ✅ batch-01 2/2 Dispatcher finished on |
evalya-impact-summaryEvalya CI impact |
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 0a2381a | Docs | View more details | Give us feedback! |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1f160a3 to
f31f2eb
Compare
Disk usage changeCommit Uncompressed
Details
Compressed
Details
|
Send accepted prefixes as bgp.peer.prefixes.incoming.accepted on both routing engines and base prefix-limit utilization on it. Skip a failing logical router or HA link with a warning instead of dropping every sample. Note in metadata.csv which engine sends each routing metric. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The device record sent "Palo Alto Networks" while every metric carried device_vendor:paloaltonetworks, so NDM derived a second tag, device_vendor:palo_alto_networks. Use the tag constant for both, matching the SNMP Palo Alto profile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d rule hit collectors The skip-one, fail-when-all-fail loop was written out in collect_ha, collect_are and collect_rule_hits, and the rule hits copy had already drifted (it caught only PanosApiError and re-raised only PanosAuthError). Move it to read_each in collectors/base.py so the three follow one rule: auth and connection errors propagate at once, any other PanosError skips the item with a warning, and the last error is raised when nothing answered. No behavior change: client.op raises nothing the old rule hits loop handled differently. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fe5dde1704
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…e unreleased fixed entry - Remove tests that repeat coverage: the ARE restart boundary (bgp_restart is tested on the legacy path), camel_afi_safi_tag and the logical router names (covered by the capture tests), the ARE OSPF empty answer, and the HA unknown-shape parse test (covered through collect_ha). - Test read_each in test_base.py instead of per collector: skip and report, raise the last error when nothing answered, propagate auth and connection errors. Each collector keeps one failing-item wiring test, and HA keeps the check that ha_state survives a failed run. - Drop changelog.d/25806.fixed: the NDM vendor value it describes was never released. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
More details
Fixture-based validation supports HA counter collection and Advanced Routing Engine BGP/OSPF parsing. Docker E2E and live-firewall behavior remain unverified.
🤖 Bits Code Review · Commit fe5dde1
| return [sample for router, data in answers for sample in parse(data, router)] | ||
|
|
||
|
|
||
| def collect_bgp(ctx: CollectContext) -> list[Sample]: |
There was a problem hiding this comment.
Q: What does PAN-OS return for a logical router that has no BGP or OSPF configured? If it returns an API error, every router fails, and "collector bgp failed" is logged on every run for firewalls that don't use BGP.
The only Advanced Routing Engine captures (fw-b) come from a router that has both protocols configured.
There was a problem hiding this comment.
I changed the ARE collectors so that when every logical router answers with an API error, they warn once per router and send nothing, instead of failing and retrying on every run. Auth and connection errors still fail the collector. The tests cover the empty answer and the all-routers-error case.
… API error A logical router without BGP or OSPF may answer with an error rather than empty JSON; failing the collector would log and retry it on every run on firewalls that do not run the protocol. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Validation ReportAll 22 validations passed. Show details
|
|
Backport evaluation: View Slack thread |
What does this PR do?
Adds two collections to the Palo Alto Networks Firewall check:
ha.interface.*counters for each configured HA link (HA1, HA2). When HA1 runs on the management port, PAN-OS reports the whole management interface's counters.vrtag. Previously this engine only produced a warning.It also adds
bgp.peer.prefixes.incoming.acceptedon both routing engines, and computesbgp.peer.prefix_limit.utilizationfrom accepted prefixes on both, so each metric means the same thing on either engine. The Advanced Routing Engine does not report received, rejected or total outgoing prefixes, so those metrics are legacy-only;bgp.peer.connections.*andospf.neighbor.state_changesare Advanced-Routing-Engine-only.A failing HA link or logical router is now skipped with a warning instead of dropping the collector's other samples, using the same helper as the rule hits collector. The NDM device vendor is now
paloaltonetworks, matching thedevice_vendortag and the SNMP profile.Tested with unit tests on anonymized lab captures and a live run against the four lab firewalls on staging.
Motivation
Stacked on #25662, which is merged but not yet released. The NDM lab now has an HA pair and a firewall running the Advanced Routing Engine, so these product brief datapoints can be tested.
Checklist before requesting review
🤖 Generated with Claude Code