OpenVas how limit tasks (scheduler)

Each scanning task is a separate IP address for me. (one task = one IP). I have over 60 tasks.

in each task I have set “Maximum concurrently scanned hosts=2”
in /etc/openvas/openvas.conf I have entries:

max_hosts = 2
max_checks = 2

I have set the same scheduler for each task.

Unfortunately I see that all tasks are launched from the schedule at the same time, which in the absence of the appropriate amount of CPU causes openvas to stop working.

how to set a limit for openvas, e.g. to max 2 tasks at one time?

creating several schedules run at equal time intervals does not really solve the problem because it is difficult to predict when a given schedule will end.

Unfortunately, you need to manage the scheduling. To accomplish your use case you can either:

  1. Create separate schedule objects
  2. Use Greenbone’s Alerts: Set the scheduler on only two tasks. Create alerts and set them to trigger a scan task… Then you can attach these alerts to the first two scheduled tasks. It will start the next two when the first two are complete. You can continue to use alerts to daisy chain scan tasks in this way.
  3. Use Python-gvm: Use Python-gvm and and programatically create your custom schedules and start scan tasks from a python script.

These settings are per OpenVAS scan not per system. That means when a scan is started the scanner scans no more then two hosts at the same time and doesn’t run more then two nasl script processes in parallel. But you can start several scans at the same time.

most likely it is as you wrote - thanks for the info.

I am trying to find a solution so I am trying everything