collect

package
v0.0.0-...-1b39373 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2015 License: Apache-2.0, Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const CLUSTERADMIN_DB = "clusteradmin"

Variables

This section is empty.

Functions

func CollectDBSize

func CollectDBSize(gauge *prometheus.GaugeVec) error

func Collecthc

func Collecthc() error

func DeleteHealthCheck

func DeleteHealthCheck(dbConn *sql.DB) error

func InsertHealthCheck

func InsertHealthCheck(dbConn *sql.DB, hc HealthCheck) (int, error)

Types

type DBMetric

type DBMetric struct {
	MetricType string
	Name       string
	Value      float64
	Timestamp  time.Time
}

type HealthCheck

type HealthCheck struct {
	ID             string
	ProjectName    string
	ProjectID      string
	ContainerName  string
	ContainerID    string
	ContainerRole  string
	ContainerImage string
	Status         string
	UpdateDate     string
}

func GetHealthCheck

func GetHealthCheck(dbConn *sql.DB) ([]HealthCheck, error)

type Metric

type Metric struct {
	MetricType string
	Name       string
	Value      float64
	Timestamp  time.Time
}

func Collectcpu

func Collectcpu(serverName string) (Metric, error)

last minute load average of all cpu(s) range returned is 0.00 - 0.99

func Collectmem

func Collectmem(serverName string) (Metric, error)

percent memory utilization range returned is 1-100

Jump to

Keyboard shortcuts

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