Documentation ¶
Index ¶
- Constants
- Variables
- type ElasticSearchIndexMapping
- type HAProxyLine
- type Indexer
- type NginxLine
- type Parser
- type RabbitFeeder
- type RemoteLog
- func (rl *RemoteLog) CatCmd() string
- func (rl *RemoteLog) Command() string
- func (rl *RemoteLog) Current() string
- func (rl *RemoteLog) GrepCmd() string
- func (rl *RemoteLog) GzipPath() string
- func (rl *RemoteLog) LogRoot() string
- func (rl *RemoteLog) Path() string
- func (rl *RemoteLog) Reader() (reader io.ReadCloser, e error)
- type SyslogLine
- type UnicornLine
Constants ¶
View Source
const ( LogsExchange = "syslog" DefaultTtl = int32(60000) )
View Source
const ( DEFAULT_LOG_ROOT = "/var/log/hourly" HOURLY_PATTERN = "2006/01/02/2006-01-02T15.log" )
Variables ¶
View Source
var TagRegexp = regexp.MustCompile("(.*?)\\[(\\d*)\\]")
View Source
var UUIDRegexp = regexp.MustCompile("([a-z0-9\\-]{36})")
Functions ¶
This section is empty.
Types ¶
type ElasticSearchIndexMapping ¶
type ElasticSearchIndexMapping map[string]map[string]map[string]es.DynamicTemplates
type HAProxyLine ¶
type HAProxyLine struct { SyslogLine Frontend string Backend string BackendHost string BackendImageId string BackendContainerId string Status string Length int ClientRequestTime int ConnectionQueueTime int TcpConnectTime int ServerResponseTime int SessionDurationTime int ActiveConnections int FrontendConnections int BackendConnectons int ServerConnections int Retries int ServerQueue int BackendQueue int Method string Uri string }
func (*HAProxyLine) Parse ¶
func (line *HAProxyLine) Parse(raw string) error
type Indexer ¶
type Indexer struct { AMQPAddress string ElasticSearchHost string ElasticSearchIndex string ElasticSearchType string QueueName string BatchSize int Ttl int32 Debug bool }
func (*Indexer) CreateMappingWhenNotExists ¶
func (*Indexer) IndexMapping ¶
func (indexer *Indexer) IndexMapping(indexName string) ElasticSearchIndexMapping
func (*Indexer) NewEsIndex ¶
func (*Indexer) RunWithoutReconnect ¶
type NginxLine ¶
type RabbitFeeder ¶
type RabbitFeeder struct { Address string // <host>:<port> Exchange string Ttl int32 *amqp.Channel }
func (*RabbitFeeder) Connection ¶
func (feeder *RabbitFeeder) Connection() (con *amqp.Connection, e error)
type RemoteLog ¶
type RemoteLog struct { Host string Pattern string Tail bool Time time.Time Compress bool CustomLogRoot string }
func NewRemoteLogFromTime ¶
type SyslogLine ¶
type SyslogLine struct { Raw string Time time.Time Host string Tag string Severity string Pid int // contains filtered or unexported fields }
func (*SyslogLine) Parse ¶
func (line *SyslogLine) Parse(raw string) (e error)
func (*SyslogLine) Tags ¶
func (line *SyslogLine) Tags() (t map[string]interface{})
type UnicornLine ¶
type UnicornLine struct { UUID string SyslogLine }
func (*UnicornLine) Parse ¶
func (line *UnicornLine) Parse(raw string) error
Click to show internal directories.
Click to hide internal directories.