{"id":19556333,"url":"https://github.com/fiverr/node-rds-slow-log-parse","last_synced_at":"2025-04-26T22:33:00.260Z","repository":{"id":34648982,"uuid":"182058070","full_name":"fiverr/node-rds-slow-log-parse","owner":"fiverr","description":"Parse RDS log lines","archived":false,"fork":false,"pushed_at":"2023-06-25T06:34:13.000Z","size":26,"stargazers_count":5,"open_issues_count":1,"forks_count":8,"subscribers_count":46,"default_branch":"master","last_synced_at":"2025-04-23T02:02:16.357Z","etag":null,"topics":["aws","log","rds","slowquery"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/rds-slow-log-parse","language":"JavaScript","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/fiverr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-18T09:27:05.000Z","updated_at":"2024-06-29T11:42:00.000Z","dependencies_parsed_at":"2024-06-21T19:27:01.892Z","dependency_job_id":null,"html_url":"https://github.com/fiverr/node-rds-slow-log-parse","commit_stats":{"total_commits":19,"total_committers":5,"mean_commits":3.8,"dds":0.5789473684210527,"last_synced_commit":"8d2094cf3e185785e07516696dc27b034ee6a2d8"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiverr%2Fnode-rds-slow-log-parse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiverr%2Fnode-rds-slow-log-parse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiverr%2Fnode-rds-slow-log-parse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiverr%2Fnode-rds-slow-log-parse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fiverr","download_url":"https://codeload.github.com/fiverr/node-rds-slow-log-parse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251063667,"owners_count":21530837,"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","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":["aws","log","rds","slowquery"],"created_at":"2024-11-11T04:37:36.370Z","updated_at":"2025-04-26T22:32:55.245Z","avatar_url":"https://github.com/fiverr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rds-slow-log-parse [![](https://circleci.com/gh/fiverr/node-rds-slow-log-parse.svg?style=svg)](https://circleci.com/gh/fiverr/node-rds-log-parse) \u003ca href=\"https://www.npmjs.com/package/rds-slow-log-parse\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/rds-slow-log-parse.svg\"\u003e\u003c/a\u003e\n\n## 📃 RDS Slow Log line parser\n\n```js\nconst parse = require('rds-slow-log-parse');\n\nconst payload = new Buffer(event.awslogs.data, 'base64');\nconst logs = JSON.parse(zlib.gunzipSync(payload).toString('ascii'));\n\nconst events = logs.map(parse); // \u003c= ✨ Money time\n```\n\n### Example\n\nRecord\n```\n# Time: 190227 9:46:00\n# User@Host: rdsadmin[rdsadmin] @ localhost [127.0.0.1] Id: 9059049\n# Query_time: 0.000202 Lock_time: 0.000077 Rows_sent: 1 Rows_examined: 1\nuse operations_production;\nSET timestamp=1551260760;\nSELECT count(*) from mysql.rds_table_status WHERE action = \"reset slave\" and master_host is NULL and master_port is NULL ORDER BY action_timestamp LIMIT 1;\n```\n\nResult\n```js\n{\n    user: 'rdsadmin',\n    host: 'localhost',\n    ip: '127.0.0.1',\n    id: '9059049',\n    duration: 0.000202,\n    lock_wait: 0.000077,\n    rows_sent: 1,\n    rows_examined: 1,\n    context: 'operations_production', // optional\n    timestamp: 1551260760000,\n    query: `SELECT count(*) from mysql.rds_table_status WHERE action = \"reset slave\" and master_host is NULL and master_port is NULL ORDER BY action_timestamp LIMIT 1`,\n}\n```\n\n### Related projects:\n- [Elasticsearch Slow Log line parser](https://github.com/fiverr/node-es-slow-log-parse)\n- [MongoDB Slow Log line parser](https://github.com/fiverr/node-mongo-slow-log-parse)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiverr%2Fnode-rds-slow-log-parse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffiverr%2Fnode-rds-slow-log-parse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiverr%2Fnode-rds-slow-log-parse/lists"}