Documentation ¶
Index ¶
Constants ¶
View Source
const ( // CLF contains a time.Parse reference timestamp for strftime // "%d/%b/%Y:%H:%M:%S %z" used in CLF. CLF = "02/Jan/2006:15:04:05 -0700" // ISO8601 contains a time.Parse reference timestamp for ISO 8601. ISO8601 = "2006-01-02T15:04:05-07:00" // ResponseCountMetricName is the name of the metric reporting total number // of response counts. ResponseCountMetricName = "nginx_http_response_total" // ResponseCountDetailedMetricName is the name of the metric reporting total // number of response counts for the configured "detail" paths. ResponseCountDetailedMetricName = "nginx_http_response_detailed_total" // ResponseDurationMetricName is the name of the metric reporting the // distribution of response durations (i.e., processing latency) ResponseDurationMetricName = "nginx_http_response_duration_seconds" // ResponseSizeMetricName is the name of the metric reporting the // distribution of response sizes. ResponseSizeMetricName = "nginx_http_response_size_bytes" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consumer ¶
Consumer implements periodic polling of the supplied nginx access log tailer, aggregation of response counts from the returned log lines.
func NewConsumer ¶
func NewConsumer(period time.Duration, tailer file.TailerT, manager metrics.ManagerT, paths []string, format string) (*Consumer, error)
NewConsumer returns a Consumer polling the supplied tailer for new access log lines and exporting counts / stats to the supplied manager at the specified period. The specific metrics exported by the Consumer will be created during init in NewConsumer. Log lines provided by the tailer are expected to be in the supplied format, of which "JSON" (see README.md) and "CLF" are supported.
Click to show internal directories.
Click to hide internal directories.