How can we write correct code for disable host check for nagios
I used following script, but does not work, also want to add comment while disable the server monitoring
===============================================================================================
#!/bin/sh
# This is a sample shell script showing how you can submit the DISABLE_HOST_CHECK command
# to Nagios. Adjust variables to fit your environment as necessary.
now=`date +%s`
commandfile='/appl/Nagios/Node/var/NagiosNode/rw/nagios.cmd'
/bin/printf "[%lu] DISABLE_HOST_CHECK;<host>\n" $now > $commandfile
===============================================================================================
Please assist