Icinga CLI

schedule a service check
HOST_NAME=www.example.com
SERVICE_NAME=APT
/usr/bin/printf "[%lu] SCHEDULE_FORCED_SVC_CHECK;%s;%s;%s\n" $(date +%s) "${HOST_NAME}" "${SERVICE_NAME}" $(date +%s) | tee -a "${NAGIOS_CMD_SOCKET}"

schedule a host check
NAGIOS_CMD_SOCKET=/var/lib/icinga/rw/icinga.cmd
/usr/bin/printf "[%lu] SCHEDULE_HOST_CHECK;%s;%s\n" \
$(date +%s) \
"host_name" \
$(date +%s) | tee -a $NAGIOS_CMD_SOCKET
curl -d "cmd_typ=7&host=www.example.com&service=APT&force_check&btnSubmit=Commit" "http://monitoring.example.com/cgi-bin/icinga/cmd.cgi" -u 'foo:bar'

Schedule downtime
https://assets.nagios.com/downloads/nagioscore/docs/externalcmds/cmdinfo.php?command_id=118
HOST=www.example.com
STARTDATE=$(date +%s)
ENDDATE=$(($(date +%s) + 7200))
printf "[%lu] SCHEDULE_HOST_DOWNTIME;${HOST};${STARTDATE};${ENDDATE};0;0;7200;rundeck;Deployment" ${STARTDATE} > /data/icinga/var/rw/icinga.cmd

Links
http://www.box293.com/guides/tricks/nagios-command-pipe-and-cgis