Skip to content

nalletje/haproxylog

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

haproxylog Build Status GoDoc

haproxylog is a go library that parses haproxy log messages.

Installation

Standard go get:

$ go get github.com/chrishoffman/haproxylog

Usage

package main

import (
	"fmt"

	"github.com/chrishoffman/haproxylog"
)

func main() {
	rawLog := `192.168.9.185:56276 [29/May/2015:10:36:47.766] Service1 Service1/host-1 2/0/0 423 -- 282/36/0/0/0 0/0`

	log, err := haproxy.NewLog(rawLog)
	if err != nil {
		panic(err)
	}

	fmt.Println("Frontend Name: ", log.FrontendName)
	fmt.Println("Backend Name: ", log.BackendName)
	fmt.Println("Stat Tt: ", log.Tt)
}

See GoDoc for complete documentation.

About

Go library to parse HAProxy logs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%