config

package
v0.0.0-...-062eff5 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package config is a generated protocol buffer package.

The `solarwinds` adapter enables Istio to deliver log and metric data to the [Papertrail](https://www.papertrailapp.com) logging backend and the [AppOptics](https://www.appoptics.com) monitoring backend.

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

It is generated from these files:

mixer/adapter/solarwinds/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")
)

Functions

This section is empty.

Types

type Params

type Params struct {
	// AppOptics Access Token needed to send metrics to AppOptics. If no access token is given then metrics
	// will NOT be shipped to AppOptics
	AppopticsAccessToken string `protobuf:"bytes,1,opt,name=appoptics_access_token,json=appopticsAccessToken,proto3" json:"appoptics_access_token,omitempty"`
	// Optional. Max batch size of metrics to be sent to AppOptics.
	// AppOptics does not allow batch size greater than 1000.
	// If this is unspecified or given a value 0 explicitely, a default batch size of 1000 will be used.
	AppopticsBatchSize int32 `protobuf:"varint,2,opt,name=appoptics_batch_size,json=appopticsBatchSize,proto3" json:"appoptics_batch_size,omitempty"`
	// Papertrail url to ship logs to. If no papertrail url is given then the logs will NOT be shipped but rather
	// dropped.
	PapertrailUrl string `protobuf:"bytes,3,opt,name=papertrail_url,json=papertrailUrl,proto3" json:"papertrail_url,omitempty"`
	// This is the duration for which logs will be persisted locally until it is shipped to papertrail in the event
	// of a network failure. Default value is 1 hour.
	PapertrailLocalRetentionDuration *time.Duration `` /* 166-byte string literal not displayed */
	// A map of Istio metric name to solarwinds metric info.
	Metrics map[string]*Params_MetricInfo `` /* 141-byte string literal not displayed */
	// A map of Istio logentry name to solarwinds log info.
	Logs map[string]*Params_LogInfo `` /* 135-byte string literal not displayed */
}

Configuration format for the `solarwinds` adapter.

Example config usage: ```yaml apiVersion: "config.istio.io/v1alpha2" kind: solarwinds metadata:

name: handler
namespace: istio-system

spec:

appoptics_access_token: <APPOPTICS SAMPLE TOKEN>
papertrail_url: <PAPERTRAIL URL>
papertrail_local_retention_duration: <RETENTION PERIOD FOR LOGS LOCALLY, Optional>
metrics:
  requestcount.metric.istio-system:
    label_names:
    - source_service
    - source_version
    - destination_service
    - destination_version
    - response_code
  requestduration.metric.istio-system:
    label_names:
    - source_service
    - source_version
    - destination_service
    - destination_version
    - response_code
  requestsize.metric.istio-system:
    label_names:
    - source_service
    - source_version
    - destination_service
    - destination_version
    - response_code
  responsesize.metric.istio-system:
    label_names:
    - source_service
    - source_version
    - destination_service
    - destination_version
    - response_code
  tcpbytesent.metric.istio-system:
    label_names:
    - source_service
    - source_version
    - destination_service
    - destination_version
  tcpbytereceived.metric.istio-system:
    label_names:
    - source_service
    - source_version
    - destination_service
    - destination_version
logs:
  solarwindslogentry.logentry.istio-system:
    payloadTemplate: '{{or (.originIp) "-"}} - {{or (.sourceUser) "-"}} [{{or (.timestamp.Format "2006-01-02T15:04:05Z07:00") "-"}}] "{{or (.method) "-"}} {{or (.url) "-"}} {{or (.protocol) "-"}}" {{or (.responseCode) "-"}} {{or (.responseSize) "-"}}'

```

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_LogInfo

type Params_LogInfo struct {
	// Optional. A golang text/template template (more details about golang text/template's templating can be
	// found here: https://golang.org/pkg/text/template/) that will be executed to construct the payload for
	// this log entry.
	// An example template that could be used:
	// {{or (.originIp) "-"}} - {{or (.sourceUser) "-"}} [{{or (.timestamp.Format "2006-01-02T15:04:05Z07:00") "-"}}] "{{or (.method) "-"}} {{or (.url) "-"}} {{or (.protocol) "-"}}" {{or (.responseCode) "-"}} {{or (.responseSize) "-"}}
	// A sample log that will be created after parsing the template with appropriate variables will look like this:
	// Jan 23 21:53:02 istio-mixer-57d88dc4b4-rbgmc istio: 10.32.0.15 - kubernetes://istio-ingress-78545c5bc9-wbr6g.istio-system [2018-01-24T02:53:02Z] "GET /productpage http" 200 5599
	// It will be given the full set of variables for the log to use to construct its result.
	// If it is not provided, a default template in place will be used.
	PayloadTemplate string `protobuf:"bytes,1,opt,name=payload_template,json=payloadTemplate,proto3" json:"payload_template,omitempty"`
}

Describes how to represent an Istio log entry in Solarwinds AppOptics

func (*Params_LogInfo) Descriptor

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

func (*Params_LogInfo) Marshal

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

func (*Params_LogInfo) MarshalTo

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

func (*Params_LogInfo) ProtoMessage

func (*Params_LogInfo) ProtoMessage()

func (*Params_LogInfo) Reset

func (m *Params_LogInfo) Reset()

func (*Params_LogInfo) Size

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

func (*Params_LogInfo) String

func (this *Params_LogInfo) String() string

func (*Params_LogInfo) Unmarshal

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

type Params_MetricInfo

type Params_MetricInfo struct {
	// The names of labels to use: these need to match the dimensions of the Istio metric.
	LabelNames []string `protobuf:"bytes,1,rep,name=label_names,json=labelNames" json:"label_names,omitempty"`
}

Describes how to represent an Istio metric in Solarwinds AppOptics

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

Jump to

Keyboard shortcuts

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