saelastic

package
v0.0.0-...-771c5c2 Latest Latest
Warning

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

Go to latest
Published: May 25, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sanitize

func Sanitize(jsondata string) string

Sanitize ... Issue with json format in events.

Types

type ElasticClient

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

ElasticClient ....

func CreateClient

func CreateClient(elastichost string, resetIndex bool, debug bool) *ElasticClient

CreateClient ....

func (*ElasticClient) Create

func (ec *ElasticClient) Create(indexname string, indextype IndexType, jsondata string) (string, error)

Create ... it can be BodyJson or BodyString.. BodyJson needs struct defined

func (*ElasticClient) CreateIndex

func (ec *ElasticClient) CreateIndex(index string, mapping string)

CreateIndex ...

func (*ElasticClient) Delete

func (ec *ElasticClient) Delete(indexname string, indextype IndexType, id string) error

Delete ....

func (*ElasticClient) DeleteIndex

func (ec *ElasticClient) DeleteIndex(index string) error

DeleteIndex ...

func (*ElasticClient) Get

func (ec *ElasticClient) Get(indexname string, indextype IndexType, id string) (*elastic.GetResult, error)

Get ....

func (*ElasticClient) InitAllMappings

func (ec *ElasticClient) InitAllMappings()

InitAllMappings ....

func (*ElasticClient) Search

func (ec *ElasticClient) Search(indexname string) *elastic.SearchResult

Search ..

func (*ElasticClient) Update

func (ec *ElasticClient) Update()

Update ....

type EventNotification

type EventNotification struct {
	Labels      func() interface{}
	Annotations func() interface{}
	StartsAt    string
}

EventNotification ....

type IndexName

type IndexName string

IndexName ..

const (
	CONNECTIVITYINDEX IndexName = "collectd_connectivity"
	PROCEVENTINDEX    IndexName = "collectd_procevent"
	SYSEVENTINDEX     IndexName = "collectd_syslogs"
	GENERICINDEX      IndexName = "collectd_generic"
)

COLLECTD

type IndexType

type IndexType string

IndexType ....

const (
	CONNECTIVITYINDEXTYPE IndexType = "event"
	PROCEVENTINDEXTYPE    IndexType = "event"
	EVENTINDEXTYPE        IndexType = "event"
	GENERICINDEXTYPE      IndexType = "event"
)

Index Type

func GetIndexNameType

func GetIndexNameType(jsondata string) (string, IndexType, error)

GetIndexNameType ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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