MIB profiles (mib_profiles/) and automation
This document describes the lightweight JSON schema used to store manufacturer MIB profiles, recommended workflow for generating profiles from collected MIB walks, and how profiles can be distributed to agents.
Schema (example keys)
vendor(string): short vendor id, e.g. “hp”enterprise_oid(string): vendor enterprise prefix, e.g. “1.3.6.1.4.1.11”version(string): profile versioncanonical(map): semantic name -> OID (page_count, serial, supplies roots, etc.)probes(array): recommended quick probe OIDs that are safe/cheap to GET during discoverysample_values(map): example values to help human review and testsnotes(string): freeform notes
Storage and runtime plan
- Profiles live in
agent/mib_profiles/in JSON form. Curated profiles should be committed to the repo for review. - Agents should optionally load
mib_profiles/*.jsonat startup (opt-in via config). Loadedprobesmerge into the runtime quick-probe lists so you can add vendors without code changes. - Operators can add a file via the
mib_profiles_local/directory to keep environment-specific or server-pushed profiles.
Profile generation workflow
- Collect many bounded MIB walks for a vendor (the agent already writes
logs/mib_walk_<ip>_<ts>.json). - Aggregate walks and extract candidate OIDs (Counter32 for counters, OctetString for names, Integer for levels). Produce a short summary (see
logs/hp_oid_summary.json). - Create a draft
mib_profiles/<vendor>.jsonwith canonical OIDs and a smallprobeslist (3–8 OIDs). Addsample_valuesand notes. - Validate profile against a small test set of devices by running targeted GETs using the candidate OIDs.
- Publish profile to a central repo or server UI. Agents can fetch published profiles or receive them via server push.
Design notes and versioning
- Keep
probessmall. The goal is to be lean: probe only a few OIDs to prove printer-ness. Only run larger enterprise walks for confirmed printers. - Version profiles when you change canonical mappings to allow rollbacks.
- Include
sample_valuesanddevice_examplesin the profile to make review easier.
Next steps to implement in the agent (low-risk):
- Add a small loader that reads
mib_profiles/*.jsonand mergesprobesinto thevendorProbesmap at startup. - Add a CLI command
agent import-profile <file>to validate and add a local profile. - Add a server-side endpoint to host curated profiles and an agent-side opt-in to fetch them.
See mib_profiles/hp.json for a first HP draft derived from local walks.