tcitoprommetrics

package
v0.9.1-0...-f6da643 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatToPrometheus

func FormatToPrometheus(mList MetricList) string

Method to format TCI Stats to Prom

func New

New function for the activity

Types

type Activity

type Activity struct {
}

Activity is an activity that is used to invoke a REST Operation

func (*Activity) Eval

func (a *Activity) Eval(ctx activity.Context) (done bool, err error)

Eval implements api.Activity.Eval - Create the hash

func (*Activity) Metadata

func (a *Activity) Metadata() *activity.Metadata

Metadata for the activity

type App

type App struct {
	AppID                string `md:"appId"`
	AppName              string `md:"appName"`
	AppType              string `md:"appType"`
	Category             string `md:"category"`
	CreatedTime          int    `md:"createdTime"`
	DeploymentStage      string `md:"deploymentStage"`
	DeploymentType       string `md:"deploymentType"`
	DesiredInstanceCount int    `md:"desiredInstanceCount"`
	EndpointVisibility   string `md:"endpointVisibility"`
	LastStartedTime      int64  `md:"lastStartedTime"`
	ModifiedTime         int64  `md:"modifiedTime"`
}

type AppInstanceMetrics

type AppInstanceMetrics struct {
	AppInstance        string               `md:"appInstance"`
	AppInstanceMetrics AppInstanceMetricsIn `md:"appInstanceMetrics"`
}

type AppInstanceMetricsIn

type AppInstanceMetricsIn struct {
	AppName    string     `md:"app_name"`
	AppVersion string     `md:"app_version"`
	Flows      []Flows    `md:"flows"`
	Triggers   []Triggers `md:"triggers"`
}

type AppMetrics

type AppMetrics struct {
	InstanceId               string                     `md:"instanceId"`
	TciAppExecutions         []TciAppExecutions         `md:"tciAppExecutions"`
	TciAppInstancesCPU       []TciAppInstancesCPU       `md:"tciAppInstancesCpu"`
	TciAppInstancesMemory    []TciAppInstancesMemory    `md:"tciAppInstancesMemory"`
	TciAppSinceLastExecution []TciAppSinceLastExecution `md:"tciAppSinceLastExecution"`
}

type AutoGenerated

type AutoGenerated struct {
	App                App                  `md:"app"`
	AppInstanceMetrics []AppInstanceMetrics `md:"appInstanceMetrics"`
	AppMetrics         []AppMetrics         `md:"appMetrics"`
}

type Config

type Config struct {
	Interval     string `md:"interval"`
	IntervalUnit string `md:"interval_unit"`
	Repeating    string `md:"repeating"`
}

type Flows

type Flows struct {
	AvgExecTime float64 `md:"avg_exec_time"`
	Completed   int     `md:"completed"`
	Failed      int     `md:"failed"`
	FlowName    string  `md:"flowName"`
	MaxExecTime float64 `md:"maxExecTime"`
	MinExecTime float64 `md:"minExecTime"`
	Started     int     `md:"started"`
}

type Input

type Input struct {
	Metrics []AutoGenerated `md:"appMetrics"`
}

Input for the activity

func (*Input) FromMap

func (i *Input) FromMap(values map[string]interface{}) error

FromMap for input

func (*Input) ToMap

func (i *Input) ToMap() map[string]interface{}

ToMap for Input

type Labels

type Labels struct {
	Status string `md:"status"`
}

type MetricList

type MetricList struct {
	Metrics []*MetricType
}

func (*MetricList) Create

func (r *MetricList) Create(name string, description string, metrictype string) *MetricType

func (MetricList) Get

func (r MetricList) Get(name string) *MetricType

type MetricType

type MetricType struct {
	Name        string
	Description string
	Type        string
	Samples     []Sample
}

func (*MetricType) Add

func (r *MetricType) Add(labels map[string]string, value float64) bool

type Output

type Output struct {
	Data string `md:"data"`
}

Output for the activity

func (*Output) FromMap

func (o *Output) FromMap(values map[string]interface{}) error

FromMap convert to object

func (*Output) ToMap

func (o *Output) ToMap() map[string]interface{}

ToMap conver to object

type Sample

type Sample struct {
	Labels map[string]string
	Value  float64
}

type Settings

type Settings struct {
}

Settings for the activity

type TciAppExecutions

type TciAppExecutions struct {
	Labels Labels `md:"labels,omitempty"`
	Value  int    `md:"value,omitempty"`
}

type TciAppInstancesCPU

type TciAppInstancesCPU struct {
	Labels Labels  `md:"labels,omitempty"`
	Value  float64 `md:"value,omitempty"`
}

type TciAppInstancesMemory

type TciAppInstancesMemory struct {
	Labels Labels  `md:"labels,omitempty"`
	Value  float64 `md:"value,omitempty"`
}

type TciAppSinceLastExecution

type TciAppSinceLastExecution struct {
	Value float64 `md:"value"`
}

type Triggers

type Triggers struct {
	Completed   int    `md:"completed"`
	Failed      int    `md:"failed"`
	Started     int    `md:"started"`
	Status      string `md:"status"`
	TriggerName string `md:"trigger_name"`
}

Jump to

Keyboard shortcuts

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