{"id":29961448,"url":"https://github.com/beemi/demok6loadtesting","last_synced_at":"2025-08-03T23:11:06.682Z","repository":{"id":206510202,"uuid":"716516241","full_name":"beemi/DemoK6LoadTesting","owner":"beemi","description":"K6 kiad testing with Grafana","archived":false,"fork":false,"pushed_at":"2023-12-15T05:34:42.000Z","size":1510,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-12-15T06:43:29.262Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/beemi.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}},"created_at":"2023-11-09T09:55:03.000Z","updated_at":"2023-11-10T13:22:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"34def506-2224-49dd-96dd-a36477805848","html_url":"https://github.com/beemi/DemoK6LoadTesting","commit_stats":null,"previous_names":["beemi/demok6loadtesting"],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/beemi/DemoK6LoadTesting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beemi%2FDemoK6LoadTesting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beemi%2FDemoK6LoadTesting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beemi%2FDemoK6LoadTesting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beemi%2FDemoK6LoadTesting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beemi","download_url":"https://codeload.github.com/beemi/DemoK6LoadTesting/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beemi%2FDemoK6LoadTesting/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268625009,"owners_count":24280188,"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-08-03T02:00:12.545Z","response_time":2577,"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":[],"created_at":"2025-08-03T23:10:44.819Z","updated_at":"2025-08-03T23:11:06.659Z","avatar_url":"https://github.com/beemi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🎉 DemoK6LoadTesting 🎉\n\nThis repository contains performance tests to be executed by [TestKube](https://testkube.io/).  Publishing test results to [Prometheus](https://prometheus.io/) and visualizing them in [Grafana](https://grafana.com/) is supported.\n\n## 📝 Installation\n\nMacOS\n\n```bash\nbrew install k6\n```\ncheck version\n```bash\nk6 version\n```\nCheck the [releases](https://github.com/grafana/k6/releases) page for different versions of k6.\n\nRun K6 scripts to publish metrics to Prometheus\n\n```bash\nK6_PROMETHEUS_RW_SERVER_URL=http://localhost:9090/api/v1/write \\\nK6_PROMETHEUS_RW_TREND_AS_NATIVE_HISTOGRAM=true \\\nK6_PROMETHEUS_RW_INSECURE_SKIP_TLS_VERIFY=true \\\nK6_PROMETHEUS_RW_STALE_MARKERS=true \\\nk6 run \\\n-o experimental-prometheus-rw \\\n--log-output=loki=http://localhost:3100/loki/api/v1/push,label.loadtest=k6,limit=1000,pushPeriod=1m,msgMaxSize=1231,level=trace \\\ntests/script.js\n```\n\n```bash\n# Prometheus URL to write metrics from K6 to Prometheus\nK6_PROMETHEUS_RW_SERVER_URL\n```\nmore details [here](https://k6.io/docs/results-output/real-time/prometheus-remote-write/) how to write metrics from K6 to Prometheus\n\nmore details [here](https://k6.io/docs/using-k6/k6-options/reference/#loki) how to write logs from K6 to Loki\n\nRun K6 browser based scripts to publish metrics to Prometheus\n\n```bash\nK6_PROMETHEUS_RW_SERVER_URL=http://localhost:9090/api/v1/write \\\nK6_PROMETHEUS_RW_TREND_AS_NATIVE_HISTOGRAM=true \\\nK6_PROMETHEUS_RW_INSECURE_SKIP_TLS_VERIFY=true \\\nK6_PROMETHEUS_RW_STALE_MARKERS=true \\\nK6_BROWSER_HEADLESS=false\nk6 run \\\n-o experimental-prometheus-rw \\\ntests/browser-test.js\n```\nK6 browser tests documentation\n\nhttps://github.com/grafana/xk6-browser\n\n## 🔨 Running Loki, Prometheus and Grafana Locally\n\n\n### Prerequisites\n\nBefore you begin, ensure you have the following installed:\n- Docker\n- Docker Compose\n\nYou can download Docker [here](https://docs.docker.com/get-docker/) and it includes Docker Compose in most installation packages.\n\n### Starting the Services\n\n   ```shell\n   docker-compose up -d\n   ```\n\nThis will pull the required Docker images, create volumes, and start the Prometheus and Grafana containers.\n\n### Accessing Prometheus\n\nOnce the services are up and running, you can access the Prometheus web UI by opening your browser and going to:\n\n```\nhttp://localhost:9090/metrics\n```\n![image](docs/img_4.png)\n\nHere you can execute queries to explore your metrics and see the health of your monitoring system.\n\n### Accessing Grafana\n\n* Visualize your results to analyze performance during the test run or over multiple test runs.\n* Correlate test results with application and system metrics in the same dashboard to get a holistic overview of your system's performance and quickly find the root causes of performance issues.\n\nGrafana will be available by navigating to the following URL in your browser:\n\n```\nhttp://localhost:3000\n```\n\nBy default, the login credentials are set to `admin` for the username and `admin` for the password. It's strongly recommended to change these credentials upon first login.\n![image](docs/img_5.png)\n![image](docs/img_6.png)\n\nBy default, k6 dashboard is available in Grafana. You can access it by navigating to the Grafana dashboard\n\nAvailable dashboard resources:\n* [k6-prometheus-native-histograms](https://grafana.com/grafana/dashboards/18030-k6-prometheus-native-histograms/)\n* [k6-prometheus](https://grafana.com/grafana/dashboards/2587)\n\n### Accessing Loki logs\n\nLoki will be available by navigating to the Grafana under explorer section.\n\n![image](docs/img_8.png)\n\n### Stopping the Services\n\nTo stop the services, run the following command:\n\n```shell\ndocker-compose down\n```\n\n```bash\ndocker kill $(docker ps -q)\n```\n\nIf you want to remove the volumes along with the containers, use:\n\n```shell\ndocker-compose down -v\n```\n\n**Note:** This will delete your data in Prometheus and Grafana.\n\n## 🧑‍💻 Contact\n\n### 👷 Owner\n##### 📧 Email: [beemi.raja@gmail.com]()\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeemi%2Fdemok6loadtesting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeemi%2Fdemok6loadtesting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeemi%2Fdemok6loadtesting/lists"}