WorkerΒΆ

Worker is the entity who performs the real check on websites. The monitoring service already present are:

  • Response time of the website: The related service name must be named: response_time
  • Render time of the website: The related service name must be named: render_time

Every worker is customizable, and loads its configuration from a config.ini file, the parameters are:

  • ming_address: mongo address
  • ming_port: mongo port
  • ming_db: mongo db
  • influxdb_address: influxdb address
  • influxdb_udp_port: influxdb udp port
  • max_concurrency_tasks: maximum number of spawnable workers
  • sleep_time: the time the task is paused when there is nothing to do
  • supervisor_url: Supervisor address url
  • failure_measurment_api: Endpoint called in case of failure of measurement when duration is major than tolerance

The Workers’ config file may be specified in default_worker_config in the Supervisor configuration file (see Supervisor Configuration File)

After the measurement is completed the results data are stored in:

  • mongodb: Save all extra informations about the measurement

    example:

    {
       "_id" : ObjectId("58d525f5c42d754ac95f5d0a"),
       "_site" : "58ac10a7c42d753997c6ce90",
       "info" : "<Response [200]>"
    }
    
  • influxdb: Save the elapsed time related to the measurement in milliseconds

    data stored for render_time:

    > select * from render_time_www_example_com;
    name: render_time_www_example_com
    time                elapsed_time host
    ----                ------------ ----
    1487105347472320833 -1           http://www.example.com
    1487249389250886208 3117         http://www.example.com
    

    data stored for response_time:

    > select * from response_time_www_example_com
    name: response_time_www_example_com
    time                elapsed_time       host
    ----                ------------       ----
    1487086632835871936 2073.887           {'_id': '58a1df41c42d7527b29e64f7', 'name': 'example.com', 'url': 'http://www.example.com', 'last_update': '2017-02-13 16:30:57.623000', 'sla': ['58a1df41c42d7527b29e64b7', '58a1df41c42d7527b29e64ba'], 'tolerance': 5}
    1487086696043637126 1964.088           {'_id': '58a1df41c42d7527b29e64f7', 'name': 'example.com', 'url': 'http://www.example.com', 'last_update': '2017-02-13 16:30:57.623000', 'sla': ['58a1df41c42d7527b29e64b7', '58a1df41c42d7527b29e64ba'], 'tolerance': 5}
    1487086754735390743 3048.212           {'_id': '58a1df41c42d7527b29e64f7', 'name': 'example.com', 'url': 'http://www.example.com', 'last_update': '2017-02-13 16:30:57.623000', 'sla': ['58a1df41c42d7527b29e64b7', '58a1df41c42d7527b29e64ba'], 'tolerance': 5}