Linuxfabrik / monitoring-plugins

200+ check plugins for Icinga and other Nagios-compatible monitoring applications. Each plugin is a standalone command line tool (written in Python) that provides a specific type of check.
https://linuxfabrik.ch
The Unlicense
207 stars 48 forks source link

about-me: Throws exception for openvas #749

Closed axxeo closed 3 months ago

axxeo commented 3 months ago

This issue respects the following points:

Which variant of the Monitoring Plugins do you use?

Bug description

With openvas 22.7.9, openvas version yields empty output, so the plugin fails with

Traceback (most recent call last):
  File "about-me.py", line 2271, in 'module'
  File "about-me.py", line 2091, in main
  File "about-me.py", line 958, in find_software
  File "about-me.py", line 2065, in run_regex
  File "re/__init__.py", line 176, in search
TypeError: expected string or bytes-like object, got 'bool'

Need to call openvas --version instead (or catch exception).

Steps to reproduce - Plugin call

sudo /usr/lib64/nagios/plugins/about-me

Steps to reproduce - Data

No response

Environment

$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
...

$ dpkg -l linuxfabrik-monitoring-plugins | grep ^ii
ii  linuxfabrik-monitoring-plugins 2023112901-1 all ...

Plugin Version

about-me: v2023112901 by Linuxfabrik GmbH, Zurich/Switzerland

Python version

No response

List of Python modules

No response

Additional Information

No response

markuslf commented 3 months ago

Can you share the output of your openvas --version?

axxeo commented 3 months ago

I forgot that, sorry.

$ openvas --version
OpenVAS 22.7.9
gvm-libs 22.8.0
Most new code since 2005: (C) 2022 Greenbone Networks GmbH
Nessus origin: (C) 2004 Renaud Deraison <deraison@nessus.org>
License GPLv2: GNU GPL version 2
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Regards, Enrico