dnsdog

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2017 License: BSD-2-Clause Imports: 8 Imported by: 0

README

DNSDog

DNSDog is a small utility for generating metrics for DNS queries and replies and sending them to statsd. It's functionally similar to the DNS plugin for collectd but optimized for datadog.

Installation

Grab the latest release from here.

Usage

Start watching for DNS packets on eth0 and send them to statsd:

$ dnsdog -iface eth0 -statsd "127.0.0.1:8125"

Metrics

DNSDog generates the following metrics and tags:

dns.query{op_code}
dns.question{op_code,query,query_type}
dns.reply{response_code}
dns.reply.question{response_code,query,query_type}
dns.answer{response_code,query,query_type}
dns.reply.time{response_code}

Documentation

Index

Constants

View Source
const BPFFilter = "udp port 53"

Variables

This section is empty.

Functions

func Watch

func Watch(iface, addr string, includeQuery bool) error

Watch starts watching iface and sends metrics to addr.

Types

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

Watcher captures packets and logs stats to statsd.

func (*Watcher) HandlePacket

func (w *Watcher) HandlePacket(p gopacket.Packet) error

HandlePacket handles a single packet.

func (*Watcher) Watch

func (w *Watcher) Watch() error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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