{"id":15784371,"url":"https://github.com/theirish81/redprobe","last_synced_at":"2025-03-31T17:23:53.752Z","repository":{"id":39595001,"uuid":"448054878","full_name":"theirish81/redProbe","owner":"theirish81","description":"RedProbe is a probe to test HTTP(S) endpoints. It measures key metrics, evaluates status codes an supports simple assertions","archived":false,"fork":false,"pushed_at":"2022-08-16T11:19:28.000Z","size":26,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-11T20:07:46.867Z","etag":null,"topics":["http","metrics","probe"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theirish81.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":"2022-01-14T17:38:22.000Z","updated_at":"2022-08-04T12:51:57.000Z","dependencies_parsed_at":"2022-08-28T23:13:27.606Z","dependency_job_id":null,"html_url":"https://github.com/theirish81/redProbe","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theirish81%2FredProbe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theirish81%2FredProbe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theirish81%2FredProbe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theirish81%2FredProbe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theirish81","download_url":"https://codeload.github.com/theirish81/redProbe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246506160,"owners_count":20788601,"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":["http","metrics","probe"],"created_at":"2024-10-04T20:02:38.033Z","updated_at":"2025-03-31T17:23:53.714Z","avatar_url":"https://github.com/theirish81.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RedProbe\nRedProbe is a simple HTTP probe that will return status code and a detailed breakdown of the request/response\nperformance metrics. The program also includes a simple assertion mechanism to validate whether the outcome of the\noperation matches certain criteria.\n\n## Status\n[![CircleCI](https://circleci.com/gh/theirish81/redProbe/tree/master.svg?style=svg)](https://circleci.com/gh/theirish81/redProbe/tree/master)\n\nThe software is stable. Due to the more advanced nature of *NIX terminals, the output is remarkably better in Linux and\nOSX, but it does work acceptably well on Windows as well.\n\n## Download\nGo to the [GitHub Releases Page](https://github.com/theirish81/redProbe/releases) for RedProbe and download the latest\nrelease for your architecture.\n\n## Run\nYou can run RedProbe in to ways:\n\n### By providing all the parameters in the CLI\nHere are the parameters:\n```shell\n -a, --annotation=value  Annotation\n -A, --assertion=value   Assertion\n -c, --config=value      Path to a config file\n -f, --format=value      The output format, either\n                         'console', 'JSON' or 'HAR' [console]\n -H, --header=value      The headers\n -s, --skip-ssl          Skips SSL validation\n -t, --timeout=value     The request timeout [5s]\n -u, --url=value         The URL\n -X, --method=value      The method [GET]\n```\nThe bare minimum request is done by providing a URL with `-u` or `--url=` as in:\n```shell\n./redprobe -u https://www.example.com\n```\n\nHeaders are provided as couples of key/value pairs, separated by a colon, as in:\n```shell\n./redprobe -u https://www.example.com -H 'Accept:text/html' -H 'Key:ABC123'\n```\n\n### By providing a YAML configuration file\nYou can provide a configuration file a substitute of all the command line parameters, as in:\n```yaml\nurl: https://www.example.com\ntimeout: 5s\nheaders:\n  user-agent: redChecker/1\nassertions:\n  - Response.StatusCode == 200\n  - Response.Size \u003e 0\n  - Response.Metrics.DNS.Milliseconds() \u003c 200\n  - Response.Metrics.RT.Seconds() \u003c 2\n```\n\n### By providing a multi-document YAML configuration file\nYou can structure your YAML to contain multiple configuration files. If you do, RedProbe will execute all calls\nin a sequence. As in:\n```yaml\nurl: https://www.example.com\ntimeout: 5s\nheaders:\n  user-agent: redProbe/1\nassertions:\n  - Response.StatusCode == 200\n  - Response.Size \u003e 0\n  - Response.Metrics.DNS.Milliseconds() \u003c 200\n  - Response.Metrics.RT.Seconds() \u003c 2\n---\n\nurl: https://github.com/theirish81/redProbe\ntimeout: 5s\nheaders:\n  user-agent: redProbe/1\nassertions:\n  - Response.StatusCode == 200\n  - Response.Size \u003e 0\n  - Response.Metrics.DNS.Milliseconds() \u003c 200\n  - Response.Metrics.RT.Seconds() \u003c 2\n```\n\n## Assertions and annotations\n\n### Assertions\nOptionally, you can add assertions as shown in the examples. The purpose of assertions is to set expectations about the\nresponse and signal when those expectations are not met. If assertions fail, the program will return with a non-zero\nstatus code. You can add an `assertions` block in the configuration file or add multiple `-A` arguments in the CLI.\nAssertions will be considered a pass if they return either `true`, `ok`, or `1`.\n\n\n### Annotations\nOptionally, you can add annotations as shown in the examples. The purpose of annotations is to annotate the outcome with\nvalues extracted from the response, for debugging purposes.  You can add an `annotations` block in the configuration file\nor add multiple `-a` arguments in the CLI.\n\n### Syntax\nThe root object of all annotations and assertions is `Response` (mind the capital R).\n\nThe base sub-items are:\n* `StatusCode`: an integer representing the response status code\n* `Size`: an integer representing the response size\n* `IpAddress`: a string representing the target IP address\nThe structured sub-items are:\n* `Metrics`: an object containing the metrics\n    * `Conn`: the duration of the connection phase\n    * `DNS`: the duration of the DNS resolution\n    * `TLS`: the duration of the TLS handshake\n    * `TTFB`: time to first byte\n    * `Transfer`: the data transfer time\n    * `RT`: round-trip time\n  \n  Each metric can be converted into a numerical representation by appending `.Seconds()`, `.Milliseconds()`, `.Nanoseconds()`\n  as in: `Response.Metrics.DNS.Milliseconds()\n* `Header`: a collection of response headers. Each header can be accessed by invoking:\n  * `Get(headerName)`: will return the value of the header with the given name\n* `JsonMap()`: trusting that the response body is a JSON object, the method will parse it and return a map\n* `JsonArray()`: trusting that the response body is a JSON array, will method will parse it and return an array\n\n#### Assertions examples\n`Response.Metrics.DNS.Milliseconds() \u003c 200`: pass if the DNS resolution time is less than 200 milliseconds\n`Response.JsonMap().id == 1`: pass it the JSON object in the response has an ID field that is equal to 1\n\n#### Annotations examples\n`response.Header.Get(\"content-type\")`: print the response content type header","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheirish81%2Fredprobe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheirish81%2Fredprobe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheirish81%2Fredprobe/lists"}