ConSol-Monitoring / omd

OMD - Open Monitoring Distribution Labs Edition.
http://omd.consol.de
GNU General Public License v2.0
171 stars 35 forks source link

Python checks not working #162

Open FRvanderVeen opened 1 year ago

FRvanderVeen commented 1 year ago

I installed a clean ubuntu server 22.10 virtual machine and installed OMD.

When I added a 'check_ncpa' service to my host I saw that the checks were not working. This was caused by the following line:

https://github.com/ConSol/omd/blob/0c330993f25dbabba330bf19270bb728b36f7599/packages/check_plugins/single_files/check_ncpa.py#L1

python could not be found.

After searching on Google I found out that I had to install python-is-python3

Executing apt-cache show python-is-python3 showed:

Package: python-is-python3
Architecture: all
Version: 3.9.2-2
Multi-Arch: allowed
Priority: optional
Section: python
Source: what-is-python (10)
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Matthias Klose  <doko@debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 13
Depends: python3
Breaks: python, python-is-python2, python-is-python2-but-deprecated, python-minimal
Replaces: python, python-is-python2, python-is-python2-but-deprecated, python-minimal
Filename: pool/main/w/what-is-python/python-is-python3_3.9.2-2_all.deb
Size: 2788
MD5sum: 948da3883e2c6712cadbfc079a95c16b
SHA1: b8bb307a951056d7677aa305457e8611d2b8b950
SHA256: fb2d32a772803c02da2a05581554a9d40402a82d8674e573950c8734f4a1d305
SHA512: 71ce74d3b950f80ebefd438181054a31e9c01cec82a31656386c4cd76663cb02b65e3adae76bc41c31c5aaab73e5660a6a137ad6f70749e09ce2a58d1b9d1d97
Description-en: symlinks /usr/bin/python to python3
 Starting with the Debian 11 (bullseye) and Ubuntu 20.04 LTS (focal)
 releases, all python packages use explicit python3 or python2
 interpreter and do not use unversioned /usr/bin/python at all. Some
 third-party code is now predominantly python3 based, yet may use
 /usr/bin/python.
 .
 This is a convenience package which ships a symlink to point
 the /usr/bin/python interpreter at the current default python3. It may
 improve compatibility with other modern systems, whilst breaking some
 obsolete or 3rd-party software.
 .
 No packages may declare dependencies on this package.
Description-md5: 918753566204aa881433fa0567164c59
Cnf-Ignore-Commands: python

So I would say that either the checks need to be modified to #!/usr/bin/env python3 as apt-cache suggests. Or python-is-python3 should be installed when installing omd