Plugin Output Permission denied

Hi Community,

I would like to integrate a sensor into my monitoring.

For this I took a Raspberrypi, built in icinga tools and a python file for the sensor check. So far so good. Unfortunately the service for the check on my Icinga server reports the following:

execvpe(/usr/lib/nagios/plugins/check_test.py) failed: Permission denied.

Does anyone have an idea what this could be? The check is stored on this path on my pi. #

The ssh and icinca checks I created are all ok.

Icinga2 log:

[2022-01-19 11:10:05 +0100] warning/PluginCheckTask: Check command for object ‘testpi’ (PID: 1009, arguments: ‘/usr/lib/nagios/plugins/check_test.py’ ‘-c’ ‘55’ ‘-w’ ‘40’) terminated with exit code 128, output: execvpe(/usr/lib/nagios… permission denied)>

best wishes!

Hi,

my first guess: you forgot to make that script executable:

chmod +x /usr/lib/nagios/plugins/check_test.py

Best regards,
Daniel

In addition to @dbodky’s commend I’d like to add that this error also could be a result of wrong environment. You should run this command manually in the context of the icinga user (which is usually nagios or icinga depending on your distribution). To enter the user context you could use e.g.:

sudo -u nagios bash

Hi, thank you for your help. My mistake was the following: I gave the plugin the rights with the command chmod a+x. With the command chmod 755. :slight_smile:

1 Like

Hi, thank you for your help. :slight_smile: