<commit_before>canaryd
=======

`canaryd` is an aggregator for measurements taken by [`sensord`](https://github.com/canaryio/sensord).  It connects to each sensor and streams measurements into a Redis instance.  Those measurements are then made available via a simple HTTP API.

### Build

```sh
$ go get github.com/canaryio/canaryd
$ cd $GOPATH/src/github.com/canaryio/canaryd
$ godep get
$ godep go build
```

### Configuration

`canaryd` is configured via flags.

```sh
$ ./canaryd -h
Usage of ./canaryd:
  -port="5000": port the HTTP server should bind to
  -redis_url="redis://localhost:6379": redis url
```

### Usage Example

```sh
# connect to a single local sensor
$ godep go run canaryd.go --sensord_url http://admin:admin@localhost:5001/measurements

2014/05/14 21:15:42 fn=main listening=true port=5000
2014/05/14 21:15:42 fn=ingestor url=http://admin:admin@localhost:5001/measurements connect=success
2014/05/14 21:15:42 fn=recorder check_id=http-nbviewer.ipython.org measurement_id=c256ddaf-bbc5-402f-79fb-641c60f512a0
2014/05/14 21:15:43 fn=recorder check_id=https-www.hostedgraphite.com measurement_id=c72f8c4a-66e6-4c59-6f9e-497953d7dd6c<commit_msg>update flags<commit_after>canaryd
=======

`canaryd` is an aggregator for measurements taken by [`sensord`](https://github.com/canaryio/sensord).  It connects to each sensor and streams measurements into a Redis instance.  Those measurements are then made available via a simple HTTP API.

### Build

```sh
$ go get github.com/canaryio/canaryd
$ cd $GOPATH/src/github.com/canaryio/canaryd
$ godep get
$ godep go build
```

### Configuration

`canaryd` is configured via flags.

```sh
$ ./canaryd -h
Usage of ./canaryd:
  -port="5000": port the HTTP server should bind to
  -redis_url="redis://localhost:6379": redis url
  -sensord_url=[]: List of sensors
```

### Usage Example

```sh
# connect to a single local sensor
$ godep go run canaryd.go --sensord_url http://admin:admin@localhost:5001/measurements

2014/05/14 21:15:42 fn=main listening=true port=5000
2014/05/14 21:15:42 fn=ingestor url=http://admin:admin@localhost:5001/measurements connect=success
2014/05/14 21:15:42 fn=recorder check_id=http-nbviewer.ipython.org measurement_id=c256ddaf-bbc5-402f-79fb-641c60f512a0
2014/05/14 21:15:43 fn=recorder check_id=https-www.hostedgraphite.com measurement_id=c72f8c4a-66e6-4c59-6f9e-497953d7dd6c
{'fraction_non_alphanumeric': 0.12806424344885883, 'fraction_numerical': 0.09636517328825021, 'mean_word_length': 5.180156657963447, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6753151', 'n_tokens_mistral': 1016, 'n_tokens_neox': 855, 'n_words': 210}