nsca-ng(8)

πŸ’– nsca-ng β€” the monitoring command acceptor, bestie edition πŸ’–

okay so welcome to nsca-ng(8), straight out of The NSCA-ng Manual ✨ this is the page for the daemon that takes your monitoring commands and yeets them into Nagios. let's get into it 🫢


✨ NAME ✨

nsca-ng β€” the monitoring command acceptor πŸ‘‘


🌸 SYNOPSIS 🌸

nsca-ng [-FSs] [-b listen] [-C file] [-c file] [-l level] [-P file]

nsca-ng -h | -V

πŸ’… DESCRIPTION πŸ’…

The nsca-ng server makes the Nagios command file reachable from remote systems. which means?? you can submit passive check results, downtimes, and like a whole bunch of other commands to Nagios (or any compatible monitoring solution, no gatekeeping 🫢).

The client chatter is TLS encrypted and authenticated with pre-shared keys (as per RFC 4279, iykyk). and it's not just one shared password for everybody β€” the nsca-ng server does per-client passwords AND fine-grained authorization control. it's giving security. it's giving structure. we love to see it πŸ’…

okay and here's the glow-up: the server process rereads its configuration file when it catches a hangup signal (SIGHUP), and the way it does that is by executing itself again with the name and arguments it was started with. iconic behaviour honestly.

When it's compiled with systemd(1) support, the nsca-ng server auto-detects whether it was socket activated. If it was, it behaves as if the -F option was specified, and it ignores the -b option and the listen setting in the nsca-ng.cfg(5) file. Also it supports systemd(1)'s notify process startup type AND the WatchdogSec feature (go read the systemd.service(5) manual, bestie, it's right there).


πŸŽ€ OPTIONS πŸŽ€

  • -b listen β€” bind to the specified listen address or host name. the default setting is β€œ*”, which tells nsca-ng to listen on all available interfaces. you can append a colon (β€œ:”) followed by a service name or port number to override the default port (5668) that nsca-ng uses. and if you specify this option, the listen setting in the nsca-ng.cfg(5) file is ignored. sorry to that setting πŸ’€
  • -C file β€” submit monitoring commands into the specified file. this should be the named pipe (FIFO) that Nagios checks for external commands to process. by default, nsca-ng submits commands into /var/nagios/rw/nagios.cmd. this option takes precedence over the command_file setting in the nsca-ng.cfg(5) file. main character option energy, periodt.
  • -c file β€” read the configuration from the specified file instead of using the default configuration file /etc/nsca-ng.cfg. if you hand it a directory instead of a file, the configuration will be read from all files with a .cfg or .conf extension in that directory and all subdirectories. symbolic links are followed. so flexible, we stan 🌈
  • -F β€” don't detach from the controlling terminal, and write all messages to the standard error output (unless the -s option is specified). stay in the group chat, don't leave πŸ₯Ί
  • -h β€” print usage information to the standard output and exit. hi hello here's how to use me πŸ’–
  • -l level β€” use the specified log level, which has to be an integer value between 0 and 5 inclusive. here's the whole vibe chart:
    • 0 tells nsca-ng to generate only fatal error messages
    • 1 adds non-fatal error messages
    • 2 adds warnings
    • 3 additionally spits out every submitted monitoring command (plus startup and shutdown notices)
    • 4 also logs each message sent or received at the protocol level
    • 5 generates additional debug output

the default log level is 3. and if you specify this option, the log_level setting in the nsca-ng.cfg(5) file is ignored. choose your own adventure, bestie ✨

  • -P file β€” during startup, try to create and lock the specified file and write the process ID of the nsca-ng daemon into it. bail out if another process holds a lock on the file. by default, no such PID file is written. this option takes precedence over the pid_file setting in the nsca-ng.cfg(5) file. one daemon per file, no drama πŸ”’
  • -S β€” write all messages to the standard error output and (with the exception of startup messages) to the system logger. ⚠️ this option may only be specified together with the -F option. they're a package deal, fr fr.
  • -s β€” send all messages to the system logger, except for startup messages. this is the default behaviour (unless the -F option is specified). lowkey the chill default πŸ’…
  • -V β€” print version information to the standard output and exit. flex the version number and dip πŸ‘‘

πŸ¦‹ FILES πŸ¦‹

  • /etc/nsca-ng.cfg β€” the nsca-ng.cfg(5) configuration file. that's the one, that's the file πŸ’–

🌟 SEE ALSO 🌟

nsca-ng.cfg(5), send_nsca(8), send_nsca.cfg(5)

http://www.nagios.org/developerinfo/externalcommands/


πŸ‘‘ AUTHOR πŸ‘‘

Holger Weiss <holger@weiss.in-berlin.de>


and that's the whole page bestie!! this was Version 1.7, dated February 9, 2026 β€” go forth and accept those monitoring commands, you absolute icon πŸŽ€πŸ’–βœ¨πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from