sentry-logger-configs

Retrieves the configuration of a logger from a remote sentry.

Command properties

PropertyDescription
Command typeTransforming
Required permissionAdministrator
License usageN/A
Parallel executionSupported
Distributed executionNot supported

Syntax

sentry-logger-configs [timeout=INT]

Options

timeout=INT
RPC timeout in seconds. Accepts a value between 1 and 600. (Default: 30)

Input fields

FieldTypeRequiredDescription
guidstringRequiredSentry unique identifier.
namestringRequiredName of the logger whose configuration to retrieve.

Output fields

All fields of the input record are preserved, and the following fields are added:

FieldTypeDescription
configsobjectLogger configuration key-value pairs.
_errorstringError message added to the original record if an error occurs.

Possible values for the _error field:

Error messageDescription
guid is nullThe guid field value in the input record is null.
guid should be stringThe guid field value in the input record is not a string.
guid should be non empty stringThe guid field value in the input record is an empty string.
not connectedThe specified sentry is not connected.
name should be not nullThe name field value in the input record is null.
name should be stringThe name field value in the input record is not a string.
name should be non empty stringThe name field value in the input record is an empty string.
timeoutThe RPC response did not arrive within the timeout period.
disconnectedThe sentry connection was lost during the RPC call.

Error codes

Parsing errors
Error codeMessageDescription
23100No permission to call sentry RPC.The user does not have administrator privileges.
23101Invalid sentry RPC timeout option value. Use a value between 1 and 600.The timeout value is not an integer or is outside the range 1–600.
Runtime errors

N/A

Description

The sentry-logger-configs command identifies a sentry by the guid field of the input record and retrieves the configuration of the logger specified by the name field using the remote RPC call getLoggerConfigs. The result is assigned to the configs field as an object and merged with the input record for output.

If the input field values are invalid or the sentry is not connected, the _error field is added to the original record. If the RPC response does not arrive within the timeout period, _error: timeout is set on the record.

Up to 100 RPC requests are processed concurrently. The concurrency limit can be changed using the logpresso.core.sentry_rpc_parallel system property.

Examples

  1. Retrieve logger configuration

    system sentries
    | eval name = "local\\\\syslog"
    | sentry-logger-configs
    | fields guid, name, configs
    

    Retrieves the configuration of the local\syslog logger from all sentries.

  2. Retrieve logger configuration with a specified timeout

    system sentries
    | eval name = "local\\\\syslog"
    | sentry-logger-configs timeout=60
    | fields guid, name, configs
    

    Retrieves the logger configuration with the RPC timeout set to 60 seconds.