14.4 Sending Test Results to the Server

The client program send_nsca reads the details of a host or service check from the standard input, which the administrator must format as follows:[140]

host-name\tservice\treturn value\toutput
host-name\treturn value\toutput

send_nsca sends this to the Nagios server. The first line describes the format for service checks and the second line, that for host checks. The placeholder return value is replaced by the status determined, that is, 0 for OK, 1 for WARNING, 2 for CRITICAL, and 3 for UNKNOWN. By output, a one-line text is meant, of the type that plugins provide as a support for the administrator. As the separator, a tab sign is used (\t).

In order to make a complete command from this that can be understood ...

Get Nagios, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.