Version: v1.2.1 Latest Latest

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

Go to latest
Published: Apr 14, 2022 License: AGPL-3.0 Imports: 10 Imported by: 1




View Source
const (
	MeasurementLink               = "link"        // Measurement for per-link statistics
	MeasurementNode               = "node"        // Measurement for per-node statistics
	MeasurementDHCP               = "dhcp"        // Measurement for DHCP server statistics
	MeasurementGlobal             = "global"      // Measurement for summarized global statistics
	CounterMeasurementFirmware    = "firmware"    // Measurement for firmware statistics
	CounterMeasurementModel       = "model"       // Measurement for model statistics
	CounterMeasurementAutoupdater = "autoupdater" // Measurement for autoupdater



This section is empty.


func Connect

func Connect(configuration map[string]interface{}) (database.Connection, error)

func GlobalStatsFields

func GlobalStatsFields(stats *runtime.GlobalStats) map[string]interface{}

GlobalStatsFields returns fields for InfluxDB


type Config

type Config map[string]interface{}

func (Config) Address

func (c Config) Address() string

func (Config) Database

func (c Config) Database() string

func (Config) InsecureSkipVerify added in v1.2.1

func (c Config) InsecureSkipVerify() bool

func (Config) Password

func (c Config) Password() string

func (Config) Tags

func (c Config) Tags() map[string]interface{}

func (Config) Username

func (c Config) Username() string

type Connection

type Connection struct {
	// contains filtered or unexported fields

func (*Connection) Close

func (conn *Connection) Close()

Close all connection and clean up

func (*Connection) InsertGlobals

func (conn *Connection) InsertGlobals(stats *runtime.GlobalStats, time time.Time, site string, domain string)

InsertGlobals implementation of database

func (conn *Connection) InsertLink(link *runtime.Link, t time.Time)

InsertLink adds a link data point

func (*Connection) InsertNode

func (conn *Connection) InsertNode(node *runtime.Node)

InsertNode stores statistics and neighbours in the database

func (*Connection) PruneNodes

func (conn *Connection) PruneNodes(deleteAfter time.Duration)

PruneNodes prunes historical per-node data

Jump to

Keyboard shortcuts

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