From Nagios
You do not have to hand-translate nagios.cfg. jaque ships a compiler
frontend that reads a real Nagios config tree and emits native CUE — no
manual rewrite, and a report telling you exactly what didn’t make it
across.
The fast path
Section titled “The fast path”jaque import -from nagios /etc/nagios/ -o jaque.cueThe positional argument can be a directory (jaque looks for nagios.cfg
inside it) or a single file. -from currently only accepts nagios; -o
writes the emitted CUE to a file instead of stdout, which is what you want
for anything beyond a quick look.
What comes out
Section titled “What comes out”Two things, on two different streams — so jaque import ... > jaque.cue
captures only the config, never the report mixed in:
- The CUE itself, on stdout (or the
-ofile): hosts, services, checks, contacts, notification policies, escalations, labels — the whole object graph, structured with shared templates where the source repeats itself, not a flat one-object-per-line dump. - A migration report, on stderr: every object classified
mapped,approximated(translated, but something changed — the report says what), orunsupported(dropped, with the sourcefile:lineso you can go look). The header line readsobjects: N emitted of M in source (P% survived).
Nothing here executes your Nagios config. The importer is a compiler, not a compatibility mode — see Importer for the mapping rules, and Overview for why that boundary is deliberate.
What to expect the first time
Section titled “What to expect the first time”Real Nagios trees accumulate two decades of use chains, custom
variables, and Perl-flavored check_command macros — none of that is
theoretical. The importer resolves inheritance flattening (use,
register 0, +value, null) itself, translates check_command and
$ARGn$/$USERn$ macros into jaque checks, and turns hostgroups into
labels. What it does not do yet: verification against a real corpus at
scale is still pending, so treat the emitted CUE as a strong first draft —
validate it (jaque -config jaque.cue, see below), and read the report
for anything marked unsupported before you trust it in production.
Validate what you got
Section titled “Validate what you got”The emitted CUE is a normal jaque config: point the binary at it.
jaque -config jaque.cueCUE validation runs in two phases (see Why CUE) — a bad field name or type fails at startup with a schema error naming the exact field, before a single check ever runs.
Once you’re running on the import, #/hosts and #/services in the
dashboard are the fastest way to sanity-check that what you expected to
see actually showed up — see Dashboard.