Skip to content
/ fakeadog Public
forked from johnstcn/fakeadog

fakeadog is a go library for parsing datadog events

License

Notifications You must be signed in to change notification settings

indjb/fakeadog

 
 

Repository files navigation

Fakeadog

Documentation codecov Go Report Card Build Status

Inspired by Lee Hambley's Ruby script.

Fakeadog can be used as an aid for testing emitting DataDog metrics locally without having to install a full-blown DataDog client.

Usage: fakeadog -host $HOST -port $PORT

To install: go get -u github.com/johnstcn/fakeadog

The program leverages the library fakeadog/parser for parsing DataDog events from raw UDP packets.

Example usage:

import "github.com/johnstcn/fakeadog/parser"

func main() {
    parser := parser.NewDataDogParser()
    payload := []byte{"myapp.frobble.count:1|c|#app:myapp,hostname:myhost"}
    metric, err := parser.Parse(payload)
    fmt.Printf("%s\n", metric) # C myap.frobble.count 1 [app:myapp hostname:myhost]
}

Example docker usage:

$ docker run --rm --net=host johnstcn/fakeadog

You can also pull the image from Docker Hub

$ docker pull johnstcn/fakeadog:latest

About

fakeadog is a go library for parsing datadog events

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 95.7%
  • Dockerfile 3.0%
  • Makefile 1.3%