You didn't give us much to go on, but I could make mine fail too, if i didn't configure the .cfg files correctly.
So, this is how your .cfg files SHOULD be.
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 2
So, what is $USER1$ ? you ask?
resource.cfg should be:
My check_ping plugin is located in /usr/local/nagios/libexec like it's supposed to be, and it has the correct permissions.
ls -la /usr/local/nagios/libexec/check_ping
-rwxr-xr-x 1 nagios nagios 54534 Jun 25 16:23 /usr/local/nagios/libexec/check_ping
nagios runs as user nagios and is group nagios, so yes, nagios will be able to execute the plugin.
Most likely your problem is this:
You didn't define your checkcommands.cfg file check_ping command correctly. But since you didn't give us anything but the problem, we have to guess.