sonar-sentries
Retrieves the list and status information of all sentry agents registered in the cluster.
Command properties
| Item | Description |
|---|---|
| Command type | Driver query |
| Required permission | Sentry view permission |
| License usage | N/A |
| Parallel execution | Not supported |
| Distributed execution | Not supported |
Syntax
sonar-sentries
Output fields
| Field | Type | Description |
|---|---|---|
node_pair_name | string | Node pair name |
guid | string | Sentry GUID |
connected | boolean | Current connection status |
host_name | string | Host name |
remote_ip | string | Remote IP address |
pkg_ver | string | Package version |
alias | string | Alias |
description | string | Description |
os | string | Operating system name |
os_ver | string | Operating system version |
arch | string | System architecture |
java | string | Java name |
java_ver | string | Java version |
working_dir | string | Working directory |
connected_at | timestamp | Last connection time |
disconnected_at | timestamp | Last disconnection time |
Error codes
Parse errors
| Error code | Message | Description |
|---|---|---|
| 300360 | 300360 | The user does not have sentry view permission (SENTRY_VIEW). |
Runtime errors
N/A
Description
The sonar-sentries command retrieves the list of all sentry agents registered in the cluster. If no sentries are registered, no results are returned.
The command checks for the SENTRY_VIEW permission through the access control service. If the permission is not present, a parse error occurs.
Examples
-
Retrieve the list of sentries
sonar-sentriesRetrieves the status information of all sentries registered in the cluster.
-
Retrieve only connected sentries
sonar-sentries | search connected == trueFilters and returns only sentries that are currently connected.
-
Aggregate sentries by operating system
sonar-sentries | stats count by osCounts the number of registered sentries by operating system.