Monitoring checks of GOS 6 don't work

Hi,

Since the upgrade to GOS 6, the queries of our monitoring system no longer work. This affects the old Python script and the new GMP script. The following message is displayed: “GMP UNKNOWN: Failed to get results list”. GOS 5 could be monitored without problems.

Examples:

gvm-tools 1.4.1
$ ./check_gmp.py ssh -H 192.168.0.1 -u USER -w PASSWORD -T “TASKNAME” --status

GMP UNKNOWN: Failed to get results list

gvm-tools 2.0.0
$ /usr/local/bin/gvm-script --gmp-username=“USER” --gmp-password=“PASSWORD” ssh --hostname 192.168.0.1 gvm-scripts/check-gmp.gmp -T “TASKNAME” --status

GMP UNKNOWN: Failed to get results list

Tested on GSM 600 with version GOS 6.0.2 and 6.0.3.

I would be very happy about a solution.

Thanks
Hagen

I guess the filter isn’t correct anymore. Could you try to add a " details=1" to

?

Sorry details isn’t a filter parameter instead it is an additional argument.

details=True should be added after

Hi bricks,

Many thanks for the answer. I had installed Release 2.0.0 (https://github.com/greenbone/gvm-tools/archive/v2.0.0.zip). There is an older version of the monitoring script included. I have tested the script change in line 659. The result is the same.

/usr/local/bin/gvm-script --gmp-username=“USER” --gmp-password=“PASSWORD” ssh --hostname 192.168.0.1 gvm-scripts/check-gmp.gmp -T “TASKNAME” --status
GMP UNKNOWN: Failed to get results list

You refer to the Master Branch in your solution. So I manually downloaded and executed the current monitoring script from the master branch.

curl https://raw.githubusercontent.com/greenbone/gvm-tools/master/scripts/check-gmp.gmp -o ./scripts/check-gmp.gmp

python3 /usr/local/bin/gvm-script --gmp-username="USER" --gmp-password="PASSWORD" ssh --hostname 192.168.0.1 ./scripts/check-gmp.gmp -T "TASKNAME" --status
Traceback (most recent call last):
  File "/usr/local/bin/gvm-script", line 11, in <module>
    load_entry_point('gvm-tools==2.0.0', 'console_scripts', 'gvm-script')()
  File "/usr/local/lib/python3.6/site-packages/gvm_tools-2.0.0-py3.6.egg/gvmtools/script.py", line 119, in main
    run_script(args.scriptname, global_vars)
  File "/usr/local/lib/python3.6/site-packages/gvm_tools-2.0.0-py3.6.egg/gvmtools/helper.py", line 145, in run_script
    exec(file, global_vars)  # pylint: disable=exec-used
  File "<string>", line 1419, in <module>
  File "<string>", line 1404, in main
  File "<string>", line 326, in check_instances
  File "<string>", line 488, in clean_orphaned_instances
AttributeError: 'NoneType' object has no attribute 'execute'

I also reinstalled the GVM tools from master branch on a new system.

git clone https://github.com/greenbone/gvm-tools.git
cd gvm-tools/
python3 setup.py install

python3 /usr/local/bin/gvm-script --gmp-username="USER" --gmp-password="PASSWORD" ssh --hostname 192.168.0.1 ./scripts/check-gmp.gmp -T "TASKNAME" --status
'NoneType' object has no attribute 'execute'

In all cases it was tested against a GSM 600 with GOS 6.0.3.