sentry-logger-configs
Retrieves the configuration of a logger from a remote sentry.
Command properties
| Property | Description |
|---|---|
| Command type | Transforming |
| Required permission | Administrator |
| License usage | N/A |
| Parallel execution | Supported |
| Distributed execution | Not supported |
Syntax
Options
timeout=INT- RPC timeout in seconds. Accepts a value between 1 and 600. (Default:
30)
Input fields
| Field | Type | Required | Description |
|---|---|---|---|
guid | string | Required | Sentry unique identifier. |
name | string | Required | Name of the logger whose configuration to retrieve. |
Output fields
All fields of the input record are preserved, and the following fields are added:
| Field | Type | Description |
|---|---|---|
configs | object | Logger configuration key-value pairs. |
_error | string | Error message added to the original record if an error occurs. |
Possible values for the _error field:
| Error message | Description |
|---|---|
| guid is null | The guid field value in the input record is null. |
| guid should be string | The guid field value in the input record is not a string. |
| guid should be non empty string | The guid field value in the input record is an empty string. |
| not connected | The specified sentry is not connected. |
| name should be not null | The name field value in the input record is null. |
| name should be string | The name field value in the input record is not a string. |
| name should be non empty string | The name field value in the input record is an empty string. |
| timeout | The RPC response did not arrive within the timeout period. |
| disconnected | The sentry connection was lost during the RPC call. |
Error codes
Parsing errors
| Error code | Message | Description |
|---|---|---|
| 23100 | No permission to call sentry RPC. | The user does not have administrator privileges. |
| 23101 | Invalid 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
-
Retrieve logger configuration
system sentries | eval name = "local\\\\syslog" | sentry-logger-configs | fields guid, name, configsRetrieves the configuration of the
local\sysloglogger from all sentries. -
Retrieve logger configuration with a specified timeout
system sentries | eval name = "local\\\\syslog" | sentry-logger-configs timeout=60 | fields guid, name, configsRetrieves the logger configuration with the RPC timeout set to 60 seconds.