confgen

package
v0.1.3-rc1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const TypeGrafana = "grafana"

Variables

View Source
var (
	Opt = Options{}
)

Functions

This section is empty.

Types

type ConfGen

type ConfGen struct {
	// contains filtered or unexported fields
}

func NewConfGen

func NewConfGen() (*ConfGen, error)

func (*ConfGen) Dedupe

func (cg *ConfGen) Dedupe()

func (*ConfGen) GenerateFlowlogs2PipelineConfig added in v0.1.3

func (cg *ConfGen) GenerateFlowlogs2PipelineConfig() config.ConfigFileStruct

func (*ConfGen) GenerateTruncatedConfig added in v0.1.3

func (cg *ConfGen) GenerateTruncatedConfig(stages []string) config.ConfigFileStruct

func (*ConfGen) GetDefinitionFiles

func (*ConfGen) GetDefinitionFiles(rootPath string) []string

func (*ConfGen) ParseConfigFile added in v0.1.3

func (cg *ConfGen) ParseConfigFile(fileName string) (*Config, error)

func (*ConfGen) Run

func (cg *ConfGen) Run() error

type Config

type Config struct {
	Description   string              `yaml:"description"`
	Ingest        ConfigIngest        `yaml:"ingest"`
	Transform     ConfigTransform     `yaml:"transform"`
	Write         ConfigWrite         `yaml:"write"`
	Encode        ConfigEncode        `yaml:"encode"`
	Visualization ConfigVisualization `yaml:"visualization"`
}

type ConfigEncode

type ConfigEncode struct {
	Prom api.PromEncode `yaml:"prom"`
}

type ConfigIngest

type ConfigIngest struct {
	Collector api.IngestCollector `yaml:"collector"`
}

type ConfigTransform

type ConfigTransform struct {
	Generic api.TransformGeneric `yaml:"generic"`
}

type ConfigVisualization

type ConfigVisualization struct {
	Grafana ConfigVisualizationGrafana `yaml:"grafana"`
}

type ConfigVisualizationGrafana

type ConfigVisualizationGrafana struct {
	Dashboards ConfigVisualizationGrafanaDashboards `yaml:"dashboards"`
}

type ConfigVisualizationGrafanaDashboard

type ConfigVisualizationGrafanaDashboard struct {
	Name          string `yaml:"name"`
	Title         string `yaml:"title"`
	TimeFrom      string `yaml:"time_from"`
	Tags          string `yaml:"tags"`
	SchemaVersion string `yaml:"schemaVersion"`
}

type ConfigVisualizationGrafanaDashboards

type ConfigVisualizationGrafanaDashboards []ConfigVisualizationGrafanaDashboard

type ConfigWrite

type ConfigWrite struct {
	Loki api.WriteLoki `yaml:"loki"`
	Type string        `yaml:"type"`
}

type Dashboard

type Dashboard struct {
	Name   string
	Header []byte
	Panels []byte
}

type Dashboards

type Dashboards map[string]Dashboard

type DefFile

type DefFile struct {
	Description   string                 `yaml:"description"`
	Details       string                 `yaml:"details"`
	Usage         string                 `yaml:"usage"`
	Tags          []string               `yaml:"tags"`
	Transform     map[string]interface{} `yaml:"transform"`
	Extract       map[string]interface{} `yaml:"extract"`
	Encode        map[string]interface{} `yaml:"encode"`
	Visualization Visualization          `yaml:"visualization"`
}

type Definition

type Definition struct {
	FileName             string
	Description          string
	Details              string
	Usage                string
	Tags                 []string
	TransformNetwork     *api.TransformNetwork
	AggregateDefinitions *aggregate.Definitions
	PromEncode           *api.PromEncode
	Visualization        *Visualization
}

type Definitions

type Definitions []Definition

type Options

type Options struct {
	DestConfFile             string
	DestDocFile              string
	DestGrafanaJsonnetFolder string
	SrcFolder                string
	SkipWithTags             []string
	GenerateStages           []string
}

type Visualization

type Visualization struct {
	Type    string                 `yaml:"type"`
	Grafana []VisualizationGrafana `yaml:"grafana"`
}

type VisualizationGrafana

type VisualizationGrafana struct {
	Expr      string `yaml:"expr"`
	Type      string `yaml:"type"`
	Title     string `yaml:"title"`
	Dashboard string `yaml:"dashboard"`
}

type Visualizations

type Visualizations []Visualization

Jump to

Keyboard shortcuts

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