Home > Uncategorized > Quick Primer: nagios/icinga external commands and pipe-arrific goodness

Quick Primer: nagios/icinga external commands and pipe-arrific goodness

Check nagios/icinga pipe:

printf "[%lu] RESTART_PROGRAM\n" $(date +%s) > $(cat /etc/icinga/icinga.cfg | grep command_file | cut -d '=' -f 2) && sleep 1 && tail -n 50 $(cat /etc/icinga/icinga.cfg | grep log_file | cut -d '=' -f 2) | grep "EXTERNAL COMMAND: RESTART_PROGRAM;"

More external commands are listed in the nagios and icinga docs.

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: