docker-nagios icon indicating copy to clipboard operation
docker-nagios copied to clipboard

Custom Plugin Error, Python Error

Open Therodox opened this issue 4 years ago • 2 comments

Python3 is missing in your Image File, if I add it, Nagios can't ping clients. Google said depends on the "Lang" set in Container.

Error after adding "apk add python3"

CRITICAL - Could not interpret output from ping command

Therodox avatar Feb 01 '21 14:02 Therodox

Hi @Therodox ,

Thanks for using the image! Python3 is deliberately missing as this image is targetted to lightweight size and basic features. Check the README file for more information. Also, I cannot reproduce the error you mention. I have created a Dockerfile with the following contents:

FROM manios/nagios:latest

RUN apk update && apk add python3

, I created and run it and nothing happened.

docker build -t manios/nagios:python .
docker run -d --name nagios4 -p 0.0.0.0:8080:80 manios/nagios:python

The ping plugin works as expected. Can you please provide more details and steps to reproduce the error you are having?

Thank you, Best regards, Christos

manios avatar Feb 02 '21 12:02 manios

I ran into the 'missing Python3' in the container and resolved with the following commands (executed interactively in the container.)

apk update && apk add python3
ln -s /usr/bin/python3 /usr/bin/python

Python is apparently needed for "Active Checks (check_ncpa.py)" https://www.nagios.org/ncpa/getting-started.php#using-the-gui

As near as I can tell (Nagios Noob here) everything else is still working as expected. If there is further information or testing I can help with, let me know.

This is using manios/nagios:latest installed 2022-11-04 on Debian Bullseye and with Docker 20.10.5+dfsg1.

best,

HankB avatar Nov 21 '22 03:11 HankB