The Supervisor is composed of two parts:

  • Supervisor Tasks
  • Supervisor WebServer

Supervisor Tasks

The Supervisor Task:

  • Check if there are any SLA late
    Check every supervisor_check_time the status of SLA expiration of the website, if there are present website with expired SLA, the supervisor spawns new worker through the worker_utility_class_path.
  • Update SLA queue
    Every reload_queue_time the supervisor reload all SLA queue, but the update is performed by the Supervisor WebServer when all sites present are processed.

Supervisor WebServer

The Supervisor WebServer provides three APIs to Workers.

These APIs are for internal use only and you should’t call them externally.

  • get_site
  • refresh_entity
  • failure_measurment


host:port/api/website/get_site(sla_id): Called from worker to obtain the task (site to analyze).


host:port/api/website/refresh_entity(entity, _id=None): Called to update all SLAs, a specific SLA or websites.

Entity values accepted are:

  • all_sla
  • single_sla
  • website

For the _id field, provide the string value of the ObjectId interested; for all_sla this parameters is useless.


Example of endpoint to report the error with worker measurement:

host:port/failure_measurment(website, sla, date): Default api to manage the measurement failure (the amount of time of the measurement when it’s more than the tolerance)