{"id":17478128,"url":"https://github.com/jpetrucciani/argus","last_synced_at":"2025-10-04T10:17:18.070Z","repository":{"id":251823398,"uuid":"838128521","full_name":"jpetrucciani/argus","owner":"jpetrucciani","description":"a customizable http request logger with prometheus metrics","archived":false,"fork":false,"pushed_at":"2024-08-06T01:20:44.000Z","size":21,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-29T19:48:28.286Z","etag":null,"topics":["http","logger","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/jpetrucciani.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-05T02:15:46.000Z","updated_at":"2025-04-25T17:34:48.000Z","dependencies_parsed_at":"2024-12-07T21:06:31.102Z","dependency_job_id":"3e63f205-76af-423f-9fed-23c3392bc507","html_url":"https://github.com/jpetrucciani/argus","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"5fa85fd3dac38c44f834a1e910f75ab35c337015"},"previous_names":["jpetrucciani/argus"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jpetrucciani/argus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpetrucciani%2Fargus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpetrucciani%2Fargus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpetrucciani%2Fargus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpetrucciani%2Fargus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpetrucciani","download_url":"https://codeload.github.com/jpetrucciani/argus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpetrucciani%2Fargus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278297897,"owners_count":25963809,"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-10-04T02:00:05.491Z","response_time":63,"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":["http","logger","rust"],"created_at":"2024-10-18T20:11:23.914Z","updated_at":"2025-10-04T10:17:18.053Z","avatar_url":"https://github.com/jpetrucciani.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# argus\n\n[![uses nix](https://img.shields.io/badge/uses-nix-%237EBAE4)](https://nixos.org/)\n\n`argus` is a HTTP request logger built with Rust. It provides a flexible way to log incoming HTTP requests and customize response headers/body/codes. It also provides prometheus metrics by default on `/metrics`!\n\nIt is named for [Argus Panoptes](https://en.wikipedia.org/wiki/Argus_Panoptes), a many-eyed giant in Greek Mythology, sometimes referred to as `All-seeing`.\n\n## Features\n\n- Log incoming HTTP requests with customizable filters\n- Customize response headers, body, and status code\n- Collect and expose Prometheus-compatible metrics\n- Flexible configuration through command-line arguments or environment variables\n\n## Installation\n\nTo build and run `argus`, you need to have [nix](https://nixos.org/) + [direnv](https://github.com/direnv/direnv), or Rust and Cargo installed on your system.\n\n1. Clone this repository:\n\n```bash\ngit clone https://github.com/yourusername/argus.git\ncd argus\n```\n\n1. Build the project:\n\n```bash\ncargo build --release\n```\n\n## Usage\n\nRun Argus with default settings:\n\n```bash\n./target/release/argus\n```\n\nOr use command-line options to customize its behavior:\n\n```bash\n./target/release/argus --listen-addr 127.0.0.1 --port 3000 --response-body \"Custom response\"\n```\n\n## Options\n\nArgus can be configured using command-line arguments or environment variables. Here's a table of all available options:\n\n| Flag                   | Environment Variable       | Default   | Description                                                 |\n| ---------------------- | -------------------------- | --------- | ----------------------------------------------------------- |\n| `--listen-addr`        | `ARGUS_IP`                 | `0.0.0.0` | IP address to listen on                                     |\n| `--port`               | `ARGUS_PORT`               | `8080`    | Port to listen on                                           |\n| `--response-headers`   | `ARGUS_RESPONSE_HEADERS`   | (None)    | Custom response headers (format: \"Key1:Value1,Key2:Value2\") |\n| `--response-body`      | `ARGUS_RESPONSE_BODY`      | (None)    | Custom response body text                                   |\n| `--response-body-file` | `ARGUS_RESPONSE_BODY_FILE` | (None)    | Path to file containing custom response body                |\n| `--filter-routes`      | `ARGUS_FILTER_ROUTES`      | (None)    | Routes to filter (comma-separated)                          |\n| `--filter-methods`     | `ARGUS_FILTER_METHODS`     | (None)    | HTTP methods to filter (comma-separated)                    |\n| `--response-status`    | `ARGUS_RESPONSE_STATUS`    | `200`     | Custom response status code                                 |\n| `--disable-metrics`    | `ARGUS_DISABLE_METRICS`    |           | Disable Prometheus metrics collection                       |\n\n## Metrics\n\nWhen metrics are enabled (default), Argus exposes Prometheus-compatible metrics at the `/metrics` endpoint. The following metrics are available:\n\n- `total_requests`: Total number of requests received\n- `requests_by_method`: Number of requests by HTTP method\n- `responses_by_status`: Number of responses by HTTP status code\n\nTo view the metrics, send a GET request to the `/metrics` endpoint:\n\n```bash\ncurl http://localhost:8080/metrics\n```\n\n## Examples\n\nRun Argus on a specific IP and port:\n\n```bash\n./argus --listen-addr 127.0.0.1 --port 3000\n```\n\nSet custom response headers and body:\n\n```bash\n./argus --response-headers \"X-Custom-Header:Value1,Content-Type:application/json\" --response-body '{\"status\": \"ok\"}'\n```\n\nFilter specific routes and methods:\n\n```bash\n./argus --filter-routes \"/api,/public\" --filter-methods \"GET,POST\"\n```\n\nUse a custom response status code:\n\n```bash\n./argus --response-status 201\n```\n\nDisable metrics collection:\n\n```bash\n./argus --disable-metrics\n```\n\n### Cooler examples\n\nUse argus in a bash pipeline!\n\n```bash\n# pretty print incoming request logs\n./argus | jq\n```\n\n## Demo\n\n![argus_demo](https://cobi.dev/static/img/github/gif/argus-0.1.0.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpetrucciani%2Fargus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpetrucciani%2Fargus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpetrucciani%2Fargus/lists"}