{"id":19010172,"url":"https://github.com/nitishm/engarde","last_synced_at":"2025-09-25T09:36:37.553Z","repository":{"id":38267740,"uuid":"205987629","full_name":"nitishm/engarde","owner":"nitishm","description":"Parse default envoy (and istio-proxy) access logs like a champ with engarde and jq","archived":false,"fork":false,"pushed_at":"2021-05-07T16:26:32.000Z","size":18056,"stargazers_count":92,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T15:12:00.333Z","etag":null,"topics":["envoy","grok","istio","json","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/nitishm.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":null,"security":null,"support":null}},"created_at":"2019-09-03T04:15:30.000Z","updated_at":"2025-02-22T04:16:22.000Z","dependencies_parsed_at":"2022-08-28T17:51:09.620Z","dependency_job_id":null,"html_url":"https://github.com/nitishm/engarde","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitishm%2Fengarde","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitishm%2Fengarde/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitishm%2Fengarde/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitishm%2Fengarde/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nitishm","download_url":"https://codeload.github.com/nitishm/engarde/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247517921,"owners_count":20951719,"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":["envoy","grok","istio","json","logs"],"created_at":"2024-11-08T19:10:13.908Z","updated_at":"2025-09-25T09:36:32.534Z","avatar_url":"https://github.com/nitishm.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Image of Engarde Gopher](https://storage.googleapis.com/gopherizeme.appspot.com/gophers/fef90366a965fc1a12ede6225907f2007ecdf5a1.png)\n\n# Engarde - Stay on guard with Envoy Access Logs\nParse [default envoy access logs](https://www.envoyproxy.io/docs/envoy/v1.8.0/configuration/access_log#default-format)  like a champ with engarde and [jq](https://github.com/stedolan/jq)\n\n[![GoDoc](https://godoc.org/github.com/nitishm/engarde?status.svg)](https://godoc.org/github.com/nitishm/engarde)\n\n# Motivation\nEnvoy access log messages are packed with a lot of useful information but in an unstructured log format. Without prior context, or even with context it can get cumbersome to visually inspect these log messages to extract useful information.\n\nI was inspired by this [tweet](https://twitter.com/askmeegs/status/1157029140693995521?ref_src=twsrc%5Etfw%7Ctwcamp%5Etweetembed\u0026ref_url=https%3A%2F%2Fcdn.embedly.com%2Fwidgets%2Fmedia.html%3Ftype%3Dtext%252Fhtml%26key%3Da19fcc184b9711e1b4764040d3dc5c07%26schema%3Dtwitter%26url%3Dhttps%253A%2F%2Ftwitter.com%2Faskmeegs%2Fstatus%2F1157029140693995521%26image%3Dhttps%253A%2F%2Fi.embed.ly%2F1%2Fimage%253Furl%253Dhttps%25253A%25252F%25252Fpbs.twimg.com%25252Fmedia%25252FEA6X3jiX4AYh5X_.jpg%25253Alarge%2526key%253Da19fcc184b9711e1b4764040d3dc5c07) from [Megan O'Keefe](https://twitter.com/askmeegs) on twitter to create this tool for better readability of the envoy/istio-proxy access logs.\n\nIn addition, a special shout out to Richard Li from ambassador.io for this excellent [article](https://blog.getambassador.io/understanding-envoy-proxy-and-ambassador-http-access-logs-fee7802a2ec5) that provides more details on each of the subcomponents of the log message.\n\n# Installing\n\n## Homebrew\n\n```console\nbrew tap nitishm/homebrew-engarde\nbrew install engarde\n```\n\n## Scoop\n\n```console\nscoop bucket add engarde https://github.com/nitishm/scoop-bucket-engarde\nscoop install engarde\n```\n\n## Source\n\n```console\ngo get github.com/nitishm/engarde\n```\nThis should install the compiled binary to your `$GOBIN` (or `$GOPATH/bin`).\n\nOtherwise, clone the repository and build the binary manually using,\n\n*This package uses gomodules. Ensure that GO111MODULE=on is set if building outside `$GOPATH` in go version 1.11+*\n\n```console\ngit clone https://github.com/nitishm/engarde.git\ncd engarde/\ngo build -o engarde .\nmv engarde /usr/local/bin/\nexport PATH=$PATH:/usr/local/bin/\n``` \n\n# Example (default format only)\n**Prerequisites**\n\n[jq](https://github.com/stedolan/jq) must be in your `$PATH`. If you do not have `jq` installed please download the binary [here](https://stedolan.github.io/jq/)\n\n## Envoy\n```console\necho '[2016-04-15T20:17:00.310Z] \"POST /api/v1/locations HTTP/2\" 204 - 154 0 226 100 \"10.0.35.28\" \"nsq2http\" \"cc21d9b0-cf5c-432b-8c7e-98aeb7988cd2\" \"locations\" \"tcp://10.0.2.1:80\"' | engarde | jq\n```\n```json\n2019/09/03 22:31:33 Reading input from STDIN. Use the pipe \"|\" operator to redirect traffic to engarde\n{\n  \"authority\": \"locations\",\n  \"bytes_received\": \"154\",\n  \"bytes_sent\": \"0\",\n  \"duration\": \"226\",\n  \"method\": \"POST\",\n  \"protocol\": \"HTTP/2\",\n  \"request_id\": \"cc21d9b0-cf5c-432b-8c7e-98aeb7988cd2\",\n  \"response_flags\": \"-\",\n  \"status_code\": \"204\",\n  \"timestamp\": \"2016-04-15T20:17:00.310Z\",\n  \"upstream_service\": \"tcp://10.0.2.1:80\",\n  \"upstream_service_time\": \"100\",\n  \"uri_path\": \"/api/v1/locations\",\n  \"user_agent\": \"nsq2http\",\n  \"original_message\": \"[2016-04-15T20:17:00.310Z] \\\"POST /api/v1/locations HTTP/2\\\" 204 - 154 0 226 100 \\\"10.0.35.28\\\" \\\"nsq2http\\\" \\\"cc21d9b0-cf5c-432b-8c7e-98aeb7988cd2\\\" \\\"locations\\\" \\\"tcp://10.0.2.1:80\\\"\"\n}\n```\n\n## Istio Proxy\n```console\nkubectl logs -f foo-app-1 -c istio-proxy | engarde --use-istio | jq\n```\n```json\n{\n  \"authority\": \"hello-world\",\n  \"bytes_received\": \"148\",\n  \"bytes_sent\": \"171\",\n  \"duration\": \"4\",\n  \"method\": \"GET\",\n  \"protocol\": \"HTTP/1.1\",\n  \"request_id\": \"c0ce81db-4f5a-9134-8a5c-f8c076c91652\",\n  \"response_flags\": \"-\",\n  \"status_code\": \"200\",\n  \"timestamp\": \"2019-09-03T05:37:41.341Z\",\n  \"upstream_service\": \"192.168.89.50:9001\",\n  \"upstream_service_time\": \"3\",\n  \"upstream_cluster\": \"outbound|80||hello-world.default.svc.cluster.local\",\n  \"upstream_local\": \"-\",\n  \"downstream_local\": \"10.97.86.53:80\",\n  \"downstream_remote\": \"192.168.167.113:39953\",\n  \"uri_path\": \"/index\",\n  \"user_agent\": \"-\",\n  \"mixer_status\": \"-\",\n  \"original_message\": \"[2019-09-03T05:37:41.341Z] \\\"GET /index HTTP/1.1\\\" 200 - \\\"-\\\" 148 171 4 3 \\\"-\\\" \\\"-\\\" \\\"c0ce81db-4f5a-9134-8a5c-f8c076c91652\\\" \\\"hello-world\\\" \\\"192.168.89.50:9001\\\" outbound|80||hello-world.default.svc.cluster.local - 10.97.86.53:80 192.168.167.113:39953 -\"\n}\n```\n\n# Projects using Engarde\n\nA UI powered by Engarde and Envoy docs for viewing envoy access logs on the browser : [greghanson/engarde-viewer](https://github.com/greghanson/engarde-viewer)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitishm%2Fengarde","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnitishm%2Fengarde","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitishm%2Fengarde/lists"}