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 usageN/A
Parallel executionNot supported
Distributed executionNot supported

Syntax

sonar-sentries

Output fields

FieldTypeDescription
node_pair_namestringNode pair name
guidstringSentry GUID
connectedbooleanCurrent connection status
host_namestringHost name
remote_ipstringRemote 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
300360300360The 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

  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.