sentry-loggers

Loads the logger list of a sentry.

Syntax

sentry-loggers [timeout=INT]
Parameter
timeout=INT
RPC timeout in seconds (default: 30 seconds)

Description

This query command sends asynchronous RPC request messages to 100 sentries at the same time and waits for responses.The RPC request message queue operates on a first-in, first-out (FIFO) basis. For example, if the Logpresso server needs to send RPC messages to 150 sentries, the server sends an RPC message to 100 sentries first and waits until RPC responses. If the waiting time exceeds the time specified in the timeout (default: 30 seconds), it is considered that an error has occurred on the sentry side. If 32 out of 100 sentries respond or timeout is exceeded, the Logpresso server sends an RPC message to the additional 32 sentries.

The query command outputs the results of RPC response messages in the order they are received. Depending on the load or network conditions of the host where Sentry is installed, the order of the responses may vary with each execution. Use the output data but do not rely on the order of the records.

Tip
Logpresso environment variable `logpresso.core.sentry_rpc_parallel` determines the length of the asynchronous RPC request message queue. The default value is `100` and you can adjust the length by modifying the value of this environment variable.
Input Field

This query command requires that the input record contains a guid field value.

FieldTypeDescription
guidStringUnique sentry identifier (Not relevant to GUID in JAVA)
Output Fields

This query command returns the fields below in addition to the fields from input record.

FieldTypeDescription
nameStringLogger identifier
descriptionStringLogger Description
factory_nameStringLogger type identifier (e.g. syslog, wtmp)
statusStringLogger status (e.g. running, stopped)
interval32-bit IntegerLogging cycle (Unit: millisecond)
cron_scheduleStringLog collection schedule in cron format
transformerStringTransformer identifier
stop_reasonStringLogger stop reason
log_count64-bit IntegerCollected log count (Total count of collected logs)
drop_count64-bit IntegerDropped log count
log_volume64-bit IntegerCollected log volume (Total volume of collected logs. Unit: byte)
drop_volume64-bit IntegerDropped log volume (Unit: byte)
last_start_atDateLast activated time
last_run_atDateLast executed time
last_log_atDate_time field value of the last collected log
last_write_atDateLast log output time (Use case: tracking system idle time)
start_timeStringLogging start time (Format: HH:mm)
end_timeStringLogging end time (Format: HH:mm)
failureStringLogger failure reason

Possible failure reason in failure field is as follows:

Failure reasonDescription
USER_REQUESTInactivated upon the user request.
SYSTEM_REQUESTStopped due system request such as failover
LOW_DISKStopped due to the lack of disk space.
TRANSFORMER_DEPENDENCYTransformer dependency is not resolved.
FACTORY_DEPENDENCYFactory dependency is not resolved. Bundle is not running.
STOP_EXCEPTIONThe table to store data is not found or the storage is in the read-only mode.
LOGGER_EXCEPTIONUnexpected error during logging.
LOGGER_DEPENDENCYLogger dependency is not resolved.

If any error occurs, this query command returns an _error field in addition to the fields from input record. Possible errors are as follows:

Error MessageDescription
guid is nullguid field value from input record is null.
guid should be stringguid field value from input record is not a string.
guid should be non empty stringguid field value from input record is empty.
timeoutRPC request timeout exceeded.
disconnectedDisconnected while processing RPC request.
not connectedSentry is not connected.

Depending on the system where the sentry is installed, an RPC exception message other than the above can be issued.

Usage

  1. Load logger lists of all sentries.

    sentry | fields guid | sentry-loggers