Skip to content

General Documentation

Jeff Ohrstrom edited this page Feb 6, 2019 · 1 revision

Prometheus Listener Documentation.

Examples

You can find examples in this directory of this repo.

General

You may have any number of PrometheusListeners created in any scope. There is however limitations in the actual metric creation themselves. Specifically, that they cannot overlap. Metrics simply cannot be defined twice and the name is the key used as determining uniqueness.

Parse errors

This library takes a best effort approach to parsing what you've defined in the QuantilesOrBuckets field. Which is to say it will discard any bucket or quantile that it does not parse correctly but saves what it does parse correctly.

For example if you defined some buckets as 100,300,400a the histogram metric you created, at runtime, will only have buckets for 100 and 300. 400a will not parse correctly because of the character 'a' at the end.

Initial metric settings

Obviously users shouldn't use metric names like jmeter_autogenerated_metric_

Bucket Format

Buckets are comma seperated list of decimals. Examples are below. Note some are integers, and that's OK, it can be a mixture of integers and real numbers (both positive and negative).

100,200,300,400.3

1,10,100,1000

1.57,3.14,7.28

Quantile Format

Quantiles are comma (,) separated pair of decimals separated by a vertical bar (|). The first decimal being the quantile and the second being the error rating.

0.999,0.1|0.99,0.2|0.75,0.3 will produce metrics like foo{quantile="0.999"} that was measured with an error rating of 0.1.

Properties that can be overridden

Property default description
prometheus.port 9270 The port the http server will bind to
prometheus.thread.min 5 The minimum number of worker threads for the http server likely to be deprecated
prometheus.thread.max 5 he minimum number of worker threads for the http server likely to be deprecated
prometheus.save.threads true True or false value to save and collect jmeter thread metrics
prometheus.save.threads.name jmeter_threads The name of the metric describing jmeter threads