Documentation
¶
Index ¶
- Constants
- func GetFilterConditions() []string
- func GetSeverityFullName(severity string) string
- func GetSeverityFullNames(severities []string) []string
- func GetSeverityShortName(severity string) string
- func IsValidType(t string) bool
- type Event
- type Filter
- type HostFilter
- type InstanceFilter
- type Stat
- type SystemFilter
Constants ¶
View Source
const ( Module = "event" TimeLayout = "2006-01-02 15:04:05.999999999 -0700 MST" )
Variables ¶
This section is empty.
Functions ¶
func GetFilterConditions ¶
func GetFilterConditions() []string
func GetSeverityFullName ¶
func GetSeverityFullNames ¶
func GetSeverityShortName ¶
func IsValidType ¶
Types ¶
type Event ¶
type Event struct { SearchIndex string `json:"-"` Type string `json:"type"` Severity string `json:"severity"` Id string `json:"id"` Description string `json:"description"` Host string `json:"host"` Category string `json:"category"` Service string `json:"service"` Metadata map[string]any `json:"metadata"` Time string `json:"time"` }
func (*Event) GenSearchableObject ¶
note: in the current search lib(bleve), the algo is not able to detect the string if it include uppercase we've tried a few different init settings, but the result is not as expected as always currenlty, the only way we found is to convert all the string to lower case and inject to searcher
func (*Event) GetSeverityFullName ¶
func (*Event) SetCategory ¶
func (*Event) SetHostname ¶
func (*Event) SetSearchIndex ¶
func (e *Event) SetSearchIndex()
func (*Event) SetService ¶
type Filter ¶
type Filter struct { System SystemFilter `json:"system"` Instance InstanceFilter `json:"instance"` Host HostFilter `json:"host"` }
type HostFilter ¶
type InstanceFilter ¶
type Stat ¶
type Stat struct { Id string `json:"id"` Category string `json:"category"` Severity string `json:"severity,omitempty"` Host string `json:"host,omitempty"` InstanceId string `json:"instanceId,omitempty"` InstanceName string `json:"instanceName,omitempty"` Percent float64 `json:"percent"` Number int64 `json:"number"` }
type SystemFilter ¶
Click to show internal directories.
Click to hide internal directories.