sentry-logger-connect
Configures a remote sentry logger to receive logs.
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 to configure for log reception. |
Output fields
All fields of the input record are preserved. If an error occurs, the following field is added:
| Field | Type | Description |
|---|---|---|
_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-connect command identifies a sentry by the guid field of the input record and configures the logger specified by the name field to receive logs using the remote RPC call connectRemoteLogger.
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
-
Configure logger log reception
system sentries | eval name = "local\\\\syslog" | sentry-logger-connect | search isnull(_error) | fields guid, nameConfigures the
local\sysloglogger on all sentries for log reception and outputs only records that were processed without errors. -
Configure logger log reception with a specified timeout
system sentries | eval name = "local\\\\syslog" | sentry-logger-connect timeout=60 | fields guid, name, _errorConfigures logger log reception with the RPC timeout set to 60 seconds and outputs the processing results.