GithubHelp home page GithubHelp logo

stone2333 / jmeter-prometheus-listener Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kolesnikovm/jmeter-prometheus-listener

0.0 0.0 0.0 12.3 MB

Apache JMeter Backend Listener implementation for Prometheus metrics exporting

License: Apache License 2.0

Java 100.00%

jmeter-prometheus-listener's Introduction

Prometheus Listener for JMeter

Apache JMeter Backend Listener implementation for Prometheus metrics exporting.

Installation

Download the latest release or build your own from the source code. Then put jmeter-prometheus-listener-x.x.x.jar to JMETER_HOME/lib/ext directory.

Usage

  1. Add Listener->Backend Listener to your Test Plan.
  2. Select com.github.kolesnikovm.PrometheusListener in Backend Listener implementation combobox.
  3. Edit parameters to your taste.

Parameters

These parameters are set in Backend Listener element. All parameters are required.

Param Type Description
testName String Common label for all metrics in your test
runId String Common label for all metrics in your test
exporterPort int Port for exposing metrics, path /metrics
samplersRegExp String Regular expression for filtering sample results

Properties

Property Default Comment
prometheus.collect_jvm false Boolean parameter for enabling JVM metrics collection
prometheus.quantiles_age 10 Max age in seconds for Summary collectors' quantiles
prometheus.log_errors false Boolean parameter for enabling extended error logging

Metrics

Every metric has default label set testName, runId, nodeName and also may have some additional labels. Check the table below for details on metrics and their specific labels.

Metric Type Labels Comment
jmeter_active_threads Gauge
jmeter_running_threads Gauge threadGroup
jmeter_requests Counter requestName, requestStatus, responseCode, responseMessage, isTransaction
jmeter_response_time Summary requestName, requestStatus, responseCode, responseMessage, isTransaction Unit: milliseconds
Quantiles: 0.9, 0.95, 0.99
jmeter_latency Summary requestName, requestStatus, responseCode, responseMessage, isTransaction Unit: milliseconds
Quantiles: 0.9, 0.95, 0.99
jmeter_request_size Summary requestName, requestDirection, isTransaction Unit: bytes

Custom metrics

Also, you can create your own custom collectors. See the documentation on Prometheus JVM Client.

Creation

Custom collector creation

Usage

Custom collector usage

Dependency

Plugin is hosted on Maven Central. You can find dependency here. Example use with jmeter-maven-plugin:

<jmeterExtensions>
    <artifact>io.github.kolesnikovm:jmeter-prometheus-listener:x.x.x</artifact>
</jmeterExtensions>

Building

To build, simply run:

gradle clean fatJar

jmeter-prometheus-listener's People

Contributors

kolesnikovm avatar

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.