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 | Not counted |
| Parallel execution | Not supported |
| Distributed execution | Not supported |
Syntax
Output fields
| Field | Type | Description |
|---|---|---|
node_pair_name | string | Node pair name |
guid | string | Sentry ID |
connected | boolean | Current connection status |
host_name | string | Host name |
remote_ip | ipaddr | 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 | no sentry rpc permission | The account that ran the query does not have the sentry view permission. |
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.
To run the command, the account that runs the query must have the sentry view permission. If the account does not have the permission, a parse error occurs. Of the default roles, accounts with the cluster administrator or administrator role can run the command.
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.
Change history
The sonar-sentries command has been available since before Sonar 4.0.