Documentation ¶
Index ¶
- Constants
- Variables
- func Fields(line string) []string
- func FieldsWithErr(line string) ([]string, error)
- type ElasticLoadBalancerLog
- type HAProxyLine
- type MetrixLine
- type MetrixTags
- type NginxLine
- type RailsLine
- 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) Open() (reader io.ReadCloser, e error)
- func (rl *RemoteLog) Path() string
- type SyslogLine
- type UnicornLine
Constants ¶
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 ¶
func FieldsWithErr ¶
Types ¶
type ElasticLoadBalancerLog ¶
type ElasticLoadBalancerLog struct { Timestamp time.Time `json:"timestamp,omitempty"` Elb string `json:"elb,omitempty"` ClientAndPort string `json:"client_and_port,omitempty"` BackendAndPort string `json:"backend_and_port,omitempty"` RequestProcessingTime float64 `json:"request_processing_time,omitempty"` BackendProcessingTime float64 `json:"backend_processing_time,omitempty"` ResponseProcessingTime float64 `json:"response_processing_time,omitempty"` ElbStatusCode int `json:"elb_status_code,omitempty"` BackendStatusCode int `json:"backend_status_code,omitempty"` ReceivedBytes int `json:"received_bytes,omitempty"` SentBytes int `json:"sent_bytes,omitempty"` Method string `json:"method,omitempty"` Url string `json:"url,omitempty"` UserAgent string `json:"user_agent,omitempty"` SSLCipher string `json:"ssl_cipher,omitempty"` SSLProtocol string `json:"ssl_protocol,omitempty"` RAW string `json:"raw,omitempty"` }
func (*ElasticLoadBalancerLog) Load ¶
func (l *ElasticLoadBalancerLog) Load(raw string) error
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 MetrixLine ¶
type MetrixLine struct { Host string Metric string Timestamp time.Time Value int64 Tags MetrixTags }
func (*MetrixLine) Parse ¶
func (m *MetrixLine) Parse(line string) error
type MetrixTags ¶
type NginxLine ¶
type NginxLine struct { *SyslogLine XForwardedFor []string `json:"x_forwarded_for,omitempty"` Method string `json:"method,omitempty"` Status string `json:"status,omitempty"` Length int `json:"length,omitempty"` TotalTime float64 `json:"total_time,omitempty"` UnicornTime float64 `json:"unicorn_time,omitempty"` HttpHost string `json:"http_host,omitempty"` UserAgentName string `json:"user_agent_name,omitempty"` Uri string `json:"uri,omitempty"` Referer string `json:"referer,omitempty"` Action string `json:"action,omitempty"` Revision string `json:"revision,omitempty"` UUID string `json:"uuid,omitempty"` Etag string `json:"etag,omitempty"` }
type RailsLine ¶
type RailsLine struct { Uuid string `json:"uuid,omitempty"` Action string `json:"action,omitempty"` Type string `json:"type,omitempty"` ExecutionTime float64 `json:"execution_time,omitempty"` TotalTime float64 `json:"total_time,omitempty"` ViewTime float64 `json:"view_time,omitempty"` ActiveRecordTime float64 `json:"active_record_time,omitempty"` }
type RemoteLog ¶
type RemoteLog struct { Host string User string Pattern string Tail bool Time time.Time Compress bool CustomLogRoot string FromBegin bool // to be used with tail }
func NewRemoteLogFromTime ¶
type SyslogLine ¶
type SyslogLine struct { Raw string `json:"raw,omitempty"` Time time.Time `json:"time,omitempty"` Host string `json:"host,omitempty"` Tag string `json:"tag,omitempty"` Severity string `json:"severity,omitempty"` Pid int `json:"pid,omitempty"` Port string `json:"port,omitempty"` Message string `json:"message,omitempty"` // contains filtered or unexported fields }
func (*SyslogLine) Parse ¶
func (line *SyslogLine) Parse(raw string) (e error)
func (*SyslogLine) TagString ¶
func (line *SyslogLine) TagString(key string) string
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.