config

package
v0.0.0-...-48a44ca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package config is a generated protocol buffer package.

The `prometheus` adapter collects Istio metrics and makes them available to [Prometheus](https://prometheus.io).

This adapter supports the [metric template](https://istio.io/docs/reference/config/policy-and-telemetry/templates/metric/).

It is generated from these files:

mixer/adapter/prometheus/config/config.proto

It has these top-level messages:

Params

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthConfig = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowConfig   = fmt.Errorf("proto: integer overflow")
)
View Source
var Params_MetricInfo_Kind_name = map[int32]string{
	0: "UNSPECIFIED",
	1: "GAUGE",
	2: "COUNTER",
	3: "DISTRIBUTION",
}
View Source
var Params_MetricInfo_Kind_value = map[string]int32{
	"UNSPECIFIED":  0,
	"GAUGE":        1,
	"COUNTER":      2,
	"DISTRIBUTION": 3,
}

Functions

This section is empty.

Types

type Params

type Params struct {
	// The set of metrics to represent in Prometheus. If a metric is defined in Istio but doesn't have a corresponding
	// shape here, it will not be populated at runtime.
	Metrics []*Params_MetricInfo `protobuf:"bytes,1,rep,name=metrics" json:"metrics,omitempty"`
	// Optional. The rate at which to expire metrics from the adapter. This option controls the amount of metric data
	// that the adapter will maintain over its lifetime.
	//
	// EXPERIMENTAL: This feature should only be used in advanced cases.
	//
	// Example config stanza:
	// “`yaml
	// metricsExpirationPolicy:
	//   metricsExpiryDuration: "5s"
	//   expiryCheckIntervalDuration: "1s"
	// “`
	MetricsExpirationPolicy *Params_MetricsExpirationPolicy `protobuf:"bytes,2,opt,name=metrics_expiration_policy,json=metricsExpirationPolicy" json:"metrics_expiration_policy,omitempty"`
}

Configuration format for the `prometheus` adapter.

func (*Params) Descriptor

func (*Params) Descriptor() ([]byte, []int)

func (*Params) Marshal

func (m *Params) Marshal() (dAtA []byte, err error)

func (*Params) MarshalTo

func (m *Params) MarshalTo(dAtA []byte) (int, error)

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

func (m *Params) Size() (n int)

func (*Params) String

func (this *Params) String() string

func (*Params) Unmarshal

func (m *Params) Unmarshal(dAtA []byte) error

type Params_MetricInfo

type Params_MetricInfo struct {
	// Optional. The namespace is used as a prefix on the metric names.
	// An example: for a metric named `requests_total` with a namespace of `istio`,
	// the full metric name becomes `istio_requests_total`.
	// NOTE: The specified namespace should be a prometheus-safe name. If not, the adapter
	// will attempt to convert the namespace to a prometheus-safe name.
	// NOTE: Changing the value for this will potentially impact downstream integrations
	// and should be used with caution.
	// Default value: `istio`.
	Namespace string `protobuf:"bytes,7,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// 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.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Required. The name is the fully qualified name of the Istio metric instance
	// that this MetricInfo processes.
	InstanceName string `protobuf:"bytes,2,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"`
	// Optional. A human readable description of this metric.
	Description string                 `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	Kind        Params_MetricInfo_Kind `protobuf:"varint,4,opt,name=kind,proto3,enum=adapter.prometheus.config.Params_MetricInfo_Kind" json:"kind,omitempty"`
	// 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.
	Buckets *Params_MetricInfo_BucketsDefinition `protobuf:"bytes,5,opt,name=buckets" json:"buckets,omitempty"`
	// The names of labels to use: these need to match the dimensions of the Istio metric.
	// TODO: see if we can remove this and rely on only the dimensions in the future.
	LabelNames []string `protobuf:"bytes,6,rep,name=label_names,json=labelNames" json:"label_names,omitempty"`
}

Describes how a metric should be represented in Prometheus.

func (*Params_MetricInfo) Descriptor

func (*Params_MetricInfo) Descriptor() ([]byte, []int)

func (*Params_MetricInfo) Marshal

func (m *Params_MetricInfo) Marshal() (dAtA []byte, err error)

func (*Params_MetricInfo) MarshalTo

func (m *Params_MetricInfo) MarshalTo(dAtA []byte) (int, error)

func (*Params_MetricInfo) ProtoMessage

func (*Params_MetricInfo) ProtoMessage()

func (*Params_MetricInfo) Reset

func (m *Params_MetricInfo) Reset()

func (*Params_MetricInfo) Size

func (m *Params_MetricInfo) Size() (n int)

func (*Params_MetricInfo) String

func (this *Params_MetricInfo) String() string

func (*Params_MetricInfo) Unmarshal

func (m *Params_MetricInfo) Unmarshal(dAtA []byte) error

type Params_MetricInfo_BucketsDefinition

type Params_MetricInfo_BucketsDefinition struct {
	// Exactly one of these three fields must be set.
	//
	// Types that are valid to be assigned to Definition:
	//	*Params_MetricInfo_BucketsDefinition_LinearBuckets
	//	*Params_MetricInfo_BucketsDefinition_ExponentialBuckets
	//	*Params_MetricInfo_BucketsDefinition_ExplicitBuckets
	Definition isParams_MetricInfo_BucketsDefinition_Definition `protobuf_oneof:"definition"`
}

Describes buckets for DISTRIBUTION kind metrics.

func (*Params_MetricInfo_BucketsDefinition) Descriptor

func (*Params_MetricInfo_BucketsDefinition) Descriptor() ([]byte, []int)

func (*Params_MetricInfo_BucketsDefinition) GetDefinition

func (m *Params_MetricInfo_BucketsDefinition) GetDefinition() isParams_MetricInfo_BucketsDefinition_Definition

func (*Params_MetricInfo_BucketsDefinition) GetExplicitBuckets

func (*Params_MetricInfo_BucketsDefinition) GetExponentialBuckets

func (*Params_MetricInfo_BucketsDefinition) GetLinearBuckets

func (*Params_MetricInfo_BucketsDefinition) Marshal

func (m *Params_MetricInfo_BucketsDefinition) Marshal() (dAtA []byte, err error)

func (*Params_MetricInfo_BucketsDefinition) MarshalTo

func (m *Params_MetricInfo_BucketsDefinition) MarshalTo(dAtA []byte) (int, error)

func (*Params_MetricInfo_BucketsDefinition) ProtoMessage

func (*Params_MetricInfo_BucketsDefinition) ProtoMessage()

func (*Params_MetricInfo_BucketsDefinition) Reset

func (*Params_MetricInfo_BucketsDefinition) Size

func (*Params_MetricInfo_BucketsDefinition) String

func (*Params_MetricInfo_BucketsDefinition) Unmarshal

func (m *Params_MetricInfo_BucketsDefinition) Unmarshal(dAtA []byte) error

func (*Params_MetricInfo_BucketsDefinition) XXX_OneofFuncs

func (*Params_MetricInfo_BucketsDefinition) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type Params_MetricInfo_BucketsDefinition_Explicit

type Params_MetricInfo_BucketsDefinition_Explicit struct {
	// The values must be monotonically increasing.
	Bounds []float64 `protobuf:"fixed64,1,rep,packed,name=bounds" json:"bounds,omitempty"`
}

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]` * Lower bound (`1 <= i < N`): `bounds[i - 1]`

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.

func (*Params_MetricInfo_BucketsDefinition_Explicit) Descriptor

func (*Params_MetricInfo_BucketsDefinition_Explicit) Marshal

func (m *Params_MetricInfo_BucketsDefinition_Explicit) Marshal() (dAtA []byte, err error)

func (*Params_MetricInfo_BucketsDefinition_Explicit) MarshalTo

func (*Params_MetricInfo_BucketsDefinition_Explicit) ProtoMessage

func (*Params_MetricInfo_BucketsDefinition_Explicit) Reset

func (*Params_MetricInfo_BucketsDefinition_Explicit) Size

func (*Params_MetricInfo_BucketsDefinition_Explicit) String

func (*Params_MetricInfo_BucketsDefinition_Explicit) Unmarshal

type Params_MetricInfo_BucketsDefinition_ExplicitBuckets

type Params_MetricInfo_BucketsDefinition_ExplicitBuckets struct {
	ExplicitBuckets *Params_MetricInfo_BucketsDefinition_Explicit `protobuf:"bytes,3,opt,name=explicit_buckets,json=explicitBuckets,oneof"`
}

func (*Params_MetricInfo_BucketsDefinition_ExplicitBuckets) MarshalTo

func (*Params_MetricInfo_BucketsDefinition_ExplicitBuckets) Size

func (*Params_MetricInfo_BucketsDefinition_ExplicitBuckets) String

type Params_MetricInfo_BucketsDefinition_Exponential

type Params_MetricInfo_BucketsDefinition_Exponential struct {
	// Must be greater than 0.
	NumFiniteBuckets int32 `protobuf:"varint,1,opt,name=num_finite_buckets,json=numFiniteBuckets,proto3" json:"num_finite_buckets,omitempty"`
	// Must be greater than 1.
	GrowthFactor float64 `protobuf:"fixed64,2,opt,name=growth_factor,json=growthFactor,proto3" json:"growth_factor,omitempty"`
	// Must be greater than 0.
	Scale float64 `protobuf:"fixed64,3,opt,name=scale,proto3" json:"scale,omitempty"`
}

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))`

