Skip to content

Instantly share code, notes, and snippets.

@shichao-an
Last active August 29, 2015 14:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shichao-an/eb1a2e843356453095d8 to your computer and use it in GitHub Desktop.
Save shichao-an/eb1a2e843356453095d8 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Setup Nagios NRPE on Amazon EC2 (Ubuntu)
apt-get update
apt-get install -y nagios-nrpe-server nagios-plugins
sleep 2
mkdir -p /etc/nagios
cat > /etc/nagios/nrpe_local.cfg <<EOF
######################################
# Do any local nrpe configuration here
######################################
allowed_hosts=intserv.co.fuhu.org,intserv.fuhu.org
command[check_users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib/nagios/plugins/check_load -w 4.0,3.7,3.5 -c 7.0,6.5,6.0
command[check_all_disks]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -W 20% -K 10% -e
command[check_zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 110 -c 120
command[check_swap]=/usr/lib/nagios/plugins/check_swap -w 20 -c 10
EOF
service nagios-nrpe-server reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment