Skip to content

nf/stathatd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

stathatd is a small daemon for reporting to StatHat (stathat.com)

The daemon listens on a TCP port, reads a single line from each connecting
client, and increments a stathat counter named by that line.

Install stathatd:
	go get github.com/nf/stathatd

Start the daemon with your stathat user key:
  stathatd [email protected]

Increment the 'hello' stat by one:
  echo hello | nc localhost 6007

The idea is that stathatd can be easily hooked into parts of your system.
For example, I am tracking each invocation of the 'go' command with this
wrapper script that lives at $HOME/bin/go:

	#!/bin/bash
	
	echo "go" | nc localhost 6007
	if [ "$1" != "" ]; then
	  echo "go $1" | nc localhost 6007
	fi
	$HOME/go/bin/go $@
	exit $?

Any questions, mail me.

Andrew Gerrand <[email protected]>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages