gde

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2019 License: MIT Imports: 0 Imported by: 0

README

GDE (Grafana Dashboard Exporter) CircleCI

GDE is an extremely powerful open source agent for backing up grafana dashboards. It's based on the influxdata telegraf theme.

Design goals are to have a minimal memory footprint with a plugin system so that developers in the community can easily add support for collecting metrics.

GDE is plugin-driven and has the concept of 2 distinct plugin types:

  1. Input Plugins collect grafana dashboards json from the grafana server
  2. Output Plugins write metrics to various destinations

New plugins are designed to be easy to contribute, we'll eagerly accept pull requests and will manage the set of plugins that GDE supports.

Contributing

There are many ways to contribute:

Installation:

You can download the binaries directly from the releases section.

Ansible Role:

Ansible role: In progress :)

From Source:

GDE requires golang version 1.9 or newer, the Makefile requires GNU make.

  1. Install Go >=1.9 (1.11 recommended)
  2. Install dep ==v0.5.0
  3. Download Telegraf source:
    go get -d github.com/vikramjakhr/grafana-dashboard-exporter
    
  4. Run make from the source directory
    cd "$HOME/go/src/github.com/vikramjakhr/grafana-dashboard-exporter"
    make
    
Changelog

View the changelog for the latest updates and changes by version.

How to use it:

See usage with:

gde --help
Generate a gde config file:
gde config > gde.conf
Generate config with only grafana input & S3 output plugins defined:
gde --input-filter grafana --output-filter s3 config
Run a single gde collection:
gde --config gde.conf --test
Run gde with all plugins defined in config file:
gde --config gde.conf

Input Plugins

Output Plugins

Documentation

Index

Constants

View Source
const (
	TypeDatasource ValueType = "Datasource"
	TypeDashboard  ValueType = "Dashboard"
	ActionCreate   Action    = "Create"
	ActionFinish   Action    = "Finish"
)

Possible values for the ValueType enum.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accumulator

type Accumulator interface {
	AddOutput(dir string, valueType ValueType, action Action, title string, content []byte)

	AddError(err error)
}

Accumulator is an interface for "accumulating" metrics from plugin(s). The metrics are sent down a channel shared between all plugins.

type Action

type Action string

type Input

type Input interface {
	// SampleConfig returns the default configuration of the Input
	SampleConfig() string

	// Description returns a one-sentence description on the Input
	Description() string

	// Process processes the input every "interval"
	Process(Accumulator) error
}

type Metric

type Metric interface {
	// Getting data structure functions
	Dir() string
	Type() ValueType
	Action() Action
	Title() string
	Content() []byte
}

type Output

type Output interface {
	// Connect to the Output
	Connect() error
	// Description returns a one-sentence description on the Output
	Description() string
	// SampleConfig returns the default configuration of the Output
	SampleConfig() string
	// Write takes in group of points to be written to the Output
	Write(metric Metric) error
}

type ValueType

type ValueType string

ValueType is an enumeration of metric types that represent a simple value.

Directories

Path Synopsis
cmd
gde
Provides an io.Writer that filters log messages based on a log level.
Provides an io.Writer that filters log messages based on a log level.
plugins

Jump to

Keyboard shortcuts

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