Prometheus
This adapter supports the metric template.
Configuration format for the prometheus
adapter.
Params.MetricInfo
Describes how a metric should be represented in Prometheus.
Field | Type | Description | Required |
---|---|---|---|
namespace | string | Optional. The namespace is used as a prefix on the metric names. An example: for a metric named | No |
name | string | Recommended. The name is used to register the prometheus metric. It must be unique across all prometheus metrics as prometheus does not allow duplicate names. If name is not specified a sanitized version of instance_name is used. | No |
instanceName | string | Required. The name is the fully qualified name of the Istio metric instance that this MetricInfo processes. | No |
description | string | Optional. A human readable description of this metric. | No |
kind | Kind | No | |
buckets |
| For metrics with a metric kind of DISTRIBUTION, this provides a mechanism for configuring the buckets that will be used to store the aggregated values. This field must be provided for metrics declared to be of type DISTRIBUTION. This field will be ignored for non-distribution metric kinds. | No |
labelNames | string[] | No |
Describes buckets for DISTRIBUTION kind metrics.
Params.MetricInfo.BucketsDefinition.Explicit
Specifies a set of buckets with arbitrary widths.
There are size(bounds) + 1
(= N
) buckets. Bucket i
has the following boundaries:
- Upper bound (
0 <= i < N-1
):bounds[i]
The bounds
field must contain at least one element. If bounds
has only one element, then there are no finite buckets, and that single element is the common boundary of the overflow and underflow buckets.
Field | Type | Description | Required |
---|---|---|---|
bounds | double[] | The values must be monotonically increasing. | No |
Specifies an exponential sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket.
There are num_finite_buckets + 2
(= N
) buckets. The two additional buckets are the underflow and overflow buckets.
Bucket i
has the following boundaries:
- Upper bound (0 <= i < N-1):
scale * (growth_factor ^ i)
- Lower bound (1 <= i < N):
scale * (growth_factor ^ (i - 1))
Params.MetricInfo.BucketsDefinition.Linear
Specifies a linear sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket.
There are num_finite_buckets + 2
(= N
) buckets. The two additional buckets are the underflow and overflow buckets.
Bucket i
has the following boundaries:
- Upper bound (
0 <= i < N-1
):offset + (width * i)
- Lower bound (
1 <= i < N
):offset + (width * (i - 1))
Field | Type | Description | Required |
---|---|---|---|
numFiniteBuckets | int32 | Must be greater than 0. | No |
width | double | Must be greater than 0. | No |
offset | double | Lower bound of the first bucket. | No |
Describes what kind of metric this is.
Params.MetricsExpirationPolicy
Describes the expiration policy for metrics generated by a prometheus handler.
Example: A Metrics Expiration Policy of { metrics_expiry_duration: "10m", expiry_check_interval_duration: "1m" }
would configure the handler to delete all metrics that have received no updtaes for 10 minutes. Metrics would be checked every minute to determine whether or not they should be expired.
Field | Type | Description | Required |
---|---|---|---|
metricsExpiryDuration |
| Required. Describes the desired lifetime of a metric. If the metric is not updated at any point during this duration, it will be removed from the set of metrics exported by the handler. | No |
expiryCheckIntervalDuration | Duration | Optional. Describes the interval in which metrics will be checked to see if they have been stale for longer that the configured | No |