{"id":19556336,"url":"https://github.com/fiverr/node-es-slow-log-parse","last_synced_at":"2025-06-25T03:45:00.474Z","repository":{"id":57226998,"uuid":"206320524","full_name":"fiverr/node-es-slow-log-parse","owner":"fiverr","description":"Parse Elasticsearch log lines","archived":false,"fork":false,"pushed_at":"2023-03-21T22:51:48.000Z","size":9,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":42,"default_branch":"master","last_synced_at":"2025-04-04T18:11:19.635Z","etag":null,"topics":["aws","elasticsearch","log","parse","slowlog"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/es-slow-log-parse","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-04T13:02:17.000Z","updated_at":"2024-01-15T08:00:35.000Z","dependencies_parsed_at":"2024-11-11T04:49:05.954Z","dependency_job_id":null,"html_url":"https://github.com/fiverr/node-es-slow-log-parse","commit_stats":{"total_commits":7,"total_committers":4,"mean_commits":1.75,"dds":0.4285714285714286,"last_synced_commit":"5ef7b6f7e86276dc524dd5ff2f89bcd992ff276b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiverr%2Fnode-es-slow-log-parse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiverr%2Fnode-es-slow-log-parse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiverr%2Fnode-es-slow-log-parse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiverr%2Fnode-es-slow-log-parse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fiverr","download_url":"https://codeload.github.com/fiverr/node-es-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","elasticsearch","log","parse","slowlog"],"created_at":"2024-11-11T04:37:36.741Z","updated_at":"2025-04-26T22:32:57.214Z","avatar_url":"https://github.com/fiverr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# es-slow-log-parse [![](https://circleci.com/gh/fiverr/node-es-slow-log-parse.svg?style=svg)](https://circleci.com/gh/fiverr/node-es-log-parse) \u003ca href=\"https://www.npmjs.com/package/es-slow-log-parse\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/es-slow-log-parse.svg\"\u003e\u003c/a\u003e\n\n## 📃 Elasticsearch Slow Log line parser\n\n```js\nconst parse = require('es-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[2019-09-04T14:17:34,160][INFO ][index.search.slowlog.query] [es-search-data] [index_1][9] took[225.8ms], took_millis[225], types[type_1], stats[], search_type[QUERY_THEN_FETCH], total_shards[10], source[{\"some\":{\"kind\":{\"of\":{\"complex\":\"json\"}}}}],'\n```\n\nResult\n```js\n{\n    timestamp: '2019-09-04T14:17:34,160',\n    severity: 'INFO',\n    source: 'index.search.slowlog.query',\n    node: 'es-search-data',\n    index: 'index_1',\n    shard: 9,\n    took: '225.8ms',\n    took_millis: 225,\n    types: 'type_1',\n    stats: '',\n    search_type: 'QUERY_THEN_FETCH',\n    total_shards: 10,\n    query: '{\"some\":{\"kind\":{\"of\":{\"complex\":\"json\"}}}}',\n}\n```\n\n### Related projects:\n- [RDS Slow Log line parser](https://github.com/fiverr/node-rds-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-es-slow-log-parse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffiverr%2Fnode-es-slow-log-parse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiverr%2Fnode-es-slow-log-parse/lists"}