monutil/README.md

32 lines
2.7 KiB
Markdown
Raw Normal View History

2024-06-25 19:06:57 +00:00
# monutil
2024-06-27 17:38:35 +00:00
Simple Python utility for monitoring CPU and RAM usage, and monitoring the speed when downloading URLs.
2024-06-27 17:38:54 +00:00
Both CPU/RAM monitoring and URL monitoring can be set on their own monitoring periods. See the available configuration options, which should be specified in config.py.
2024-06-27 17:37:27 +00:00
**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.
2024-07-04 15:47:37 +00:00
- **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.
2024-07-06 14:48:44 +00:00
- **loggingMode** - Valid options: mssql, mariadb, rabbitmq, none.
2024-07-04 15:47:37 +00:00
- **sqlServer** - the address of the SQL server which to write the data.
- **sqlDatabase** - the database to write the data.
- **sqlUsername** - the username used to authenticate to the SQL server.
- **sqlPassword** - the password used to authenticate to the SQL server.
2024-07-06 13:43:45 +00:00
- **rabbitmqHost** - the hostname of the RabbitMQ instance if using RabbitMQ.
- **rabbitmqPort** - the port of the RabbitMQ instance if using RabbitMQ.
- **rabbitmqca** - the ca file to use when publishing messages to RabbitMQ.
- **rabbitmqcacert** - the certificate file to use when publishing messages if using RabbitMQ.
- **rabbitmqcakey** - the key file to use when publishing messages if using RabbitMQ.
- **rabbitmqRoutingKey** - the routing key to use when publishing messages if using RabbitMQ.
2024-07-04 15:47:37 +00:00
- **logRetentionDays** - the maximum age logs should be kept.
2024-07-05 12:42:28 +00:00
- **maximumSQLAttempts** - the maximum number of attempts to try certain SQL operations.
2024-07-05 12:45:55 +00:00
- **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.
2024-07-05 12:42:28 +00:00