Documentation ¶
Index ¶
- Variables
- func MergeStringSlices(a1, a2 []string) []string
- func SliceIntersection(a1, a2 []string) bool
- type Uchiwa
- func (u *Uchiwa) ClearSilenced(data silence) error
- func (u *Uchiwa) Datacenter(name string) (*structs.Datacenter, error)
- func (u *Uchiwa) DeleteAggregate(name, dc string) error
- func (u *Uchiwa) DeleteCheckResult(check, client, dc string) error
- func (u *Uchiwa) DeleteClient(dc, name, invalidate, expire string) error
- func (u *Uchiwa) DeleteStash(dc, path string) error
- func (u *Uchiwa) GetAggregate(name, dc string) (*map[string]interface{}, error)
- func (u *Uchiwa) GetAggregateChecks(name, dc string) (*[]interface{}, error)
- func (u *Uchiwa) GetAggregateClients(name, dc string) (*[]interface{}, error)
- func (u *Uchiwa) GetAggregateResults(name, severity, dc string) (*[]interface{}, error)
- func (u *Uchiwa) GetCheck(dc, name string) (map[string]interface{}, error)
- func (u *Uchiwa) GetClient(dc, name string) (map[string]interface{}, error)
- func (u *Uchiwa) GetClientHistory(dc, name string) ([]interface{}, error)
- func (u *Uchiwa) IssueCheckExecution(data structs.CheckExecution) error
- func (u *Uchiwa) PostSilence(data silence) error
- func (u *Uchiwa) PostStash(data stash) error
- func (u *Uchiwa) ResolveEvent(check, client, dc string) error
- func (u *Uchiwa) UpdateClient(payload interface{}) error
- func (u *Uchiwa) WebServer(publicPath *string, auth authentication.Config)
Constants ¶
This section is empty.
Variables ¶
var Authorization authorization.Authorization
Authorization contains the available authorization methods
var Filters filters.Filters
Filters contains the available filters for the Sensu data
Functions ¶
func MergeStringSlices ¶
MergeStringSlices merges two slices of strings and remove duplicated values
func SliceIntersection ¶
SliceIntersection searches for values in both slices Returns true if there's at least one intersection
Types ¶
type Uchiwa ¶
type Uchiwa struct { Config *config.Config Daemon *daemon.Daemon Data *structs.Data Datacenters *[]sensu.Sensu Mu *sync.RWMutex PublicConfig *config.Config }
Uchiwa structure is used to manage Uchiwa
func Init ¶
Init method initializes the Sensu structure with the provided configuration and start the Uchiwa daemon
func (*Uchiwa) ClearSilenced ¶
ClearSilenced send a POST request to the /stashes endpoint in order to create a stash
func (*Uchiwa) Datacenter ¶
func (u *Uchiwa) Datacenter(name string) (*structs.Datacenter, error)
func (*Uchiwa) DeleteAggregate ¶
DeleteAggregate deletes a specific aggregate
func (*Uchiwa) DeleteCheckResult ¶
DeleteCheckResult sends a DELETE request in order to remove the result for a given check on a given client
func (*Uchiwa) DeleteClient ¶
DeleteClient send a DELETE request to the /clients/*client* endpoint in order to delete a client
func (*Uchiwa) DeleteStash ¶
DeleteStash send a DELETE request to the /stashes/*path* endpoint in order to delete a stash
func (*Uchiwa) GetAggregate ¶
GetAggregate retrieves a specific aggregate
func (*Uchiwa) GetAggregateChecks ¶
GetAggregateChecks retrieves check members of an aggregate
func (*Uchiwa) GetAggregateClients ¶
GetAggregateClients retrieves client members of an aggregate
func (*Uchiwa) GetAggregateResults ¶
GetAggregateResults retrieves check result members by severity of an aggregate
func (*Uchiwa) GetClientHistory ¶
GetClientHistory retrieves a specific client history
func (*Uchiwa) IssueCheckExecution ¶
func (u *Uchiwa) IssueCheckExecution(data structs.CheckExecution) error
IssueCheckExecution sends a POST request to the /stashes endpoint in order to create a stash
func (*Uchiwa) PostSilence ¶
PostSilence send a POST request to the /stashes endpoint in order to create a stash
func (*Uchiwa) PostStash ¶
PostStash send a POST request to the /stashes endpoint in order to create a stash
func (*Uchiwa) ResolveEvent ¶
ResolveEvent sends a DELETE request in order to resolve an event for a given check on a given client