mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
d7cd07e0eb
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 |
||
---|---|---|
.. | ||
docs | ||
fs | ||
fuse | ||
hooks | ||
integration | ||
utils | ||
DEFS |