Creates a logger on a sentry.
- 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 command requires that the input record contains
configs field values.
|Unique sentry identifier (Not relevant to GUID in JAVA)
|Unique logger identifier in the sentry namespace
|Logger factory identifier
|Name of table to which to store the logged data
|Host tag (
_host field tag value)
factory_name: Using the
logapi.loggerFactoriescommand on the Logpresso shell loads the logger factory list. Logger factories available may vary depending on the operating system or the installed app.
configs: Use the sentry-logger-configs query command to check the existing logger configuration before creating a new logger.
If any error occurs, this query command returns an
_error field in addition to the fields from input record. Possible errors are as follows:llows:
|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.
|factory_name should be not null
factory_name field value from input record is null.
|factory_name should be string
factory_name field value from input record is not a string.
|factory_name should be non empty string
factory_name field value from input record is empty.
|unsupported factoryname: factory_name
|factory_name logger factory is not supported.
|configs should be not null
configs field value from input record is null.
|configs should be dict type
configs field value from input record is not a map type.
|all values of configs should be string type
|Key-value pair of the
configs map is not a string.
|missing config key: name
|Required configuration key (name) is missnig.
|table_name should be non empty string
table_name field value from input record is empty.
|host_tag should be non empty string
host_tag field value from input record is empty.
|RPC request timeout exceeded
|Disconnected while processing RPC request
|Sentry is not connected.
Depending on the system where the sentry is installed, an RPC exception message other than the above can be issued.
Creates wtmp loggers on all connected linux sentries.
sentry | search os == "Linux" and is_connected | eval name = "wtmp_linux" | eval factory_name = "wtmp" | eval configs = dict("path", "/var/log/wtmp", "server", "linux", "dst_ip", remote_ip) | fields guid, name, factory_name, configs | sentry-logger-create