> For the complete documentation index, see [llms.txt](https://docs.opscanvas.io/oscar/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.opscanvas.io/oscar/commands/health-checks.md).

# Health Checks

Oscar's `/check health` command runs read-only health checks across your cloud infrastructure, Kubernetes clusters, and version control systems.

## Running Health Checks

```bash
/check health
```

![Health check execution](/files/w09f1xEMOxZBFXUJkFma)

### What Gets Checked

Oscar automatically discovers and checks:

**Cloud Providers:**

* AWS (IAM, VPC, Security Groups, EC2, RDS, S3, etc.)
* Azure (Resource Groups, Virtual Networks, Storage, etc.)
* GCP (Projects, VPCs, Compute, Storage, etc.)

**Kubernetes:**

* Clusters configured in your kubeconfig
* Deployments, services, pods, resource usage
* Security configurations

**Version Control:**

* GitHub repositories and organizations
* GitLab projects

**Custom Checks:**

* User-defined health check scripts in `~/.config/oscar/custom-checks/`

### Interactive Selection

Oscar presents a checkbox interface to select which systems to check. You can:

* Select/deselect individual systems
* Check all systems at once
* Save your selection for next time

### Health Check Results

After running checks, Oscar:

1. Collects findings from all selected systems
2. Interprets results with AI
3. Categorizes findings by severity
4. Displays a summary with actionable insights

Results are saved locally and can be:

* Viewed in the terminal
* Assigned to team members with `/tasks assign`
* Exported as JSON with `--write-json` flag

## Generate Reusable Scripts

```bash
/check generate [description]
```

Creates a standalone health check script you can:

* Add to CI/CD pipelines
* Schedule with cron
* Share with your team

The generated script includes all dependencies and can run on any system with the required cloud CLI tools installed.

## Options

**`/check health --write-json`** - Save results as JSON file

Saves detailed findings to `~/.config/oscar/health-check-results.json` for programmatic access.

## Notes

* Health checks are read-only and never modify your infrastructure
* Requires valid cloud credentials (configured via `/setup` or environment variables)
* Results are stored locally in `~/.config/oscar/`
* Each finding has a unique ID for task assignment tracking


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.opscanvas.io/oscar/commands/health-checks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
