Repository navigation
Add FortiGate hardware sensor table support - #25010
matthewleese wants to merge 7 commits into
Conversation
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 8e85f65 | Docs | View more details | Give us feedback! |
evalya-impact-summaryEvalya CI impact |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dd31c7f2cc
ℹ️ 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".
✅ Dispatcher tests: passed
✅ 6 passed · nothing failed Batches · ✅ batch-01 6/6 Dispatcher finished on |
Disk usage changeCommit Uncompressed
Details
Compressed
Details
|
FRNDM-506: expose FORTINET-FORTIGATE-MIB's fgHwSensorTable
(temperature, fan speed, voltage, etc., depending on device model),
tagged by sensor_index and sensor_name, plus the per-sensor
fgHwSensorAlarmStatus.
fgHwSensorEntValue is a DisplayString whose exact format (units,
precision) isn't documented and varies by sensor/device model, so
fgHwSensorValue uses extract_value to pull the leading numeric portion
out of it. This wasn't verified against a live device or a customer
snmpwalk, so the regex may not match every device's exact value
format; the e2e fixture uses representative but synthetic values
('25.0 C', '3300').
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The unit test's assert_all_metrics_covered() and the metadata.csv description file both needed to know about fgHwSensorValue and fgHwSensorAlarmStatus, or CI fails with "metrics are collected but not asserted".
ruff format collapses a call onto one line when it fits within the line-length limit; the multi-line form was flagged by the CI lint gate.
validate-assets and validate-logs_validator failed with an internal
Datadog system error unrelated to this PR's content ("not a problem
with your assets" / "contact Datadog"). Isolated to this PR among
recent open PRs, so retriggering rather than changing anything.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
fgHwSensorTable covers temperature and voltage sensors, which can report negative readings; the regex only matched from an unsigned digit, so a leading minus sign made extract_value fail and dropped the metric entirely.
e90fd82 to
dc4bc2c
Compare
|
@DataDog please fix my ci |
|
I can only run on private repositories. |
Validation ReportAll 22 validations passed. Show details
|
|
/merge |
|
View all feedbacks in Devflow UI.
The merge queue is disabled for this repository/branch. |
What does this PR do?
Adds two new table-based metrics from FORTINET-FORTIGATE-MIB's
fgHwSensorTable:fgHwSensorValue(numeric sensor reading) andfgHwSensorAlarmStatus(whether the sensor is out of normal range), tagged bysensor_indexandsensor_name.Motivation
FRNDM-506: expose FortiGate hardware sensor data (temperature, fan speed, voltage, etc., depending on device model) which is currently unmapped in the profile.
Caveat, please read before merging
fgHwSensorEntValueis a DisplayString, not a number. Its exact format (units, precision, e.g."25.0 C"vs"3300"vs"12 V") isn't documented in the MIB and varies by sensor type and device model. This PR extracts the leading numeric portion viaextract_value: '(\d+(?:\.\d+)?)', following the same pattern used elsewhere in this repo (e.g.ibm-lenovo-server.yaml).I could not verify this regex against a live FortiGate device or a real customer
snmpwalk, so it may not match every device's exact value string format. The e2e fixture uses representative but synthetic values ("25.0 C","3300"). Recommend validating against a real device or customer-provided snmpwalk output before merging, or treating this as a starting point to refine.Review checklist
fortinet-fortigate.yaml).snmprecfixture rows added (2 sensors, ordered numerically to fit the existing subtree)