structs

package
v0.0.0-...-e319382 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2019 License: MIT Imports: 1 Imported by: 31

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditLog

type AuditLog struct {
	Date       time.Time `json:"date"`
	Action     string    `json:"action"`
	Level      string    `json:"level"`
	Output     string    `json:"output,omitempty"`
	RemoteAddr string    `json:"remoteaddr"`
	URL        string    `json:"url,omitempty"`
	User       string    `json:"user"`
}

AuditLog is a structure for holding a log of the audit

type Auth

type Auth struct {
	Driver     string
	PrivateKey string
	PublicKey  string
}

Auth struct contains the generic configuration and details about the authentication

type CheckExecution

type CheckExecution struct {
	Check       string   `json:"check"`
	Dc          string   `json:"dc"`
	Subscribers []string `json:"subscribers"`
}

CheckExecution struct contains the payload for issuing a check execution request to a Sensu API

type Data

type Data struct {
	Aggregates    []interface{}
	Checks        []interface{}
	Clients       []interface{}
	Dc            []*Datacenter
	Events        []interface{}
	Health        Health
	Metrics       Metrics
	SEMetrics     SEMetrics
	SERawMetrics  SERawMetrics `json:"-"`
	Silenced      []interface{}
	Stashes       []interface{}
	Subscriptions []Subscription
}

Data is a structure for holding public data fetched from the Sensu APIs and exposed by the endpoints

type Datacenter

type Datacenter struct {
	Name    string         `json:"name"`
	Info    Info           `json:"info"`
	Metrics map[string]int `json:"metrics"`
}

Datacenter is a structure for holding the information about a datacenter

type Generic

type Generic struct {
	Dc string `json:"dc"`
}

Generic is a structure for holding a generic element

type GenericCheck

type GenericCheck struct {
	Dc          string   `json:"dc"`
	Output      string   `json:"output"`
	Status      int      `json:"status"`
	Subscribers []string `json:"subscribers"`
}

GenericCheck is a structure for holding a generic check

type GenericClient

type GenericClient struct {
	Dc            string   `json:"dc"`
	Name          string   `json:"name"`
	Subscriptions []string `json:"subscriptions"`
}

GenericClient is a structure for holding a generic client

type GenericEvent

type GenericEvent struct {
	Check  GenericCheck  `json:"check"`
	Client GenericClient `json:"client"`
	Dc     string        `json:"dc"`
}

GenericEvent is a structure for holding a generic event

type Health

type Health struct {
	Sensu  map[string]SensuHealth `json:"sensu"`
	Uchiwa string                 `json:"uchiwa"`
}

Health is a structure for holding health informaton about Sensu & Uchiwa

type Info

type Info struct {
	Redis     Redis        `json:"redis"`
	Sensu     Sensu        `json:"sensu"`
	Servers   []InfoServer `json:"servers"`
	Transport transport    `json:"transport"`
}

Info is a structure for holding the /info API information

type InfoServer

type InfoServer struct {
	ID        string                        `json:"id"`
	Hostname  string                        `json:"hostname"`
	Address   string                        `json:"address"`
	IsLeader  bool                          `json:"is_leader,omitempty"`
	Metrics   map[string]map[string]float32 `json:"metrics"`
	Sensu     map[string]interface{}        `json:"sensu,omitempty"`
	Tasks     []string                      `json:"tasks,omitempty"`
	Timestamp int                           `json:"timestamp"`
}

type Metrics

type Metrics struct {
	Aggregates  StatusMetrics `json:"aggregates"`
	Checks      StatusMetrics `json:"checks"`
	Clients     StatusMetrics `json:"clients"`
	Datacenters StatusMetrics `json:"datacenters"`
	Events      StatusMetrics `json:"events"`
	Silenced    StatusMetrics `json:"silenced"`
	Stashes     StatusMetrics `json:"stashes"`
}

Metrics is a structure for holding the metrics of the Sensu objects

type Redis

type Redis struct {
	Connected bool `json:"connected"`
}

Redis is a structure for holding the redis status

type SEMetric

type SEMetric struct {
	Data []XY   `json:"data"`
	Name string `json:"name"`
}

SEMetric is a structure for holding a Sensu Enterprise metric

type SEMetrics

type SEMetrics struct {
	Clients         *SEMetric   `json:"clients"`
	Events          []*SEMetric `json:"events"`
	KeepalivesAVG60 *SEMetric   `json:"keepalives_avg_60"`
	Requests        *SEMetric   `json:"requests"`
	Results         *SEMetric   `json:"results"`
}

SEMetrics is a structure for holding the Sensu Enterprise metrics

type SERawMetric

type SERawMetric struct {
	Name   string
	Points [][]interface{} `json:"points"`
}

SERawMetric ...

type SERawMetrics

type SERawMetrics struct {
	Clients         []*SERawMetric
	Events          []*SERawMetric
	KeepalivesAVG60 []*SERawMetric
	Requests        []*SERawMetric
	Results         []*SERawMetric
}

SERawMetrics ...

type Sensu

type Sensu struct {
	EnterpriseVersion string            `json:"enterprise_version,omitempty"`
	Settings          map[string]string `json:"settings,omitempty"`
	Version           string            `json:"version"`
}

Sensu is a structure for holding the sensu version

type SensuHealth

type SensuHealth struct {
	Output string `json:"output"`
	Status int    `json:"status"`
}

SensuHealth is a structure for holding health information about a specific sensu datacenter

type StatusMetrics

type StatusMetrics struct {
	Critical int `json:"critical"`
	Healthy  int `json:"healthy"`
	Silenced int `json:"silenced"`
	Total    int `json:"total"`
	Unknown  int `json:"unknown"`
	Warning  int `json:"warning"`
}

StatusMetrics is a structure for holding the status count

type Subscription

type Subscription struct {
	Dc   string `json:"dc"`
	Name string `json:"name"`
}

Subscription is a structure for holding a single subscription

type XPagination

type XPagination struct {
	Limit  int
	Offset int
	Total  int
}

XPagination is a structure for holding the x-pagination HTTP header

type XY

type XY struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
}

XY is a structure for holding the coordinates of Sensu Enterprise metrics points

Jump to

Keyboard shortcuts

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