Skip to content

Commit

Permalink
Make sure the service name is the same everywhere (#6)
Browse files Browse the repository at this point in the history
* Make sure the service name is the same everywhere

* fallback to default namespace
  • Loading branch information
svdgraaf authored and nicka committed Jul 14, 2017
1 parent 6cc2307 commit 54baf00
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions cloudformation/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Resources:
Value: ${self:provider.environment.STAGE}
EvaluationPeriods: 1
MetricName: BuyPrice
Namespace: Coinboss
Namespace: ${self:service}
Period: 60
Statistic: Average
Threshold: ${self:provider.environment.LOW_BUY_PRICE_THRESHOLD}
Expand All @@ -63,7 +63,7 @@ Resources:
Value: ${self:provider.environment.STAGE}
EvaluationPeriods: 1
MetricName: BuyPrice
Namespace: Coinboss
Namespace: ${self:service}
Period: 300
Statistic: Average
Threshold: ${self:provider.environment.HIGH_BUY_PRICE_THRESHOLD}
Expand All @@ -85,7 +85,7 @@ Resources:
Value: ${self:provider.environment.STAGE}
EvaluationPeriods: 1
MetricName: SellPrice
Namespace: Coinboss
Namespace: ${self:service}
Period: 300
Statistic: Average
Threshold: ${self:provider.environment.LOW_SELL_PRICE_THRESHOLD}
Expand All @@ -107,7 +107,7 @@ Resources:
Value: ${self:provider.environment.STAGE}
EvaluationPeriods: 1
MetricName: SellPrice
Namespace: Coinboss
Namespace: ${self:service}
Period: 60
Statistic: Average
Threshold: ${self:provider.environment.HIGH_SELL_PRICE_THRESHOLD}
Expand Down
2 changes: 1 addition & 1 deletion lib/cloudWatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default class CloudWatch {

constructor() {
this.cloudwatch = new AWS.CloudWatch({ region: process.env.REGION || 'eu-central-1' });
this.namespace = 'Coinboss';
this.namespace = process.env.SERVICE_NAME || 'coinboss';
}

putPriceMetric(args) {
Expand Down

0 comments on commit 54baf00

Please sign in to comment.