Validation Workflow
Every extension delivery needs validation against requirements. Four phases:
- Code validation โ Does the YAML/Python match requirements?
- Data validation โ Do metrics have actual datapoints in the environment?
- Screen validation โ Are all metrics displayed in the UI?
- Alert validation โ Do alerts match requirement thresholds?
Code Validation
Map each requirement to the extension code:
| Check | What to Verify | Tool |
|---|---|---|
| Metric key exists | OID/API endpoint maps to requirement | Manual code review |
| Metric type correct | gauge vs count matches data behavior | validate_extension.py |
| Unit conversion | %, hours, Mbps match requirement | Manual + API query |
| SNMP lint | DED errors (cross-table, scalar/table) | validate_extension.py |
| Key naming | .count suffix on count metrics | DED006/DED007 |
Data Validation
Query the Metrics API to verify data flows:
curl "$BASE/api/v2/metrics/query?metricSelector=my_ext.cpu&from=now-24h" \
-H "Authorization: Api-Token $TOKEN"
โ ๏ธ "No data" doesn't always mean a bug โ the device might not support that feature, or the feature set isn't enabled in the monitoring config.
This extension has a scalar OID missing .0 and a count metric with the wrong key. Fix both bugs.
Screen Validation
| Check | Error Code | Impact |
|---|---|---|
| Chart card key matches layout | DED008 | Blank card on entity page |
| Layout references existing card | DED009 | Card defined but never shown |
| metricSelector has :splitBy() | โ | Chart shows no data |
| Entity list uses correct selector | โ | Children don't appear |
Combined Report Format
Requirement Name
Code: VALID / BUG (description + line number)
Data: VALID / NO DATA (reason)
Screen: VALID / MISSING
๐ก Always deliver both .docx and .md versions of the report. Color-code: green = VALID, red = BUG, orange = NO DATA.
This table subgroup has a scalar OID ending in .0 (remove it) and an ipAddrTable OID mixed with ifTable OIDs (cross-table bug โ move it to its own subgroup or remove it).
What's Next
Module 15 โ Real-world case studies from production extensions.