sapling/eden
Wez Furlong d7cd07e0eb add CommandCollector utility for monitoring purposes
Summary:
This is a utility that is intended to be consumed by our
fbagent monitoring infrastructure.

The typical pattern at FB is that fbagent is configured via monitoring config
to pull data from the hosts that belong to a thrift tier and then push that
into ODS.

Since our model is a bit different we don't fit that pattern; eden runs as a
process per user on a host, and is accessible only via unix domain socket.

That means that we need to use a CommandCollector to sample data from our eden
servers, and that's where this tool comes in.

The intent is to use configerator to set up the command collector to run the tool
using a command line that looks something like this:

```
eden-fb303-collector /data/users/*/.eden/socket --tierName %%TIER_NAME%% --counterRegexes '[".*mount.*.rate.60"]'
```

Note that we rely on the shell to expand the glob to find plausible eden sockets.

The `counterRegexes` parameter is a JSON encoded array listing the pcre regexes
that should be used to select the counters that we want to place into ODS.

I chose to pass these as JSON encoded parameters because it will allow the list
of counters to be configured easily in configerator (python) code alongside the
CommandCollector definition and pass that down to the collector.  That makes it
a no-brainer to `json.dumps()` and pass the list down.

This collector emits three entities for each key:

* user@hostname - allows us to distinguish different users on the same host.
* hostname - aggregated by fbagent for all instances on the same host.
* TIER - aggregated by fbagent for all instances on the same tier.

I could add more levels of aggregation to this; it is common to track by region
and cluster, but I'm not sure how many of these we really want; any strong preferences?

The intent is that we'll deploy this alongside the edenfs binary that we
package with packman and then have a separate configerator diff to add the
CommandCollector to enable collection for the dev tiers.

D4797021 and D4797101 are the related diffs to hook this up in the right places

Reviewed By: bolinfest

Differential Revision: D4789717

fbshipit-source-id: 4a1d58c50847a8ca99043542cd2f0415da783ad7
2017-03-29 12:50:22 -07:00
..
docs implement EdenMount::checkout() 2017-02-15 20:33:31 -08:00
facebook add CommandCollector utility for monitoring purposes 2017-03-29 12:50:22 -07:00
fs add .eden "magic" dir 2017-03-24 23:07:42 -07:00
fuse leave getlk and setlk as nullptr to implement locking 2017-03-24 23:07:42 -07:00
hooks fixup paths used in post-clone and LameThriftClient 2017-01-23 23:54:38 -08:00
integration add .eden "magic" dir 2017-03-24 23:07:42 -07:00
utils add suffixes() and rsuffixes() iteration to composed path classes 2017-03-21 21:06:28 -07:00
DEFS buckification: remove various non-determinism from build files 2017-03-23 11:09:28 -07:00