Skip to content

Commit

Permalink
Merged pull request #46 from nathanielc/nc-stats
Browse files Browse the repository at this point in the history
Expose metrics via HTTP
  • Loading branch information
nathanielc committed Jul 27, 2017
2 parents 63efe5f + 04e6f4c commit 62da792
Show file tree
Hide file tree
Showing 254 changed files with 46,250 additions and 154 deletions.
18 changes: 0 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +0,0 @@
*.pyc
*.swp
tags
docs/html
.ropeproject
build
pkg
bin
.vagrant
*.test
meta/*
morgothd
morgoth.db
logs/
debugging/mgof/
debugging/kstest/
morgoth.yaml
/morgoth_*
48 changes: 45 additions & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

[[constraint]]
branch = "master"
branch = "nc-udf-server-stop"
name = "github.com/influxdata/kapacitor"
[[constraint]]
branch = "master"
name = "github.com/prometheus/client_golang"
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,28 @@ It has also been show that if the item with low frequency are uniformly random t
This means that as Morgoth continues to processes windows of data its memory usage will grow as the log of the number of windows and can reach a stable upper bound.



## Metrics

Morgoth exposes metrics about each detector and fingerprinter.
The metrics are exposed as a promethues `/metrics` endpoint over HTTP.
By default the metrics HTTP endpoint binds to `:6767`.

>NOTE: Using the metrics HTTP endpoint only makes sense if you are using Morgoth in socket mode as otherwise each new process would collide on the bind port.
Metrics will have some or all of these labels:

* task - the Kapacitor task ID.
* node - the ID of the morgoth node within the Kapacitor task.
* group - the Kapacitor group ID.
* fingerprinter - the unique name for the specific fingerprinter, i.e. `sigma-0`.


The most useful metric for debugging why Morgoth is not behaving as expected is likely to be the `morgoth_unique_fingerprints` gauge.
The metric reports the number of unique fingerprints each fingerprinter is tracking.
This is useful because if the number is large or growing with each new window its likely that the fingerprinter is erroneously marking every window as anomalous.
By providing visibility into each fingerprinter, Morgoth can be tuned as needed.

Using Kapacitor's scraping service you can scrape the Morgoth UDF process for these metrics and consume them within Kapacitor.
See this [tutorial](https://docs.influxdata.com/kapacitor/latest/pull_metrics/scraping-and-discovery/) for more information.

Loading

0 comments on commit 62da792

Please sign in to comment.