Updates the cron-format logging schedule of a specific sentry logger.
- RPC timeout in seconds (default: 30 seconds)
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.
This query requires that the input record contains
cron_schedule field values.
|Unique sentry identifier (Not relevant to GUID in JAVA)
|Unique logger identifier in the sentry namespace
|Logging schedule in cron job format (If null is given, the existing schedule is deleted.)
cron_schedule: A schedule is defined using the unix-cron string format. For more details on scheduling, use
man 5 crontabon your Linux.
If any error occurs, this query command returns an
_error field in addition to the fields from input record. Possible errors are as follows:
|guid is null
guid field value from input record is null.
|guid should be string
guid field value from input record is not a string.
|guid should be non empty string
guid field value from input record is empty.
|name should be not null
name field value from input record is null.
|name should be string
name field value from input record is not a string.
|name should be non empty string
name field value from input record is empty.
|cron_schedule should be string
cron_schedule field value from input record is not a string.
|wrong cron expression format: expr
cron_schedule field value from input record is not of valid cron format.
|logger not found: name
|Logger of the specified name (name) is not found.
|logger is running: name
|You cannot update the schedule of the running logger (name).
|RPC request timeout exceeded
|Disconnected while processing RPC request
|Sentry is not connected.
|sentry method not found: setLoggerSchedule
|Sentry version is earlier than 3.10.2106.0. This command is not supported.
Depending on the system where the sentry is installed, an RPC exception message other than the above can be issued.
Set 'wtmp_linux' loggers in all connected sentries to run at minute 0.
sentry | sentry-loggers | search name == "wtmp_linux" | eval cron_schedule="0 * * * *" | sentry-logger-set-schedule