Giter VIP home page Giter VIP logo

k6-prometheus-exporter's Introduction

k6 Prometheus Exporter

This is a attempt to provide data from the k6 load testing tool to Prometheus in order to display and visualize it in Grafana

It is written in Go and acts as proxy for the k6 REST API, exposing the results over HTTP in the standard Prometheus exposition format, at the standard /metrics endpoint

Goals:

  • See if it was possible using the k6 REST API
  • Report on k6 load tests without needing to push huge volumes of data into a CSV or InfluxDB

Getting Started

Deploying to Kubernetes

See example-job.yaml for an example of how to deploy k6-prometheus-exporter as a sidecar alongside a k6 load test, running as a Kubernetes job.

You can also run it as a standalone pod external from k6, this requires that the k6 REST API (port 6565 by default) is exposed as a service. See deploy/standalone for an example of doing this

Local Development

  • If you wish to build or run locally, use make build or make run
  • If you wish to build the Docker image, use make image or make push. When calling make set IMAGE_REG, IMAGE_REPO and IMAGE_TAG as you wish

Running as container

docker run ghcr.io/benc-uk/k6-prometheus-exporter:latest

Screenshots

Example of some of the data shown in a Grafana dashboard

Configuration

Setting / Variable Purpose Default
METRICS_PORT Port the server will listen on. 2112
K6_API_ENDPOINT Override the endpoint used to connect to k6 http://localhost:6565/v1

Repository Structure

A brief description of the top-level directories of this project is as follows:

/api        - Details of the API specification & docs
/build      - Build configuration e.g. Dockerfiles
/charts     - Helm charts
/deploy     - Deployment and infrastructure as code, inc Kubernetes
/scripts    - Bash and other supporting scripts
/src        - Source code
/test       - Testing, mock data and API + load tests

Known Issues

List any known bugs or gotchas.

Change Log

See complete change log

License

This project uses the MIT software license. See full license file

Acknowledgements

Optional. Put acknowledgements and credits here, if any

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.