Documentation ¶
Index ¶
- type AuditLog
- type Auth
- type CheckExecution
- type Data
- type Datacenter
- type Generic
- type GenericCheck
- type GenericClient
- type GenericEvent
- type Health
- type Info
- type InfoServer
- type Metrics
- type Redis
- type SEMetric
- type SEMetrics
- type SERawMetric
- type SERawMetrics
- type Sensu
- type SensuHealth
- type StatusMetrics
- type Subscription
- type XPagination
- type XY
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 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 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 ¶
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 ¶
Subscription is a structure for holding a single subscription
type XPagination ¶
XPagination is a structure for holding the x-pagination HTTP header