uchiwa

package
v0.0.0-...-f83c003 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2018 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Authorization contains the available authorization methods

Filters contains the available filters for the Sensu data

Functions

func MergeStringSlices

func MergeStringSlices(a1, a2 []string) []string

MergeStringSlices merges two slices of strings and remove duplicated values

func SliceIntersection

func SliceIntersection(a1, a2 []string) bool

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

func Init(c *config.Config) *Uchiwa

Init method initializes the Sensu structure with the provided configuration and start the Uchiwa daemon

func (*Uchiwa) ClearSilenced

func (u *Uchiwa) ClearSilenced(data silence) error

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

func (u *Uchiwa) DeleteAggregate(name, dc string) error

DeleteAggregate deletes a specific aggregate

func (*Uchiwa) DeleteCheckResult

func (u *Uchiwa) DeleteCheckResult(check, client, dc string) error

DeleteCheckResult sends a DELETE request in order to remove the result for a given check on a given client

func (*Uchiwa) DeleteClient

func (u *Uchiwa) DeleteClient(dc, name, invalidate, expire string) error

DeleteClient send a DELETE request to the /clients/*client* endpoint in order to delete a client

func (*Uchiwa) DeleteStash

func (u *Uchiwa) DeleteStash(dc, path string) error

DeleteStash send a DELETE request to the /stashes/*path* endpoint in order to delete a stash

func (*Uchiwa) GetAggregate

func (u *Uchiwa) GetAggregate(name, dc string) (*map[string]interface{}, error)

GetAggregate retrieves a specific aggregate

func (*Uchiwa) GetAggregateChecks

func (u *Uchiwa) GetAggregateChecks(name, dc string) (*[]interface{}, error)

GetAggregateChecks retrieves check members of an aggregate

func (*Uchiwa) GetAggregateClients

func (u *Uchiwa) GetAggregateClients(name, dc string) (*[]interface{}, error)

GetAggregateClients retrieves client members of an aggregate

func (*Uchiwa) GetAggregateResults

func (u *Uchiwa) GetAggregateResults(name, severity, dc string) (*[]interface{}, error)

GetAggregateResults retrieves check result members by severity of an aggregate

func (*Uchiwa) GetCheck

func (u *Uchiwa) GetCheck(dc, name string) (map[string]interface{}, error)

GetCheck retrieves a specific check

func (*Uchiwa) GetClient

func (u *Uchiwa) GetClient(dc, name string) (map[string]interface{}, error)

GetClient retrieves a specific client

func (*Uchiwa) GetClientHistory

func (u *Uchiwa) GetClientHistory(dc, name string) ([]interface{}, error)

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

func (u *Uchiwa) PostSilence(data silence) error

PostSilence send a POST request to the /stashes endpoint in order to create a stash

func (*Uchiwa) PostStash

func (u *Uchiwa) PostStash(data stash) error

PostStash send a POST request to the /stashes endpoint in order to create a stash

func (*Uchiwa) ResolveEvent

func (u *Uchiwa) ResolveEvent(check, client, dc string) error

ResolveEvent sends a DELETE request in order to resolve an event for a given check on a given client

func (*Uchiwa) UpdateClient

func (u *Uchiwa) UpdateClient(payload interface{}) error

func (*Uchiwa) WebServer

func (u *Uchiwa) WebServer(publicPath *string, auth authentication.Config)

WebServer starts the web server and serves GET & POST requests

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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