Documentation ¶
Index ¶
- func DecodeJson(root *insaneJSON.Root, data []byte) error
- func DecodeJsonToNode(root *insaneJSON.Root, data []byte) (*insaneJSON.Node, error)
- func DecodePostgresToJson(event *insaneJSON.Root, data []byte) error
- type CRIRow
- type Decoder
- type NginxErrorDecoder
- type NginxErrorRow
- type PostgresRow
- type ProtobufDecoder
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeJson ¶ added in v0.37.0
func DecodeJson(root *insaneJSON.Root, data []byte) error
func DecodeJsonToNode ¶ added in v0.37.0
func DecodeJsonToNode(root *insaneJSON.Root, data []byte) (*insaneJSON.Node, error)
func DecodePostgresToJson ¶ added in v0.37.0
func DecodePostgresToJson(event *insaneJSON.Root, data []byte) error
DecodePostgresToJson decodes postgres formatted log and merges result with event.
From:
"2021-06-22 16:24:27 GMT [7291] => [3-1] client=test_client,db=test_db,user=test_user LOG: listening on Unix socket \"/var/run/postgresql/.s.PGSQL.5432\""
To:
{ "time": "2021-06-22 16:24:27 GMT", "pid": "7291", "pid_message_number": "3-1", "client": "test_client", "db": "test_db", "user": "test_user", "log": "listening on Unix socket \"/var/run/postgresql/.s.PGSQL.5432\"" }
Types ¶
type NginxErrorDecoder ¶ added in v0.37.0
type NginxErrorDecoder struct {
// contains filtered or unexported fields
}
func NewNginxErrorDecoder ¶ added in v0.37.0
func NewNginxErrorDecoder(params map[string]any) (*NginxErrorDecoder, error)
func (*NginxErrorDecoder) Decode ¶ added in v0.37.0
func (d *NginxErrorDecoder) Decode(data []byte) (any, error)
Decode decodes nginx error formated log to NginxErrorRow.
Example of format:
"2022/08/17 10:49:27 [error] 2725122#2725122: *792412315 lua udp socket read timed out, context: ngx.timer"
func (*NginxErrorDecoder) DecodeToJson ¶ added in v0.37.0
func (d *NginxErrorDecoder) DecodeToJson(root *insaneJSON.Root, data []byte) error
DecodeToJson decodes nginx error formatted log and merges result with event.
From:
"2022/08/17 10:49:27 [error] 2725122#2725122: *792412315 lua udp socket read timed out, context: ngx.timer"
To:
{ "time": "2022/08/17 10:49:27", "level": "error", "pid": "2725122", "tid": "2725122", "cid": "792412315", "message": "lua udp socket read timed out, context: ngx.timer" }
func (*NginxErrorDecoder) Type ¶ added in v0.37.0
func (d *NginxErrorDecoder) Type() Type
type NginxErrorRow ¶ added in v0.37.0
type PostgresRow ¶ added in v0.37.0
type PostgresRow struct { Time []byte PID []byte PIDMessageNumber []byte Client []byte DB []byte User []byte Log []byte }
func DecodePostgres ¶
func DecodePostgres(data []byte) (PostgresRow, error)
DecodePostgres decodes postgres formated log to PostgresRow.
Example of format:
"2021-06-22 16:24:27 GMT [7291] => [3-1] client=test_client,db=test_db,user=test_user LOG: listening on Unix socket \"/var/run/postgresql/.s.PGSQL.5432\""
type ProtobufDecoder ¶ added in v0.27.0
type ProtobufDecoder struct {
// contains filtered or unexported fields
}
func NewProtobufDecoder ¶ added in v0.27.0
func NewProtobufDecoder(params map[string]any) (*ProtobufDecoder, error)
func (*ProtobufDecoder) Decode ¶ added in v0.27.0
func (d *ProtobufDecoder) Decode(data []byte) (any, error)
func (*ProtobufDecoder) DecodeToJson ¶ added in v0.37.0
func (d *ProtobufDecoder) DecodeToJson(root *insaneJSON.Root, data []byte) error
func (*ProtobufDecoder) Type ¶ added in v0.27.0
func (d *ProtobufDecoder) Type() Type
Click to show internal directories.
Click to hide internal directories.