mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
103 lines
3 KiB
Text
103 lines
3 KiB
Text
##! Events and records generated by the Redis analyzer.
|
|
|
|
module Redis;
|
|
|
|
export {
|
|
## The Redis SET command.
|
|
type SetCommand: record {
|
|
## The key the SET command is setting.
|
|
key: string &log;
|
|
## The value the SET command is setting key to.
|
|
value: string &log;
|
|
## If NX is set -- only set the key if it does not exist.
|
|
nx: bool;
|
|
## If XX is set -- only set the key if it already exists.
|
|
xx: bool;
|
|
## If GET is set -- return the old string stored at key.
|
|
get: bool;
|
|
## EX option -- set the specified expire time, in seconds.
|
|
ex: count &optional;
|
|
## PX option -- set the specified expire time, in milliseconds.
|
|
px: count &optional;
|
|
## EXAT option-- set the specified Unix time at which the key will
|
|
## expire, in seconds.
|
|
exat: count &optional;
|
|
## PXAT option -- set the specified Unix time at which the key will
|
|
## expire, in milliseconds.
|
|
pxat: count &optional;
|
|
## If KEEPTTL is set -- retain the time to live associated with the key.
|
|
keep_ttl: bool;
|
|
};
|
|
|
|
## The Redis AUTH command.
|
|
type AuthCommand: record {
|
|
## The username getting authenticated.
|
|
username: string &optional;
|
|
## The password authenticated with.
|
|
password: string;
|
|
};
|
|
|
|
## A generic Redis command from the client.
|
|
type Command: record {
|
|
## The raw command, exactly as parsed
|
|
raw: vector of string;
|
|
## The first element of the command. Some commands are two strings, meaning
|
|
## this is inaccurate for those cases.
|
|
name: string &log;
|
|
## The key, if this command is known to have a key
|
|
key: string &log &optional;
|
|
## The value, if this command is known to have a value
|
|
value: string &log &optional;
|
|
## The command in an enum if it was known
|
|
known: KnownCommand &optional;
|
|
};
|
|
|
|
## A generic Redis reply from the client.
|
|
type ReplyData: record {
|
|
value: string &log &optional;
|
|
};
|
|
}
|
|
|
|
## Generated for Redis SET commands sent to the Redis server.
|
|
##
|
|
## c: The connection.
|
|
##
|
|
## command: The SET command sent to the server and its data.
|
|
global set_command: event(c: connection, command: SetCommand);
|
|
|
|
## Generated for Redis GET commands sent to the Redis server.
|
|
##
|
|
## c: The connection.
|
|
##
|
|
## command: The GET command sent to the server and its data.
|
|
global get_command: event(c: connection, key: string);
|
|
|
|
## Generated for Redis AUTH commands sent to the Redis server.
|
|
##
|
|
## c: The connection.
|
|
##
|
|
## command: The AUTH command sent to the server and its data.
|
|
global auth_command: event(c: connection, command: AuthCommand);
|
|
|
|
## Generated for every command sent by the client to the Redis server.
|
|
##
|
|
## c: The connection.
|
|
##
|
|
## cmd: The command sent to the server.
|
|
global command: event(c: connection, cmd: Command);
|
|
|
|
## Generated for every successful response sent by the Redis server to the
|
|
## client.
|
|
##
|
|
## c: The connection.
|
|
##
|
|
## data: The server data sent to the client.
|
|
global reply: event(c: connection, data: ReplyData);
|
|
|
|
## Generated for every error response sent by the Redis server to the
|
|
## client.
|
|
##
|
|
## c: The connection.
|
|
##
|
|
## data: The server data sent to the client.
|
|
global error: event(c: connection, data: ReplyData);
|