func (*Params_MetricInfo_BucketsDefinition_Exponential) Descriptor

func (*Params_MetricInfo_BucketsDefinition_Exponential) Marshal

func (m *Params_MetricInfo_BucketsDefinition_Exponential) Marshal() (dAtA []byte, err error)

func (*Params_MetricInfo_BucketsDefinition_Exponential) MarshalTo

func (*Params_MetricInfo_BucketsDefinition_Exponential) ProtoMessage

func (*Params_MetricInfo_BucketsDefinition_Exponential) Reset

func (*Params_MetricInfo_BucketsDefinition_Exponential) Size

func (*Params_MetricInfo_BucketsDefinition_Exponential) String

func (*Params_MetricInfo_BucketsDefinition_Exponential) Unmarshal

type Params_MetricInfo_BucketsDefinition_ExponentialBuckets

type Params_MetricInfo_BucketsDefinition_ExponentialBuckets struct {
	ExponentialBuckets *Params_MetricInfo_BucketsDefinition_Exponential `protobuf:"bytes,2,opt,name=exponential_buckets,json=exponentialBuckets,oneof"`
}

func (*Params_MetricInfo_BucketsDefinition_ExponentialBuckets) MarshalTo

func (*Params_MetricInfo_BucketsDefinition_ExponentialBuckets) Size

