Merge lp:~ziggy/graphite/whitelist into lp:~graphite-dev/graphite/main
Status: | Superseded |
---|---|
Proposed branch: | lp:~ziggy/graphite/whitelist |
Merge into: | lp:~graphite-dev/graphite/main |
Diff against target: |
405 lines (+304/-0) (has conflicts) 5 files modified
carbon/bin/carbon-cache.py (+162/-0) carbon/conf/carbon.conf.example (+12/-0) carbon/conf/whitelist (+1/-0) carbon/lib/carbon/protocols.py (+59/-0) carbon/lib/carbon/writer.py (+70/-0) Text conflict in carbon/bin/carbon-cache.py Text conflict in carbon/conf/carbon.conf.example Text conflict in carbon/lib/carbon/protocols.py |
To merge this branch: | bzr merge lp:~ziggy/graphite/whitelist |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
chrismd | Needs Fixing | ||
Review via email: mp+45710@code.launchpad.net |
This proposal has been superseded by a proposal from 2011-12-14.
Description of the change
We would be completely overwhelmed by the volume of metrics flowing into Graphite if we accepted everything that came our way. I can't control what is sent to Graphite, but I can control what is accepted into Graphite. To implement that, we've created whitelist and blacklist functionality that respectively allows or denies metrics entry into Graphite. This code is based on code that has been running in production for months with several thousand metrics per minute after filtering.
Each list is a file with one regular expression per line. If a metric matches a regex in the blacklist it is dropped. Only if a metric matches a regex in the whitelist will it be accepted by carbon.
For example, a whitelist consisting of the line:
^server\.load\.
will allow any metric that starts with "server.load." into carbon, unless it also matches a regex in the blacklist.
To test, uncomment the WHITELIST and/or BLACKLIST lines in carbon.conf and add one or more regular expressions to graphite/
Unmerged revisions
- 340. By Eric Ziegenhorn
-
Removed explicit directory chmod as that is not supposed to be part of this tree
- 339. By Eric Ziegenhorn
-
Add support for comments in whitelist/blacklist files
- 338. By Eric Ziegenhorn
-
Added a default whitelist entry to allow everything in
- 337. By Eric Ziegenhorn
-
Added config options for logging whitelist/blacklist misses/hits.
Moved RegexList class in to writer.py - 336. By Eric Ziegenhorn
-
Work with WHITELIST and/or BLACKLIST commented out in carbon.conf
- 335. By Eric Ziegenhorn
-
Improved comments in example carbon.conf
- 334. By Eric Ziegenhorn
-
Added blank whitelist and blacklist files
- 333. By Eric Ziegenhorn
-
Added whitelist/blacklist functionality
I personally think that this should be done through a separate proxy sitting in front of carbon-cache.py. It seems like by the time carbon accepts the request and parses it, you might as well just record it.