Categorygithub.com/pepabo/cwlq
modulepackage
0.6.1
Repository: https://github.com/pepabo/cwlq.git
Documentation: pkg.go.dev

# README

cwlq

cwlq is a tool/package for querying logs (of Amazon CloudWatch Logs) stored in various datasources.

Usage

$ cwlq s3://myrds-audit-logs/2022/12/11/ --parser rdsaudit --filter "message.host == '10.0.1.123'" --filter "message.object contains 'INSERT'"

Support datasource

Amazon S3

s3://bucket/path/to

Local file or directory

local://path/to local:///root/path/to

Fake datasource

fake://rdsaudit?duration=3sec

Amazon CloudWatch Logs directly

WIP

Note Perhaps it would be better to use CloudWatch Logs Insights.

Support Parser

rdsaudit

Parser for gziped logs via MariaDB Audit Plugin for Amazon RDS.

FieldExampleDescription
timestamp1670717181000The Unix time stamp for the logged event with microsecond precision.
message.timestamp20221211 00:06:21The Unix time stamp for the logged event with microsecond precision????
message.serverhostip-10-0-0-123The name of the instance that the event is logged for.
message.usernameredashThe connected user name of the user.
message.host10.0.1.123The host that the user connected from.
message.connectionid502547196The connection ID number for the logged operation.
message.queryid84996781288The query ID number, which can be used for finding the relational table events and related queries. For TABLE events, multiple lines are added.
message.operationQUERYThe recorded action type. Possible values are: CONNECT, QUERY, READ, WRITE, CREATE, ALTER, RENAME, and DROP.
message.databasedbnameThe active database, as set by the USE command.
message.objectSELECT * FROM accounts;For QUERY events, this value indicates the query that the database performed. For TABLE events, it indicates the table name.
message.retcode0The return code of the logged operation.
message.connection_type1The security state of the connection to the server.
raw``Raw data of log event.

Install

homebrew tap:

$ brew install pepabo/tap/cwlq

manually:

Download binany from releases page

go install:

$ go install github.com/pepabo/cwlq@latest

# Packages

Copyright © 2022 GMO Pepabo, inc.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

No description provided by the author

# Structs

No description provided by the author