Child pages
  • noc compile-mib
Skip to end of metadata
Go to start of metadata


noc compile-mib – Export MIB from database to JSON format 


noc compile-mib [options] [mib1 [ .. mibN]]


Extract MIB from database and compile to portable JSON or gzipped-JSON format


-o <path>

Redirect output to file. If file ends with .gz, automatically compress it. When used with -l option, <output> must be a directory

-l <path>

Read list of MIBs to be exported from comma-separated file <path>. File must be in CSV file, each MIB to be exported must be in separate line. Each row must contain two columns:

  1. MIB name
  2. Output file

When used together with -o option, full output file path will be combined from -o directory and file name

Increase resulting revision of compiled MIB. By default, compiled MIB contains internal MIB revision from database. --bump option increases compiled MIB revision to force a reloading of compiled MIB on next sync-mibs, without changing MIB's content
--tracebackPrint traceback on exception


Dump JSON to stdout

noc@/opt/noc$ ./noc compile-mib IF-MIB

Save JSON to file

noc@/opt/noc$ ./noc compile-mib -o /tmp/IF-MIB.json

Save gzipped JSON

noc@/opt/noc$ ./noc compile-mib -o /tmp/IF-MIB.json.gz 

Increase compiled MIB revision

noc@/opt/noc$ ./noc compile-mib -b -o /tmp/IF-MIB.json

Dump MIBs from a list file

noc@/opt/noc$ cat > /tmp/lst
noc@/opt/noc$ ./noc compile-mib -l /tmp/lst -o /tmp    

See Also

noc sync-mibs, noc import-mib Precomplied MIBs