I can see you are running into a problem which can lead to the issues you are having.
The problem is the use of some special characters in the service check AND using the "Test Check Command" button. Due to some issues with how PHP escapes characters the "Test Check Command" does not work in these situations and should be ignored.
When you make it work uising the "Test Check Command", because of the character escaping stuff, it is not the same as how it works in Nagios Core when the actual check runs.
So for all further testing of this service you need to:
Make the changes to the service
Save the Service
Apply Configuration
Go back to the home screen and find the Service
When viewing the Service Status Details page click the Schedule a forced immediate check link
Just to re-iterate, for all further testing for this service DO NOT use the "Test Check Command" button, follow the steps above.
My first suggestion is to test from the command line first as the nagios user:
Once you have it working at the command line, we can then build that into a service that works. Post your working command here.