Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomFilter ¶
type CustomFilter struct { CustomID string EnableAlias bool // contains filtered or unexported fields }
CustomFilter a filter created from a device query, usuali used only with the DeviceOrigin , but could be used on more than one but
func NewCustomFilter ¶
func NewCustomFilter(cid string, enableAlias bool, l utils.Logger) *CustomFilter
NewCustomFilter creates a new CustomFilter
func (*CustomFilter) Count ¶
func (cf *CustomFilter) Count() int
Count Get current items in the filter
func (*CustomFilter) Init ¶
func (cf *CustomFilter) Init(arg ...interface{}) error
Init Load Confiration before use them
func (*CustomFilter) MapLabels ¶
func (cf *CustomFilter) MapLabels(AllIndexedLabels map[string]string) map[string]string
MapLabels return the final tagmap from all posible values and the filter results
func (*CustomFilter) Update ¶
func (cf *CustomFilter) Update() error
Update load filtered data from Database config online time
type FileFilter ¶
type FileFilter struct { FileName string EnableAlias bool // contains filtered or unexported fields }
FileFilter a filter loaded from a Config File placed in confDir (made for influxsnmp tool compatibility)
func NewFileFilter ¶
func NewFileFilter(fileName string, enableAlias bool, l utils.Logger) *FileFilter
NewFileFilter creates a new Filter
func (*FileFilter) Count ¶
func (ff *FileFilter) Count() int
Count return number of values in the filtered map
func (*FileFilter) Init ¶
func (ff *FileFilter) Init(arg ...interface{}) error
Init load config first time
func (*FileFilter) MapLabels ¶
func (ff *FileFilter) MapLabels(AllIndexedLabels map[string]string) map[string]string
MapLabels return the final tagmap from all posible values and the filter results
func (*FileFilter) Update ¶
func (ff *FileFilter) Update() error
Update load filtered data from config file online time
type Filter ¶
type Filter interface { Init(arg ...interface{}) error Update() error // construct the final index array from all index and filters MapLabels(map[string]string) map[string]string Count() int }
Filter Interface to operate with filters
type OidFilter ¶
type OidFilter struct { FilterLabels map[string]string `json:"-"` OidCond string TypeCond string ValueCond string Walk func(string, gosnmp.WalkFunc) error `json:"-"` // contains filtered or unexported fields }
OidFilter a new Oid condition filter
func NewOidFilter ¶
NewOidFilter create a new filter for OID conditions
type OidMultipleFilter ¶
type OidMultipleFilter struct { FilterLabels map[string]string `json:"-"` EvalCondition string // Eval condition Walk func(string, gosnmp.WalkFunc) error `json:"-"` // contains filtered or unexported fields }
OidMultipleFilter a new Oid condition filter
func NewOidMultipleFilter ¶
func NewOidMultipleFilter(cond string, l utils.Logger) *OidMultipleFilter
NewOidMultipleFilter create a new filter for OID conditions
func (*OidMultipleFilter) Count ¶
func (of *OidMultipleFilter) Count() int
Count return current number of itemp in the filter
func (*OidMultipleFilter) Init ¶
func (of *OidMultipleFilter) Init(arg ...interface{}) error
Init initialize
func (*OidMultipleFilter) MapLabels ¶
func (of *OidMultipleFilter) MapLabels(AllIndexedLabels map[string]string) map[string]string
MapLabels return the final tagmap from all posible values and the filter results
func (*OidMultipleFilter) Update ¶
func (of *OidMultipleFilter) Update() error
Update use this to reload conditions