> Section: [9. Nagios compatibility](https://jaque.sh/docs/nagios-compat/overview.md)
> Next: nagios-compat/livestatus
> Index: https://jaque.sh/llms.txt


If scripts, cron jobs, or a dashboard already write to Nagios's command
file, jaque reads the exact same wire format -- nothing to rewrite on the
sending side. The cost is strictness: a line that does not parse, or names
a verb jaque does not recognize, is always an error. jaque never guesses at
malformed input the way a more permissive reader might.

## 1. Enabling it

```
-command-file /var/lib/jaque/rw/jaque.cmd
```

jaque creates the named pipe if it does not already exist. Empty, the
default, disables passive ingestion via this route entirely.

## 2. The line format

```
[<unix_ts>] COMMAND_NAME;field1;field2;...
```

`<unix_ts>` is a Unix timestamp in brackets; the command name and fields
follow, semicolon-separated.

## 3. The verbs, exactly

### 3.1 Passive results

```
PROCESS_SERVICE_CHECK_RESULT;<host>;<service>;<code>;<output>
PROCESS_HOST_CHECK_RESULT;<host>;<code>;<output>
```

`<output>` splits on the first `|` into text and perfdata; `<code>` is the
familiar 0-3 exit-code convention.

### 3.2 Acknowledgements

```
ACKNOWLEDGE_SVC_PROBLEM;<host>;<service>;<sticky>;<notify>;<persistent>;<author>;<comment>
ACKNOWLEDGE_HOST_PROBLEM;<host>;<sticky>;<notify>;<persistent>;<author>;<comment>
REMOVE_SVC_ACKNOWLEDGEMENT;<host>;<service>
REMOVE_HOST_ACKNOWLEDGEMENT;<host>
```

`<sticky>` is 0/1 -- any nonzero value (Nagios UIs sometimes write 2) is
treated as sticky. `<notify>` and `<persistent>` are parsed for arity and
discarded: nothing dispatches notifications from these calls, and
persistent comment retention has no equivalent here.

### 3.3 Downtimes -- fixed only

```
SCHEDULE_SVC_DOWNTIME;<host>;<service>;<start>;<end>;<fixed>;<trigger_id>;<duration>;<author>;<comment>
SCHEDULE_HOST_DOWNTIME;<host>;<start>;<end>;<fixed>;<trigger_id>;<duration>;<author>;<comment>
DEL_HOST_DOWNTIME;<downtime_id>
DEL_SVC_DOWNTIME;<downtime_id>
```

`<fixed>` must be `1` and `<trigger_id>` must be `0` -- flexible downtimes
(which start on the next problem inside the window, not immediately) and
triggered downtimes are rejected as parse errors, never silently coerced to
fixed. `<duration>` is parsed and discarded; it only matters for flexible
downtime, which jaque does not support. `DEL_HOST_DOWNTIME` and
`DEL_SVC_DOWNTIME` carry only a downtime ID on the wire -- both names parse
to the same command, and the two names exist purely for wire compatibility.

### 3.4 Group-scoped downtimes

These translate a legacy group name into a label selector via the same
normalization the importer used when it emitted the label:

```
SCHEDULE_HOSTGROUP_HOST_DOWNTIME;<hostgroup>;<start>;<end>;<fixed>;<trigger_id>;<duration>;<author>;<comment>
SCHEDULE_HOSTGROUP_SVC_DOWNTIME;<hostgroup>;<start>;<end>;<fixed>;<trigger_id>;<duration>;<author>;<comment>
SCHEDULE_SERVICEGROUP_HOST_DOWNTIME;<servicegroup>;<start>;<end>;<fixed>;<trigger_id>;<duration>;<author>;<comment>
SCHEDULE_SERVICEGROUP_SVC_DOWNTIME;<servicegroup>;<start>;<end>;<fixed>;<trigger_id>;<duration>;<author>;<comment>
```

Nagios has no group-scoped acknowledgement command, so there is no
equivalent translation for `ACKNOWLEDGE_*`.

### 3.5 Selector-scoped verbs -- new, not legacy spellings

```
SCHEDULE_DOWNTIME;<selector>;<scope>;<start>;<end>;<author>;<comment>
ACKNOWLEDGE_PROBLEM;<selector>;<scope>;<sticky>;<author>;<comment>
REMOVE_ACKNOWLEDGEMENT;<selector>;<scope>
```

`<selector>` is any [label selector](https://jaque.sh/docs/config/labels-and-views.md) text;
`<scope>` is `host` or `service`, and anything else is a parse error. These
carry only the fields the engine actually uses -- no
`<notify>`/`<persistent>`/`<fixed>`/`<trigger_id>`/`<duration>` baggage.

## 4. Where these commands go

Everything the FIFO parses lands on the same command channel the
ConnectRPC API feeds -- see [FIFO and API](https://jaque.sh/docs/ingest/fifo-and-api.md) for
how the two doors converge, and what happens to a command aimed at an
object owned by another engine.

## 5. Security considerations

The named pipe is filesystem-local IPC: anything able to write to
`-command-file` can inject commands, so its permissions are the operator's
to set, the same as they were under Nagios. Parsing does not soften that --
strict rejection of malformed input closes off one failure mode, not the
trust boundary of the pipe itself.
