nginxlogs

package
v1.14.3 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2020 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package nginxlogs provides parsers for NGINX server logs

Index

Constants

View Source
const (
	TypeAccess = `Nginx.Access`
)

Variables

This section is empty.

Functions

func LogTypes added in v1.12.0

func LogTypes() logtypes.Group

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL