The data can be written into an MSSQL, or Maria DB database. Alternatively, the data can be pushed to a RabbitMQ queue, and then optionally retrieved from the queue using the provided consumer script (rabbitmq-consumer.py) - typically your consumer script would run on an alternative host that has access to a database server.
Dependencies can be found within requirements.txt and are installed automatically when executing the main.py script.
To publish to RabbitMQ, loggingMode should be set to 'rabbitmq', and rabbitmqca, rabbitmqcacert, rabbitmqcakey, and rabbitmqRoutingKey should be provided. The certificates should align with the certificate authority which the RabbitMQ server recognises.
To publish direct into an MSSQL or MariaDB database, the loggingMode should be set accordingly (see below), and sqlUsername, sqlPassword, sqlServer, and sqlDatabase should be provided.
You will need the associated ODBC driver installed for whichever DBMS you choose. ODBC references can be modified in odbcReferences.py to suit your system. You can probably even get alternative DBMS's working such as PostgreSQL as long as you convert the schema.
- **hostMonitoringPeriod** - the delay in between the CPU and RAM usage being probed and being input into the database (defined in seconds). 0 to disable.
- **urlMonitoringPeriod** - the delay in between monitoring all of the URLs and being input into the database (defined in seconds). 0 to disable.
- **urlTimeout** - the delay in seconds before considering a URL to have timed out.
- **maxWorkers** - the amount of threads to use when pulling URL resources. Do not set above the maximum number of threads on the host or bad things may happen.
- **forceNonPOSIXCPU** - For POSIX compatible systems, psutil.getloadavg() is executed which relies on os.getloadavg(), similar to the uptime command. For Windows, this seemingly returns 0 (at least on the version executed during development). For Windows, a custom function has been built to obtain running CPU averages, but you can choose to use this function on POSIX systems by setting this variable to True.
- **hostMonitorStartTime** - the start time which the host monitor should start at the earliest (HH:MM:SS).
- **hostMonitorEndTime** - the end time which the host monitor should shut down. This does not stop the script itself and this monitor will restart at the start time (HH:MM:SS).
- **urlMonitorStartTime** - the start time which the url monitor should start at the earliest (HH:MM:SS).
- **urlMonitorEndTime** - the end time which the url monitor would shut down. This does not stop the script itself and this monitor will restart at the start time (HH:MM:SS).
- **usePip** - whether or not to use pip to install dependencies. Set to false if your environment is externally managed.
- **ipinfoAPIToken** - The ipinfo.io API token used for IP address lookups during IP blocks.