elastic

package
Version: v0.0.0-...-c7144ce Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const IndexRadiuslogPrefix = "radius-log"
View Source
const IndexSnmplogPrefix = "snmp-log"

Variables

This section is empty.

Functions

func GetCurrentRadiuslogIndexName

func GetCurrentRadiuslogIndexName() string

func GetCurrentSnmplogIndexName

func GetCurrentSnmplogIndexName() string

Types

type Elastic

type Elastic struct {
	Client *elastic.Client
}

func NewElastic

func NewElastic(client *elastic.Client) *Elastic

func (*Elastic) BulkRadiuslog

func (e *Elastic) BulkRadiuslog(logs ...Radiuslog) (*elastic.BulkResponse, error)

func (*Elastic) BulkSnmplog

func (e *Elastic) BulkSnmplog(logs ...map[string]interface{}) (*elastic.BulkResponse, error)

func (*Elastic) InitRadiuslogTemplate

func (e *Elastic) InitRadiuslogTemplate() error

func (*Elastic) InitSnmplogTemplate

func (e *Elastic) InitSnmplogTemplate() error

type Radiuslog

type Radiuslog struct {
	Username          string `json:"username"`
	AcctSessionId     string `json:"acctSessionId"`
	NasId             string `json:"nasId"`
	NasAddr           string `json:"nasAddr"`
	FramedIpaddr      string `json:"framedIpaddr"`
	FramedNetmask     string `json:"framedNetmask"`
	MacAddr           string `json:"macAddr"`
	NasPort           string `json:"nasPort"`
	NasClass          string `json:"nasClass"`
	NasPortId         string `json:"nasPortId"`
	NasPortType       string `json:"nasPortType"`
	ServiceType       string `json:"serviceType"`
	AcctSessionTime   string `json:"acctSessionTime"`
	AcctInputTotal    int64  `json:"acctInputTotal"`
	AcctOutputTotal   int64  `json:"acctOutputTotal"`
	AcctInputPackets  int64  `json:"acctInputPackets"`
	AcctOutputPackets int64  `json:"acctOutputPackets"`
	SessionTimeout    int64  `json:"sessionTimeout"`
	AcctStartTime     string `json:"acctStartTime"`
	AcctStopTime      string `json:"acctStopTime"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL