Skip to content

Improve system checks and add configuration support #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mberbero
Copy link
Member

@mberbero mberbero commented Dec 24, 2024

Add error handling, configuration file support, and update documentation.

  • main.go:

    • Add error handling for exec.Command function.
    • Add support for reading checks from a configuration file.
    • Modify runChecks function to read checks from the configuration file.
    • Update main function to load configuration file and pass it to runChecks.
    • Add loadChecks function to read checks from the configuration file.
  • config.json:

    • Add a JSON file to define the system checks with fields for Name, Cmd, and ErrHint.
  • README.md:

    • Add instructions on how to run the application.
    • Add instructions on how to customize checks using the configuration file.
    • Add instructions on how to interpret the results.

Add error handling, configuration file support, and update documentation.

* **main.go**:
  - Add error handling for `exec.Command` function.
  - Add support for reading checks from a configuration file.
  - Modify `runChecks` function to read checks from the configuration file.
  - Update `main` function to load configuration file and pass it to `runChecks`.
  - Add `loadChecks` function to read checks from the configuration file.

* **config.json**:
  - Add a JSON file to define the system checks with fields for `Name`, `Cmd`, and `ErrHint`.

* **README.md**:
  - Add instructions on how to run the application.
  - Add instructions on how to customize checks using the configuration file.
  - Add instructions on how to interpret the results.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/kintsdev/kumo?shareId=XXXX-XXXX-XXXX-XXXX).
* Add checks for firewall status, open ports, user accounts, SSH configuration, installed packages, system logs, network configuration, system uptime, disk usage, kernel version, and system updates.
…plication

* **Running the Application:**
  - Add steps to clone the repository before building and running the application.
* **Customizing Checks:**
  - Clarify the description of the `config.json` file and its fields.
  - Provide an example `config.json` entry.
* **Interpreting Results:**
  - Update the format for displaying results in the terminal.
  - Provide an example output for passed and failed checks.
* Add detailed error messages in `runCommand` function, including the specific command that failed
* Modify error message in `runChecks` function to include the specific command and error details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant