{"id":21878291,"url":"https://github.com/pepabo/cwlq","last_synced_at":"2026-05-20T14:14:36.588Z","repository":{"id":64887583,"uuid":"577155257","full_name":"pepabo/cwlq","owner":"pepabo","description":"cwlq is a tool/package for querying logs (of Amazon CloudWatch Logs) stored in various datasources.","archived":false,"fork":false,"pushed_at":"2022-12-19T07:42:17.000Z","size":77,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-21T23:44:53.970Z","etag":null,"topics":["cloudwatch-logs"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pepabo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-12-12T04:56:43.000Z","updated_at":"2023-01-09T08:31:22.000Z","dependencies_parsed_at":"2023-01-29T20:45:20.028Z","dependency_job_id":null,"html_url":"https://github.com/pepabo/cwlq","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/pepabo/cwlq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepabo%2Fcwlq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepabo%2Fcwlq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepabo%2Fcwlq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepabo%2Fcwlq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pepabo","download_url":"https://codeload.github.com/pepabo/cwlq/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepabo%2Fcwlq/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267436604,"owners_count":24086898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudwatch-logs"],"created_at":"2024-11-28T08:12:11.967Z","updated_at":"2026-05-20T14:14:36.531Z","avatar_url":"https://github.com/pepabo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cwlq\n\ncwlq is a tool/package for querying logs (of Amazon CloudWatch Logs) stored in various datasources.\n\n## Usage\n\n``` console\n$ cwlq s3://myrds-audit-logs/2022/12/11/ --parser rdsaudit --filter \"message.host == '10.0.1.123'\" --filter \"message.object contains 'INSERT'\"\n```\n\n## Support datasource\n\n### Amazon S3\n\n`s3://bucket/path/to`\n\n### Local file or directory\n\n`local://path/to` `local:///root/path/to`\n\n### Fake datasource\n\n`fake://rdsaudit?duration=3sec`\n\n### Amazon CloudWatch Logs directly\n\nWIP\n\n\u003e **Note**\n\u003e Perhaps it would be better to use [CloudWatch Logs Insights](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html).\n\n## Support Parser\n\n### `rdsaudit`\n\nParser for gziped logs via MariaDB Audit Plugin for Amazon RDS.\n\n| Field | Example | Description |\n| --- | --- | --- |\n| `timestamp` | `1670717181000` | The Unix time stamp for the logged event with microsecond precision. |\n| `message.timestamp`  | `20221211 00:06:21` | [The Unix time stamp for the logged event with microsecond precision????](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.MySQL.Options.AuditPlugin.html) |\n| `message.serverhost` | `ip-10-0-0-123` | [The name of the instance that the event is logged for.](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.MySQL.Options.AuditPlugin.html) |\n| `message.username` | `redash` | [The connected user name of the user.](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.MySQL.Options.AuditPlugin.html) |\n| `message.host` | `10.0.1.123` | [The host that the user connected from.](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.MySQL.Options.AuditPlugin.html) |\n| `message.connectionid` | `502547196` | [The connection ID number for the logged operation.](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.MySQL.Options.AuditPlugin.html) |\n| `message.queryid` | `84996781288` | [The query ID number, which can be used for finding the relational table events and related queries. For `TABLE` events, multiple lines are added.](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.MySQL.Options.AuditPlugin.html) |\n| `message.operation` | `QUERY` | [The recorded action type. Possible values are: `CONNECT`, `QUERY`, `READ`, `WRITE`, `CREATE`, `ALTER`, `RENAME`, and `DROP`.](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.MySQL.Options.AuditPlugin.html) |\n| `message.database` | `dbname` | [The active database, as set by the `USE` command.](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.MySQL.Options.AuditPlugin.html) |\n| `message.object` | `SELECT * FROM accounts;` | [For `QUERY` events, this value indicates the query that the database performed. For `TABLE` events, it indicates the table name.](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.MySQL.Options.AuditPlugin.html) |\n| `message.retcode` | `0` | [The return code of the logged operation.](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.MySQL.Options.AuditPlugin.html) |\n| `message.connection_type` | `1` | [The security state of the connection to the server.](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.MySQL.Options.AuditPlugin.html) |\n| `raw` | `` | Raw data of log event. |\n\n## Install\n\n**homebrew tap:**\n\n```console\n$ brew install pepabo/tap/cwlq\n```\n\n**manually:**\n\nDownload binany from [releases page](https://github.com/pepabo/cwlq/releases)\n\n**go install:**\n\n```console\n$ go install github.com/pepabo/cwlq@latest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpepabo%2Fcwlq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpepabo%2Fcwlq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpepabo%2Fcwlq/lists"}