From ca9ab0401dd96d39ee94396eefc6d3a857e44bd0 Mon Sep 17 00:00:00 2001 From: Thomas Williams Date: Sun, 7 Jul 2024 18:49:56 +0100 Subject: [PATCH] Amendments to README --- README.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5755062..f7cc9e2 100644 --- a/README.md +++ b/README.md @@ -3,18 +3,24 @@ Simple Python utility for monitoring CPU and RAM usage, and monitoring the speed when downloading URLs. Both CPU/RAM monitoring and URL monitoring can be set on their own monitoring periods, or they can be disabled independently. -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) - typically your consumer script would run on an alternative host that has access to the database server. +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. See the available configuration options, which should be specified in config.py. **Configuration options:** -- **hostMonitoringPeriod** - the delay in between the CPU and RAM usage being probed (defined in seconds). 0 to disable. -- **urlMonitoringPeriod** - the delay in between monitoring all of the URLs (defined in seconds). 0 to disable. +- **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. - **urls** - the list of URLs to monitor (e.g. ["url1", "url2"]). -- **urlTimeout** - the delay 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. -- **forceNonPOSIXCPU** - For POSIX compatible systems, psutil.getloadavg() is executed which relies on os.getloadavg(). 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. +- **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. - **loggingMode** - Valid options: mssql, mariadb, rabbitmq, none. - **sqlServer** - the address of the SQL server which to write the data. - **sqlDatabase** - the database to write the data. @@ -31,5 +37,5 @@ See the available configuration options, which should be specified in config.py. - **hostMonitorStartTime** - the start time which the host monitor should start at the earliest. - **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. - **urlMonitorStartTime** - the start time which the url monitor should start at the earliest. -- **urlMonitorEndTime** - the end time which the url monitor whould shut down. This does not stop the script itself and this monitor will restart at the start time. +- **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.