Mantainance tools. How to remove old reports, tasks and target

Dear All,
I’m newbie in Greenbone/Openvas system scanner. I’ve been using it for a few weeks.
These are some details about my installation:

Greenbone Security Assistant 8.0.0
Greenbone Vulnerability Manager 8.0.0
OpenVAS Scanner 6.0.0
gvm-libs-10.0.0-6924.el7.art.x86_64

CentOS Linux release 7.6.1810 (Core)
Linux openvas.management 3.10.0-957.27.2.el7.x86_64 #1 SMP Mon Jul 29 17:46:05 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Installation was made throught Yum and Atomic repository:
/etc/yum.repos.d/atomic.repo

I run many scans of individual hosts and small networks and everything works very well.
Now I need to run batches to remove old reports, tasks and if possible some Tasks so I
read database from gvm-cli:

gvm-cli tls --hostname localhost --gmp-username admin --gmp-password XXXX -X “<get_tasks/>”
… omissis…


but when I try with:

gvm-cli tls --hostname localhost --gmp-username admin --gmp-password XXXXX -X “<delete_task task_id=“74a92082-78ea-4bd8-ac23-4248067b8cdc”>”

I’ve got some errors:

Traceback (most recent call last):
File “/bin/gvm-cli”, line 11, in
load_entry_point(‘gvm-tools==1.4.1’, ‘console_scripts’, ‘gvm-cli’)()
File “/usr/lib/python3.6/site-packages/gmp/clients/gvm_cli.py”, line 213, in main
result = gvm.read()
File “/usr/lib/python3.6/site-packages/gmp/gvm_connection.py”, line 108, in read
raise OSError(‘Connection was closed by remote server’)
OSError: Connection was closed by remote server

Any ideas ? Are there any other tools to remove old tasks ?
Thanks a lot.
Best Regards
Willy (EB)

As you have the Greenbone Security Assistant installed, you could use it to remove tasks.

  1. Go to Scans > Tasks
  2. Filter for the tasks you want to delete (for example “created>10d” to get tasks that have been created more than 10 days ago)
  3. At the lower right of the table select “Apply to all filtered”
  4. Click on the trashcan icon next to the dropdown
  5. Go to Extras > Trashcan and empty it. All your tasks older than 10 days are gone

For reports do as 1. - 3. above, then click on the X next to the dropdown. Reports will NOT be put into the trashcan but rather be deleted directly.

2 Likes

There are a several issues here:

2 Likes

Dear Steffen,
I think that throught web interface I remove only one groups of tasks, or reports, and I need to repeat
this operation after some time to remove others tasks or reports. Is it true ?
Thanks

Dear Bricks,
I installed greenbone using a repository: atomic. It was the fastest solution because I could do everything through Yum and RPM.
Do you know a repository that has the latest versions of Greenbone / Openvas Community edition ?

Now gmv-cli works “/” !!!

Thanks for your suggestions !
Best regards
Willy

That is indeed true.