store

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package store ingest monitoring time series data points to different back-ends

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client represents HTTP client

func NewHTTP

func NewHTTP() *Client

NewHTTP constructs HTTP client

func (*Client) Get

func (c *Client) Get(url string, s interface{}) error

Get tries to get metrics through HTTP w/ get method

func (*Client) Post

func (c *Client) Post(url string, cType, query string) ([]byte, error)

Post tries to digest metrics through HTTP w/ post method

type Flow

type Flow struct {
	StartTime int64
	Timestamp int64
	IPFIX     IPFIX
	SFlow     SFlow
	NetflowV5 NetflowV5
	NetflowV9 NetflowV9
}

Flow represents flow (IPFIX+sFlow) metrics

type IPFIX

type IPFIX struct {
	UDPQueue       int64
	UDPMirrorQueue int64
	MessageQueue   int64
	UDPCount       int64
	DecodedCount   int64
	MQErrorCount   int64
	Workers        int64
}

IPFIX represents IPFIX metrics

type InfluxDB

type InfluxDB struct {
	API   string
	DB    string
	VHost string
}

InfluxDB represents InfluxDB backend

func (InfluxDB) Netflow

func (i InfluxDB) Netflow(hostname string) error

Netflow ingests flow's stats to InfluxDB

func (InfluxDB) System

func (i InfluxDB) System(hostname string) error

System ingests system's stats to InfluxDB

type Monitor

type Monitor interface {
	System(string) error
	Netflow(string) error
}

Monitor is an interface to store system and netflow statistics

type NetflowV5 added in v0.8.0

type NetflowV5 struct {
	UDPQueue     int64
	MessageQueue int64
	UDPCount     int64
	DecodedCount int64
	MQErrorCount int64
	Workers      int64
}

NetflowV5 represents Netflow v5 metrics

type NetflowV9 added in v0.4.1

type NetflowV9 struct {
	UDPQueue     int64
	MessageQueue int64
	UDPCount     int64
	DecodedCount int64
	MQErrorCount int64
	Workers      int64
}

NetflowV9 represents Netflow v9 metrics

type SFlow

type SFlow struct {
	UDPQueue     int64
	MessageQueue int64
	UDPCount     int64
	DecodedCount int64
	MQErrorCount int64
	Workers      int64
}

SFlow represents SFlow metrics

type Sys

type Sys struct {
	MemHeapAlloc    int64
	MemAlloc        int64
	MCacheInuse     int64
	GCNext          int64
	MemTotalAlloc   int64
	GCSys           int64
	MemHeapSys      int64
	NumGoroutine    int64
	NumLogicalCPU   int64
	MemHeapReleased int64
}

Sys represents system/go-runtime statistics

type TSDB

type TSDB struct {
	API   string
	VHost string
}

TSDB represents TSDB ingestion

func (TSDB) Netflow

func (t TSDB) Netflow(hostname string) error

Netflow ingests flow's stats to TSDB

func (TSDB) System

func (t TSDB) System(hostname string) error

System ingests system's stats to TSDB

type TSDBDataPoint

type TSDBDataPoint struct {
	Metric    string `json:"metric"`
	Timestamp int64  `json:"timestamp"`
	Value     int64  `json:"value"`
	Tags      struct {
		Host string `json:"host"`
		Type string `json:"type"`
	}
}

TSDBDataPoint represents single TSDB data point

type TSDBResp

type TSDBResp struct {
	Failed  int `json:"failed"`
	Success int `json:"success"`
}

TSDBResp represents TSDP response

Jump to

Keyboard shortcuts

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