Random Project

you need to

You need to define nagios command with sudo prefix, for example:

define command{
command_name check_hddtemp
command_line sudo $USER1$/contrib/check_hddtemp.sh /dev/$ARG1$ 40 50
}

And you will also probbly need to do not require tty for nagios user sudo. Add following line into /etc/sudoers:

Defaults:nagios !requiretty