func (*Params_MetricInfo_BucketsDefinition_ExponentialBuckets) String

type Params_MetricInfo_BucketsDefinition_Linear

type Params_MetricInfo_BucketsDefinition_Linear struct {
	// Must be greater than 0.
	NumFiniteBuckets int32 `protobuf:"varint,1,opt,name=num_finite_buckets,json=numFiniteBuckets,proto3" json:"num_finite_buckets,omitempty"`
	// Must be greater than 0.
	Width float64 `protobuf:"fixed64,2,opt,name=width,proto3" json:"width,omitempty"`
	// Lower bound of the first bucket.
	Offset float64 `protobuf:"fixed64,3,opt,name=offset,proto3" json:"offset,omitempty"`
}

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))`

func (*Params_MetricInfo_BucketsDefinition_Linear) Descriptor

func (*Params_MetricInfo_BucketsDefinition_Linear) Marshal

func (m *Params_MetricInfo_BucketsDefinition_Linear) Marshal() (dAtA []byte, err error)

func (*Params_MetricInfo_BucketsDefinition_Linear) MarshalTo

func (m *Params_MetricInfo_BucketsDefinition_Linear) MarshalTo(dAtA []byte) (int, error)

func (*Params_MetricInfo_BucketsDefinition_Linear) ProtoMessage

func (*Params_MetricInfo_BucketsDefinition_Linear) Reset

func (*Params_MetricInfo_BucketsDefinition_Linear) Size

func (*Params_MetricInfo_BucketsDefinition_Linear) String

func (*Params_MetricInfo_BucketsDefinition_Linear) Unmarshal

type Params_MetricInfo_BucketsDefinition_LinearBuckets

type Params_MetricInfo_BucketsDefinition_LinearBuckets struct {
	LinearBuckets *Params_MetricInfo_BucketsDefinition_Linear `protobuf:"bytes,1,opt,name=linear_buckets,json=linearBuckets,oneof"`
}

func (*Params_MetricInfo_BucketsDefinition_LinearBuckets) MarshalTo

func (*Params_MetricInfo_BucketsDefinition_LinearBuckets) Size

func (*Params_MetricInfo_BucketsDefinition_LinearBuckets) String

type Params_MetricInfo_Kind

type Params_MetricInfo_Kind int32

Describes what kind of metric this is.

const (
	UNSPECIFIED  Params_MetricInfo_Kind = 0
	GAUGE        Params_MetricInfo_Kind = 1
	COUNTER      Params_MetricInfo_Kind = 2
	DISTRIBUTION Params_MetricInfo_Kind = 3
)

func (Params_MetricInfo_Kind) EnumDescriptor

func (Params_MetricInfo_Kind) EnumDescriptor() ([]byte, []int)

func (Params_MetricInfo_Kind) String

func (x Params_MetricInfo_Kind) String() string

type Params_MetricsExpirationPolicy

type Params_MetricsExpirationPolicy struct {
	// 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.
	MetricsExpiryDuration time.Duration `protobuf:"bytes,1,opt,name=metrics_expiry_duration,json=metricsExpiryDuration,stdduration" json:"metrics_expiry_duration"`
	// Optional. Describes the interval in which metrics will be checked to see if they have been stale for longer that the configured
	// `metrics_expiry_duration`. This should be generally be set to a duration much shorter than the configured `metrics_expiry_duration`.
	// This bounds the total amount of additional time (beyond the desired lifetime) that a metric may be exported.
	// If a value is not explicitly provided, this value will default to half of the configured `metrics_expiry_duration`.
	ExpiryCheckIntervalDuration time.Duration `` /* 141-byte string literal not displayed */
}

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.

func (*Params_MetricsExpirationPolicy) Descriptor

func (*Params_MetricsExpirationPolicy) Descriptor() ([]byte, []int)

func (*Params_MetricsExpirationPolicy) Marshal

func (m *Params_MetricsExpirationPolicy) Marshal() (dAtA []byte, err error)

func (*Params_MetricsExpirationPolicy) MarshalTo

func (m *Params_MetricsExpirationPolicy) MarshalTo(dAtA []byte) (int, error)

func (*Params_MetricsExpirationPolicy) ProtoMessage

func (*Params_MetricsExpirationPolicy) ProtoMessage()

func (*Params_MetricsExpirationPolicy) Reset

func (m *Params_MetricsExpirationPolicy) Reset()

func (*Params_MetricsExpirationPolicy) Size

func (m *Params_MetricsExpirationPolicy) Size() (n int)

func (*Params_MetricsExpirationPolicy) String

func (this *Params_MetricsExpirationPolicy) String() string

func (*Params_MetricsExpirationPolicy) Unmarshal

func (m *Params_MetricsExpirationPolicy) Unmarshal(dAtA []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL