exporter

package
v0.0.0-...-bbca7bc Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMetricsDescription

func GetMetricsDescription() map[string]*prometheus.Desc

GetMetricsDescription - creates Prometheus metrics description

Types

type Exporter

type Exporter struct {
	Cache      Nsxv3Data
	APIMetrics map[string]*prometheus.Desc
	config.NSXv3Configuration
}

Exporter is used to store Metrics data and embeds the config struct. This is done so that the relevant functions have easy access to the user defined runtime configuration when the Collect method is called.

func (*Exporter) Collect

func (e *Exporter) Collect(ch chan<- prometheus.Metric)

Collect is a Prometheus callback for scrape operations (/metrics page)

func (*Exporter) CollectAsync

func (e *Exporter) CollectAsync()

CollectAsync - Asynchronously scraps the API and stores into struct

func (*Exporter) Describe

func (e *Exporter) Describe(ch chan<- *prometheus.Desc)

Describe the API metrics in Prometheus

type Nsxv3Client

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

Nsxv3Client represents connection to NSXc3 Manger

func GetClient

GetClient initialize NSXv3 http client

type Nsxv3ControlNodeData

type Nsxv3ControlNodeData struct {
	IP                     string
	Connectivity           float64
	ManagementConnectivity float64
}

Nsxv3ControlNodeData represent the current snapshot of metrics for a single control node

type Nsxv3Data

type Nsxv3Data struct {
	ClusterHost                  string
	ClusterManagementStatus      float64
	ClusterControlStatus         float64
	ClusterOnlineNodes           float64
	ClusterOfflineNodes          float64
	DatabaseStatus               float64
	ManagementNodes              []Nsxv3ManagementNodeData
	ControlNodes                 []Nsxv3ControlNodeData
	TransportNodes               []Nsxv3TransportNodeData
	TransportNodesState          Nsxv3TransportNodesStateData
	LogicalSwitchesAdminStates   []Nsxv3LogicalSwitchAdminStateData
	LogicalSwitchesStates        []Nsxv3LogicalSwitchStateData
	ExtractedActualValues        bool
	LastSuccessfulDataFetch      float64
	LogicalPortOperationalStates []Nsxv3LogicalPortOperationalStateData
}

Nsxv3Data represent the current snapshot of metrics

type Nsxv3LogicalPortOperationalStateData

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

Nsxv3LogicalPortOperationalStateData represent the current snapshot of metrics for a logical port operational state

type Nsxv3LogicalSwitchAdminStateData

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

Nsxv3LogicalSwitchAdminStateData represent the current snapshot of metrics for a logical switch admin state

type Nsxv3LogicalSwitchStateData

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

Nsxv3LogicalSwitchStateData represent the current snapshot of metrics for a logical switch state

type Nsxv3ManagementNodeData

type Nsxv3ManagementNodeData struct {
	IP           string
	Connectivity float64
	CPUCores     float64
	// Average load index [0] := 1min, [1] := 5min, [2] := 15min
	LoadAverage  [3]float64
	MemoryUse    float64
	MemoryTotal  float64
	MemoryCached float64
	SwapUse      float64
	SwapTotal    float64
	Storage      []Nsxv3NodeStorageData
	Version      string
}

Nsxv3ManagementNodeData represent the current snapshot of metrics for a single management node

type Nsxv3NodeStorageData

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

Nsxv3NodeStorageData represent the current snapshot of metrics for a single node filesystem

type Nsxv3Resource

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

Nsxv3Resource represents endpoint status snapshot

type Nsxv3ResourceKind

type Nsxv3ResourceKind string

Nsxv3ResourceKind represents Nsxv3Resource type

const (
	ManagementCluster         Nsxv3ResourceKind = "ManagementCluster"
	ManagementClusterNodes    Nsxv3ResourceKind = "ManagementClusterNodes"
	ManagementClusterDatabase Nsxv3ResourceKind = "ManagementClusterDatabase"
	TransportNode             Nsxv3ResourceKind = "TransportNode"
	TransportNodes            Nsxv3ResourceKind = "TransportNodes"
	LogicalSwitchAdmin        Nsxv3ResourceKind = "LogicalSwitchAdmin"
	LogicalSwitch             Nsxv3ResourceKind = "LogicalSwitch"
	LogicalPort               Nsxv3ResourceKind = "LogicalPort"
)

Nsxv3Resource resource kinds

type Nsxv3TransportNodeData

type Nsxv3TransportNodeData struct {
	ID              string
	State           float64
	DeploymentState float64
}

Nsxv3TransportNodeData represent the current snapshot of metrics for a single transport node

type Nsxv3TransportNodesStateData

type Nsxv3TransportNodesStateData struct {
	UpCount       float64
	DegradedCount float64
	DownCount     float64
	UnknownCount  float64
}

Nsxv3TransportNodesStateData represent the current snapshot of the transport nodes state

Jump to

Keyboard shortcuts

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