{"id":15823505,"url":"https://github.com/bbortt/k6-dashboard","last_synced_at":"2025-04-01T07:57:41.715Z","repository":{"id":221819713,"uuid":"755182119","full_name":"bbortt/k6-dashboard","owner":"bbortt","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-01T20:01:44.000Z","size":385,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-02T20:28:14.331Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/bbortt.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}},"created_at":"2024-02-09T15:43:37.000Z","updated_at":"2024-03-11T08:12:10.000Z","dependencies_parsed_at":"2024-02-10T11:23:20.740Z","dependency_job_id":"4688b304-2f0a-4bd1-9dde-78c9df4fd9d4","html_url":"https://github.com/bbortt/k6-dashboard","commit_stats":null,"previous_names":["bbortt/k6-dashboard"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbortt%2Fk6-dashboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbortt%2Fk6-dashboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbortt%2Fk6-dashboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbortt%2Fk6-dashboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbortt","download_url":"https://codeload.github.com/bbortt/k6-dashboard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246604618,"owners_count":20804100,"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":[],"created_at":"2024-10-05T08:20:24.233Z","updated_at":"2025-04-01T07:57:41.697Z","avatar_url":"https://github.com/bbortt.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eK6 Dashboard\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\".github/resources/banner.png\" alt=\"K6 Banner\" style=\"max-height: 25vh; border: 1px solid #ddd; border-radius: 1vh; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);\"\u003e\n\u003c/p\u003e\n\n## Table of Contents\n\n- [Author's Note](#authors-note)\n- [Getting Started](#getting-started)\n- [Development Requirements](#development-requirements)\n\n## Author's Note\n\nYou might wonder, \"Why should I use this?\" It's a valid question, and here's my take on it.\n\nThis project is designed to help organizations navigate challenges such as network complexities, duty segregation, and\naccess restrictions - the kind of issues larger companies often face. It's about not having to worry about every\ndeveloper having direct access to sensitive metrics or the hesitance of observability teams to share access credentials.\n\nThe solution? The `k6-report-ingress` service. It's a straightforward HTTP service that takes a `k6` JSON report and\nstores it in a TimeScale database. This setup keeps your database secure and still lets anyone submit their k6 reports\nfor persistence. Easy and secure.\n\nThen there's the issue of data visualization and comparison, which can be tricky with time-series data and tools that\ndon't alter the data. And not everyone wants to invest in costly cloud services for this purpose. That's where\nthe `dash-board` comes in, simplifying the process of visualizing your data.\n\nEnjoy exploring the project!\n\n## Getting Started\n\nTo kick things off, run `docker compose -f dev/docker-compose.yaml up -d` from the project's root directory.\n\nThis command sets up a [TimescaleDB](https://www.timescale.com/), executes the included `k6` test, and stores the\nresults in the database.\n\nNote: Passwords in the development setup are hardcoded. Remember to change them for production use.\n\n### Using Podman\n\nAlternatively, you can use `podman` to set up the environment step by step:\n\n```shell\nmkdir -p dev/timescaledb/data\n\npodman network create k6_dashboard\n\npodman run -d --name timescaledb \\\n  -e POSTGRES_PASSWORD=KrPPCHdYSXz6wMct5tUK \\\n  -e POSTGRES_USER=k6_dashboard \\\n  -e POSTGRES_DB=k6_dashboard \\\n  -v \"$(pwd)/dev/timescaledb/data:/var/lib/postgresql/data\" \\\n  --network k6_dashboard \\\n  -p 5432:5432 \\\n  timescale/timescaledb:latest-pg16\n\npodman run -d --name k6 \\\n  --add-host=timescaledb:$(hostname -I | awk '{print $1}') \\\n  -e TIMESCALEDB_JDBC_URL=postgresql://k6_dashboard:KrPPCHdYSXz6wMct5tUK@timescaledb:5432/k6_dashboard \\\n  -v \"$(pwd)/src/test/k6:/scripts\" \\\n  -v \"$(pwd)/dev/k6/entrypoint.sh:/usr/local/bin/entrypoint.sh\" \\\n  --entrypoint /usr/local/bin/entrypoint.sh \\\n  --network k6_dashboard \\\n  golang:alpine3.19\n\npodman run -d --name grafana \\\n  -e GF_AUTH_ANONYMOUS_ORG_ROLE=Admin \\\n  -e GF_AUTH_ANONYMOUS_ENABLED=true \\\n  -e GF_AUTH_BASIC_ENABLED=false \\\n  -v \"$(pwd)/dev/grafana:/etc/grafana/provisioning/\" \\\n  --network k6_dashboard \\\n  -p 3000:3000 \\\n  grafana/grafana:10.3.1\n```\n\n### REST Endpoint Usage\n\nFollowing the commands above, a JSON report will be generated. You can extract it from the `k6` container and upload it\nto the `k6-report-ingress` service.\n\nUsing [the CLI](./cli), this is as simple as executing the command below (use `podman` on Linux).\n\n```shell\ndocker cp k6:report.json \"$(pwd)/src/test/k6/report.json\"\n./cli upload -u http://localhost:8080 \"$(pwd)/src/test/k6/report.json\"\n```\n\nOr, you can still use curl.\n\n```shell\ncurl -X POST -F \"reportFile=@$(pwd)/src/test/k6/report.json\" http://localhost:8080/api/rest/v1/k6/reports\n```\n\n## Development Requirements\n\nIf you're just looking to see the project in action, head over to [Getting Started](#getting-started). If you're\ninterested in contributing, you'll need:.\n\n- [OpenJDK 21](https://adoptium.net/temurin/releases/) for some of the [`apps`](./apps)\n- Python and [poetry](https://python-poetry.org/) other [`apps`](./apps)\n- [Rust](https://www.rust-lang.org/tools/install) for the [`cli`](./cli) directory\n\n### Database Setup\n\nStart by setting up the PostgreSQL database from [`dev/docker-compose.yml`](./dev/docker-compose.yaml). Once it's\nrunning, apply all database migrations with `./gradlew :apps:k6-report-ingress:flywayMigrate`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbortt%2Fk6-dashboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbortt%2Fk6-dashboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbortt%2Fk6-dashboard/lists"}