You can execute a script if you specify a plugin command on the remote server.
In the example below the plugin command is get_disk
:
command[get_disk]=csript.exe c:\nagios\checks\check_disks_percentage_spave_used.vbs
I would however like NRPE on the remote server to execute a script on the client server, without a plugin command.
On the remote server something like this:
check_nrpe -H 196.35.132.9 -t 60 -c 'csript.exe c:\\nagios\\checks\\check_disks_percentage_space_used.vbs'
You can follow following steps to run a command from nagios to monitor a remote machine
put your script/plugin/executable file in slave machine @ /usr/local/nagios/libexec location.
8. restart nrpe
9. goto master machine
10. edit commands.cfg
add a service
now before trying it from nagios you can directly call the nrpe command to check is everything is working fine by following command