Skip to content

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.

Terminal window
jaque import -from nagios /etc/nagios/ -o jaque.cue

The 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.

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 -o file): 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), or unsupported (dropped, with the source file:line so you can go look). The header line reads objects: 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.

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.

The emitted CUE is a normal jaque config: point the binary at it.

Terminal window
jaque -config jaque.cue

CUE 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.