ChatGPT's ideas for subroutines
I would like to add more features to Monitorlizard, which all these subroutines are part of. I currently have a service monitoring part that checks if every container is running, an update checker that automatically downloads updates and restarts the related containers, a backup system that automatically runs borgbackup, and a 'notification tooter' that automatically toots the notifications in the buffer to mastodon. I was thinking of something like a disk subroutine that checks free disk space using df -h and smart status using smartctl or something, as well as mdraid status if there is any, or btrfs, zfs, and so forth, and alerts with notifications and logs if it finds issues. Do you have any ideas for other subroutines we could build?
It seems like you've already covered a significant part of what a typical system administrator might want to monitor. However, here are a few more suggestions for subroutines you might find useful:
- CPU and Memory Usage Monitor: This subroutine could periodically check the CPU usage, memory consumption, and load average on your system. If any of these cross a certain threshold, it could generate a notification.
- Network Traffic Monitor: This subroutine could monitor the network traffic on your server. It could notify you if there's an unusual amount of data being sent or received, which might indicate a problem.
- Log File Monitor: This subroutine could monitor certain critical log files (like syslog or application-specific logs) for certain keywords or patterns indicating errors or problems, and generate notifications if these are found.
- User Activity Monitor: This subroutine could monitor for any suspicious user activity on your server. For instance, failed login attempts or new user account creations.
- Process Monitor: This subroutine could monitor the running processes in your server, notifying you if any critical process stops running or if an unexpected process starts.
- Database Monitor: If your server is running a database, this subroutine could check the health of the database, including its availability, response time, and any other key metrics provided by the database system itself.
- Certificate Expiry Monitor: If your server is serving any SSL/TLS content, this subroutine could check the expiry date of your SSL/TLS certificates and notify you when they are about to expire.
Remember, the goal with these subroutines is not to monitor everything all the time, but rather to focus on those areas that are most critical to the operation of your server and to the applications it's hosting.