> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-cli/administration/system-status.md).

# Check system status

`sonar system status` gives you a single diagnostic view of your SonarQube CLI installation: whether your token is valid, which proxy, custom CA certificate, and client certificate settings the CLI resolved, which auxiliary binaries are installed, which integrations are configured, and whether a CLI update is available.

The command doesn't require authentication. It still reports whether saved credentials exist and, when possible, verifies the token against your SonarQube server.

## Run the status check

```bash
sonar system status
```

The output starts with a banner and a system check headline:

* **SYSTEM CHECK: Healthy** when authentication and integration configuration look good.
* **SYSTEM CHECK: Issues found** when the token is missing or invalid, when an MCP config file is present but malformed, when an Antigravity secrets hook is installed but its configuration or backing script is invalid, or when client certificate configuration is invalid

Authentication is reported as one of:

* **Not Set**: no active connection in `state.json`
* **Active**: token validated successfully
* **Invalid**: token rejected by the server
* **Set Unverified**: a token is stored but the server could not be reached to validate it. When the failure is due to a network or TLS problem, the output includes the underlying error message (for example, a connection timeout or certificate error).

## What the report includes

| Section             | What it shows                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Authentication**  | Active server URL, organization (SonarQube Cloud), and the current token state.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **Binaries**        | Auxiliary tools the CLI downloaded (for example, the secrets engine and SCA scanner), their paths, versions, and whether a newer pinned version is available.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| **Cache**           | Whether log, SCA scanner cache, and global Git hook directories exist under `~/.sonar/sonarqube-cli/`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Integrations**    | Each `sonar integrate` install with its config path. For most agents, MCP Server status is shown (not configured, configured, or invalid config). For Antigravity, Secrets Hook status is also shown when a secrets hook is recorded in state.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **Network**         | <p>Resolved proxy, custom CA certificate, and client certificate settings, including the configuration source (<code>SONAR\_\*</code> environment variables, <code>sonar config</code>, or generic <code>HTTPS\_PROXY</code> / <code>NODE\_EXTRA\_CA\_CERTS</code> variables). Proxy URLs redact embedded credentials. When a client certificate is configured, the section lists the certificate path and, for PEM files, the key path. For PKCS#12 bundles (<code>.p12</code> or <code>.pfx</code>), the key path is omitted and passphrase status is shown instead. When client certificate configuration is invalid, the section shows the error. When nothing is configured, the section reports that no advanced network configuration was detected. The SonarQube MCP server launched by the CLI uses these settings. A note warns that not all CLI features currently honor proxy and certificate settings (for example, secrets hooks, context augmentation, and Software Composition Analysis). See <a href="/pages/8nmHw2iqIKWTdyXwxaeR#network-connectivity">environment-variables.md</a>.<br><br>Also, shows "No advanced network configuration detected" when neither is set. See <a data-mention href="/pages/AeqZBvqDmx5e0DUISegE">/pages/AeqZBvqDmx5e0DUISegE</a> for details.</p> |
| **Recommendations** | Suggested next steps such as `sonar auth login`, `sonar update` (standalone builds only), fixing invalid client certificate configuration, or re-running an integrate command to fix MCP or secrets hook configuration.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |

For token verification details, see [`sonar auth status`](/sonarqube-cli/using-sonarqube-cli/commands.md#sonar-auth-status). For what reset clears, see [Reset the CLI](/sonarqube-cli/administration/system-reset.md).

## Machine-readable output

For scripts and automation, pass `--json`:

```bash
sonar system status --json
```

The JSON document includes the CLI version, authentication summary, a `network` object (proxy URLs, `noProxy` list, CA certificate path, `clientCertificate` object with certificate path, optional key path for PEM files, `passphraseSet` for PKCS#12 bundles, or an `error` when configuration is invalid, and human-readable source labels), binaries, cache directories, integrations, MCP configuration flags, Antigravity secrets hook flags (`configured` and `valid` under `hooks` when applicable), a top-level `healthy` boolean, and a `recommendations` array. Token state in JSON uses `not_set`, `active`, `invalid`, or `set_unverified`. When token verification fails because the server is unreachable, the authentication object may also include `tokenError` with the underlying network or TLS message.

## When to use it

* After `sonar auth login` or when integrations stop working: confirm the token, network settings, MCP config, and (for Antigravity) secrets hook are healthy
* Before filing a support request: capture the status output
* In CI diagnostics when the CLI behaves unexpectedly but commands still run

## Related pages <a href="#related-pages" id="related-pages"></a>

* [Commands reference](/sonarqube-cli/using-sonarqube-cli/commands.md)
* [Reset the CLI](/sonarqube-cli/administration/system-reset.md)
* [State and storage](/sonarqube-cli/administration/state-and-storage.md)
* [Advanced network configuration](/sonarqube-cli/administration/advanced-network-configuration.md)
* [Output formats](/sonarqube-cli/using-sonarqube-cli/output-formats.md)


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.sonarsource.com/sonarqube-cli/administration/system-status.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
