confgen

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const TypeGrafana = "grafana"

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfGen

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

func NewConfGen

func NewConfGen(opts *Options) *ConfGen

func (*ConfGen) GenerateFlowlogs2PipelineConfig added in v0.1.3

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

func (*ConfGen) GenerateGrafanaJson added in v0.1.8

func (cg *ConfGen) GenerateGrafanaJson() (string, error)

func (*ConfGen) GenerateTruncatedConfig added in v0.1.3

func (cg *ConfGen) GenerateTruncatedConfig() []config.StageParam

func (*ConfGen) ParseConfigFile added in v0.1.3

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

func (*ConfGen) ParseDefinition added in v0.1.3

func (cg *ConfGen) ParseDefinition(name string, bytes []byte) error

func (*ConfGen) Run

func (cg *ConfGen) Run() error

func (*ConfGen) SetConfig added in v0.1.8

func (cg *ConfGen) SetConfig(config *Config)

type Config

type Config struct {
	Description   string              `yaml:"description"`
	Ingest        config.Ingest       `yaml:"ingest"`
	Transform     config.Transform    `yaml:"transform"`
	Extract       config.Extract      `yaml:"extract"`
	Write         config.Write        `yaml:"write"`
	Encode        config.Encode       `yaml:"encode"`
	Visualization ConfigVisualization `yaml:"visualization"`
}

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 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
	Aggregates       *api.Aggregates
	ExtractTimebased *api.ExtractTimebased
	PromEncode       *api.PromEncode
	Visualization    *Visualization
}

type Definitions

type Definitions []Definition

type Options

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

type Visualization

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

type VisualizationGrafana

type VisualizationGrafana struct {
	Expr      string `yaml:"expr"`
	Legend    string `yaml:"legendFormat"`
	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