Skip to content

problems running custom plugins (check_nrpe) #15

@tr1plus

Description

@tr1plus

Hey

I decided to switch from a dedicated machine running nagios to a docker.
docker is running fine and I'm able to connect to the dashboard. All "standard" plugins (check_ping, ...) are also running fine.

I do have a few 'custom' plugins (check_nrpe, ...) that I used to run. However I keep getting the following error when running them via the nagios dashboard

(No output on stdout) stderr: execvp(/opt/nagios/libexec/custom/check_nrpe, ...) failed. errno is 2: No such file or directory

Running the command manually via ssh on the host returns correct results, so the plugin does work. It seems a 'translation' from the host to the docker is preventing some things from running correctly.

NOTE: this set-up used to work outside of docker, so I'm assuming it's related to authorizations or something like that, but even setting chmod 777 doesn't seem to work...

commands.cfg
define command{ command_name check_nrpe command_line $USER1$/custom/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ }

resource.cfg
$USER1$=/usr/local/nagios/libexec

calling the plugin
define service{ use generic-service ; Name of service template to use host_name dockerpi service_description Current Users check_command check_nrpe!check_users }

plugin file stats
pi@dockerpi2:~/docker/containers/nagios/libexec/custom $ stat check_nrpe File: check_nrpe Size: 102112 Blocks: 200 IO Block: 4096 regular file Device: b302h/45826d Inode: 129480 Links: 1 Access: (0755/-rwxr-xr-x) Uid: ( 100/systemd-timesync) Gid: ( 101/systemd-journal) Access: 2020-01-05 17:22:49.000000000 +0100 Modify: 2017-10-29 16:56:32.000000000 +0100 Change: 2020-01-05 17:37:03.604777318 +0100 Birth: -

Docker is set to bind
/home/pi/docker/containers/nagios/libexec/custom --> /opt/nagios/libexec/custom

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions