sentry-logger-stop
Stops a logger on 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 | Logger name that is unique within the sentry namespace. |
interval | integer | Optional | Stop wait time for the logger in milliseconds. Defaults to 5,000 ms if not specified. |
Output fields
| Field | Type | Description |
|---|---|---|
_error | string | Error message added to the original record if an error occurs. This field is absent when processing succeeds. |
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. |
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 should be integer | The interval field value in the input record is not an integer. |
not connected | The specified sentry is not connected. |
timeout | The RPC request timed out. |
disconnected | The connection was lost while processing the RPC request. |
Other RPC error messages may be assigned depending on the sentry environment.
Error codes
Parsing errors
| Error code | Message | Description |
|---|---|---|
| 23100 | No permission to call sentry RPC. | The command was run from a session without administrator privileges. |
| 23101 | Invalid sentry RPC timeout option value. Use a value between 1 and 600. | The timeout option value is not an integer or is outside the range 1–600. |
Runtime errors
N/A
Description
The sentry-logger-stop command uses the guid and name fields of the input record to send an asynchronous RPC request that stops a logger on the remote sentry. The interval field specifies the stop wait time in milliseconds; if not specified, 5,000 ms (5 seconds) is applied.
The maximum size of the asynchronous RPC request queue is 100 by default and can be changed using the logpresso.core.sentry_rpc_parallel system property. When the queue is full, new requests wait until existing requests complete or time out.
Results are output in the order RPC responses are received, so the output record order may differ from the input record order.
Examples
-
Stop all loggers
sentry | sentry-loggers | fields guid, name | sentry-logger-stopStops all loggers on all sentries. The default stop wait time of 5,000 ms is applied.
-
Stop a specific logger with a specified stop wait time
sentry | sentry-loggers | search name == "syslog" | eval interval = 10000 | fields guid, name, interval | sentry-logger-stop timeout=60Stops the
sysloglogger on all sentries with a stop wait time of 10,000 ms (10 seconds) and an RPC timeout of 60 seconds.