Documentation ¶
Overview ¶
Package nginxlogs provides parsers for NGINX server logs
Index ¶
Constants ¶
View Source
const (
TypeAccess = `Nginx.Access`
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Access ¶
type Access struct { RemoteAddress *string `json:"remoteAddr,omitempty" description:"The IP address of the client (remote host) which made the request to the server."` RemoteUser *string `` /* 147-byte string literal not displayed */ Time *timestamp.RFC3339 `json:"time" validate:"required" description:"The time that the request was received (UTC)."` Request *string `` /* 148-byte string literal not displayed */ Status *int16 `json:"status,omitempty" description:"The HTTP status code returned to the client."` BodyBytesSent *int `json:"bodyBytesSent,omitempty" description:"The size of the object returned to the client, measured in bytes."` HTTPReferer *string `json:"httpReferer,omitempty" description:"The HTTP referrer if any."` HTTPUserAgent *string `json:"httpUserAgent,omitempty" description:"The agent the user used when making the request."` // NOTE: added to end of struct to allow expansion later parsers.PantherLog }
nolint:lll
type AccessParser ¶
type AccessParser struct{}
AccessParser parses Nginx Access logs in 'combined' log format
func (*AccessParser) LogType ¶
func (p *AccessParser) LogType() string
LogType returns the log type supported by this parser
func (*AccessParser) New ¶ added in v0.3.0
func (p *AccessParser) New() parsers.LogParser
func (*AccessParser) Parse ¶
func (p *AccessParser) Parse(log string) ([]*parsers.PantherLog, error)
Parse returns the parsed events or nil if parsing failed
Click to show internal directories.
Click to hide internal directories.