uchiwa

package
v0.0.0-...-07dfffa Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2017 License: MIT Imports: 31 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 Attribute

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

type Uchiwa

type Uchiwa struct {
	Config       *config.Config
	Daemon       *daemon.Daemon
	Data         *structs.Data
	Datacenters  *[]sensu.Sensu
	Mu           *sync.Mutex
	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) 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 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(check string, dc string) (*map[string]interface{}, error)

GetAggregate retrieves a list of issued timestamps from a specified DC

func (*Uchiwa) GetAggregateByIssued

func (u *Uchiwa) GetAggregateByIssued(check string, issued string, dc string) (*map[string]interface{}, error)

GetAggregateByIssued retrieves aggregate check info from a specified DC

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) Login

func (u *Uchiwa) Login(user string, passwd string) (*ldap.Conn, error)

LOGIN FUNC TODO: Should there be separate login for admin???

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) 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