NAGIOS | poor mans report scripting

You wanna report some stuff to nagios the easy way? Try this.

Nagios server side:

Install netcat.

Run a eternal loop script:

# while true; do nc -l -p <THE_PORT_YOU_WANNA_LISTEN_TO> >> /var/nagios/rw/nagios.cmd; done&

Client side:

Install netcat.

Drop your info to the NAGIOS server with something like:


Attention: PROCESS_SERVICE_CHECK_RESULT is not a variable but a hard coded string.

Example for a warning:
# echo -e "[$(date +%s)] PROCESS_SERVICE_CHECK_RESULT;MyServer;MyServersService;1;I have to warn you."  | nc -q 0 nagios.myserver.mytld 65432

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.