I have a big problem. My hosts are UP and 5 min down with this message “(Return code of 127 is out of bounds - plugin may be missing)” and after UP and after down … After a while, Nagios considers it´s a flapping situation …
Yes, posting commands.cfg with the command you’re using for that check would be useful. Also post that service definition. Maybe the plugin is misbehaving? Which plugin are you using? Have you tried to run the check command from the terminal?
What’s the status of the server, maybe in an overload. Try to run top command for a minute or two when this happens and see the status of the server