Skip to content

Commit

Permalink
Fixed variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
phufool committed Oct 23, 2013
1 parent 2297035 commit abf984e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions conf/carbon.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -382,5 +382,6 @@ MAX_AGGREGATION_INTERVALS = 5
# receiver, set this to False
# LOG_LISTENER_CONN_SUCCESS = True
#
# To use our own rule, set USE_RULE_MANAGER = false
USE_RULE_MANAGER = false
# To use our own "sumall" rule, set USE_RULE_MANAGER = sumall
# To use aggregation-rules.conf, set USE_RULE_MANAGER = rules
AGGREGATOR_RULE_METHOD = sumall
4 changes: 2 additions & 2 deletions lib/carbon/aggregator/receiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def process(metric, datapoint):

aggregate_metrics = []

if settings.USE_RULE_MANAGER == True:
if settings.AGGREGATOR_RULE_METHOD == "rules":
for rule in RuleManager.rules:
aggregate_metric = rule.get_aggregate_metric(metric)

Expand All @@ -29,7 +29,7 @@ def process(metric, datapoint):

buffer.input(datapoint)
# Custom rule to sum metrics
else:
elif settings.AGGREGATOR_RULE_METHOD == "sumall":
sum_index = metric.find(".sum.")
if sum_index != -1:
aggregate_metric = metric[:sum_index] + ".sum_all.hosts"
Expand Down

0 comments on commit abf984e

Please sign in to comment.