sonar-sentries

Retrieves the list and status information of all sentry agents registered in the cluster.

Command properties

ItemDescription
Command typeDriver query
Required permissionSentry view permission
License usageNot counted
Parallel executionNot supported
Distributed executionNot supported

Syntax

sonar-sentries

Output fields

FieldTypeDescription
node_pair_namestringNode pair name
guidstringSentry ID
connectedbooleanCurrent connection status
host_namestringHost name
remote_ipipaddrRemote IP address
pkg_verstringPackage version
aliasstringAlias
descriptionstringDescription
osstringOperating system name
os_verstringOperating system version
archstringSystem architecture
javastringJava name
java_verstringJava version
working_dirstringWorking directory
connected_attimestampLast connection time
disconnected_attimestampLast disconnection time

Error codes

Parse errors
Error codeMessageDescription
300360no sentry rpc permissionThe 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

  1. Retrieve the list of sentries

    sonar-sentries
    

    Retrieves the status information of all sentries registered in the cluster.

  2. Retrieve only connected sentries

    sonar-sentries
    | search connected == true
    

    Filters and returns only sentries that are currently connected.

  3. Aggregate sentries by operating system

    sonar-sentries
    | stats count by os
    

    Counts the number of registered sentries by operating system.

Change history

The sonar-sentries command has been available since before Sonar 4.0.