I've installed an Incinga 2 server and I'm trying to monitor Linux server.
So my server Icinga is working well. And last week I've installed the NRPE agent on one of our Server. It's a Red Hat Enteprise Linux 6.5.
So the install is ok, i made the basic configuration and now I'm able to monitor CPU & disk usage from my Icinga Server.
I added a plugin check_mem.sh and create a new command definition in my nrpe.cfg. If I run the command manually from the monitored server there is no problem, everything works fine.
But from my Icinga server I got the following error : NRPE : Unable to read output. I tried to add "2>&1" at the end my command definition and it seems to be a permission problem. I got the following message :
sh: /usr/lib64/nagios/plugins/check_mem.sh: /bin/bash: bad interpreter: Permission denied
I don't understand because I put 777 permission on this file "check_mem.sh" and I can run manually with the NRPE user.
Does anyone have an idea from where the issue can come?