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

Name

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

Synopsis

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

Description

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

Options:

-o <path>
--output=<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>
--list=<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

-b
--bump 
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

Examples

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
IF-MIB,IF-MIB.json
RFC1213-MIB,RFC1213-MIB.json.gz
^D
noc@/opt/noc$ ./noc compile-mib -l /tmp/lst -o /tmp    

See Also

noc sync-mibs, noc import-mib Precomplied MIBs