Commit Graph

18 Commits

Author SHA1 Message Date
Christopher
43e996bfda Add more Healthchecks to BigBearCasaOS Healthcheck (#18)
* 🔧 feat(healthcheck): Add process resource check

Adds a new check to the healthcheck script that
displays the top 5 CPU and memory consuming
processes, as well as checks for any zombie
processes. This provides more detailed
information about the system's resource
utilization.

*  feat: Implement comprehensive system health checks

This commit introduces a comprehensive system health check module to the CasaOS
healthcheck script. The new checks include:

- Network interface status and error/drop monitoring
- Network latency testing to common targets
- Filesystem health checks, including inode usage and mount point write access
- Time synchronization status, including NTP sync
- Log rotation configuration and large log file detection

These additional checks provide a more thorough assessment of the overall system
health, helping to identify potential issues that could impact the CasaOS
application. The goal is to proactively detect and report on common system
problems, allowing users to address them before they become critical.

*  feat(casaos-healthcheck): Update healthcheck version to 3.4

The changes update the version of the BigBearCasaOS Healthcheck from 3.3 to 3.4. This
update is necessary to reflect the latest improvements and bug fixes in the
healthcheck script.
2024-11-15 13:17:24 -06:00
Christopher
521780d02a feat(healthcheck): add dmesg error check (#17)
Adds a new function to check the system dmesg logs for any critical errors or warnings. This
helps identify potential hardware or kernel issues that may impact the system stability.
The function will print out the last 10 errors found in the dmesg logs, and indicate if
there are more errors. It also warns the user if they don't have the required permissions
to read the dmesg logs.

This change is important to provide a more comprehensive health check for CasaOS systems,
as dmesg logs can often contain valuable information about underlying system issues.
2024-10-25 11:10:01 -05:00
Christopher
39eefd9d8f 🔍 feat(casaos-healthcheck): Improve root and sudo privileges checks (#14)
Adds two new functions, `check_root_privileges()` and `check_sudo_privileges()`, to handle
the cases where the script is run with insufficient privileges. The script now
provides clearer instructions and prompts the user to either continue with the
limited functionality or exit and run the script with the required privileges.
2024-10-23 13:35:34 -05:00
Christopher
337227be4a feat: Improve portability of CasaOS healthcheck script (#15)
Replaces the hardcoded shebang `#!/bin/bash` with `#!/usr/bin/env bash` to
ensure the script can be executed on systems where the Bash binary is not
located at the default path `/bin/bash`.
2024-10-23 13:27:54 -05:00
Christopher
ba560a2471 feat(healthcheck): Add sudo check and improve version display (#13)
This commit introduces the following changes:

- Checks if the script is running with sudo privileges. If not, it prompts the
  user to continue without sudo or exit the script.
- Updates the version display of the BigBearCasaOS Healthcheck to V3.2.

The sudo check is added to ensure that the script can perform all necessary
checks and provide complete information, as some checks may require elevated
privileges. The version update reflects the latest release of the healthcheck
tool.
2024-10-11 21:28:56 -05:00
Christopher
7c38996391 feat(casaos-healthcheck): Add Docker port check and improve version display (#11)
This commit introduces the following changes:

1. Adds a new function `check_docker_ports` to the `casaos-healthcheck/run.sh` script. This
   function checks if Docker is installed and running, and if UFW (Uncomplicated Firewall)
   is installed and active. It then retrieves all running Docker containers and checks if
   the ports exposed by these containers are allowed by the UFW rules. If a port is not
   allowed, a warning is displayed.

2. Updates the version display in the `print_header` function from "BigBearCasaOS Healthcheck
   V3.0" to "BigBearCasaOS Healthcheck V3.1".

The Docker port check is an important addition to the healthcheck script, as it helps
identify potential issues with firewall rules that may be blocking Docker container ports.
This can be especially useful in troubleshooting network-related problems.

The version update reflects the changes introduced in this commit.
2024-10-05 11:45:44 -05:00
Christopher
66283166f1 update-casaos-healthcheck-to-3.0 (#8)
* 🎨 feat(healthcheck): add new health checks for Docker and storage

This commit introduces two new health checks to the BigBearCasaOS
Healthcheck script:

1. `check_docker_status()`: This function checks if Docker is installed and
   running on the system. It provides clear feedback based on the Docker
   status.

2. `check_storage_health()`: This function checks the health of all storage
   devices (disks) connected to the system using the `smartctl` tool. It
   reports the health status of each disk, indicating if it has passed the
   SMART health check or if there may be potential issues.

These new health checks provide a more comprehensive overview of the system's
overall health and help identify any potential issues related to Docker or
storage-related problems.

* 📄 feat(casaos-healthcheck): Enhance DNS resolution and add system health checks

This change enhances the DNS resolution checks in the casaos-healthcheck script and adds new system health checks for disk space, CPU load, memory usage, and system temperature.

The key changes include:

- Improve DNS resolution by trying multiple DNS servers and retrying on failure
- Add a check for basic network connectivity before attempting DNS lookups
- Implement a check for disk space usage, with a configurable threshold
- Implement a check for CPU load, with a configurable threshold based on the number of cores
- Implement a check for memory usage, with a configurable threshold based on total memory
- Implement a check for system temperature, using the `sensors` command or `/sys/class/thermal` when available
- Add a check for available system updates using `apt-get`

These new checks provide a more comprehensive health monitoring solution for the CasaOS system.

*  feat: Bump healthcheck version to 3.0

Bumped the version of the BigBearCasaOS Healthcheck tool from 2.3 to 3.0.
This change reflects the latest updates and improvements made to the
healthcheck script.
2024-09-27 09:56:57 -05:00
Christopher
e470f0e829 feat: Add GitLab registry to DNS resolution check in healthcheck script for improved coverage and troubleshooting 2024-08-12 13:32:58 -05:00
Christopher
578dfab6b8 feat: Add DNS resolution check for Docker registries in healthcheck script to enhance troubleshooting capabilities 2024-08-12 13:27:37 -05:00
Christopher
015dba2795 feat: Update healthcheck script header to reflect version change for clarity and better version tracking 2024-08-12 13:15:20 -05:00
Christopher
ea6dccb8d9 feat: Refactor error detection in healthcheck script to use configurable non-error patterns for improved flexibility and maintenance 2024-08-12 13:14:17 -05:00
Christopher
add3bb0cd3 feat: Update healthcheck script to include warning for inactive casaos-local-storage-first.service to improve service monitoring 2024-08-12 13:10:32 -05:00
Christopher
f8559dbdd7 feat: Enhance CasaOS healthcheck script with service status checks, colored output, and improved logging for better error visibility 2024-08-12 13:00:58 -05:00
Christopher
dbf734ac8a Refactor service name extraction in casaos-healthcheck run.sh 2024-02-29 10:03:15 -06:00
Christopher
33f7173604 Fix grep command to exclude non-printable characters in casaos-healthcheck/run.sh 2024-02-28 16:31:30 -06:00
Christopher
4228f04a93 Fix grep command to exclude non-ASCII characters in SERVICES variable assignment 2024-02-28 16:08:39 -06:00
Christopher
6e26c811bc Add welcome message and system information to CasaOS Healthcheck script 2024-01-27 14:13:28 -06:00
Christopher
14d8e7eea8 Add CasaOS Healthcheck 2023-10-10 17:28:44 -05:00