Well, frankly you can not. The appliance is as the name suggest not intended to be tampered with.
You could try to set up the check on a normal Linux server and see if you can get it working there. If that works you can create a satellite with a normal Linux OS and run that kind of checks there.
Other approach would be running the check script on a monitored host with the required PHP modules installed through MRPE or a local check.