Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing instance ID bug

  • Loading branch information...
commit 725be62e9cf147c875948b93bc8f5fd77e568a0c 1 parent c267c01
@franklovecchio franklovecchio authored
Showing with 4 additions and 4 deletions.
  1. +2 −2 modules/dao.js
  2. +2 −2 run/client.js
View
4 modules/dao.js
@@ -65,10 +65,10 @@ DaoManagerModule.prototype.postCloudwatch = function (metricName, unit, value) {
params['MetricData.member.1.Unit'] = unit;
params['MetricData.member.1.Value'] = value;
params['MetricData.member.1.Dimensions.member.1.Name'] = 'InstanceID';
- params['MetricData.member.1.Dimensions.member.1.Value'] = process.env[Module.constants.strings.IP].replace('.', '-');
+ params['MetricData.member.1.Dimensions.member.1.Value'] = process.env[Module.constants.strings.INSTANCE_ID];
Module.logger.write(Module.constants.levels.INFO, 'CloudWatch Namespace: ' + process.env[Module.constants.strings.CLOUDWATCH_NAMESPACE]);
- Module.logger.write(Module.constants.levels.INFO, 'CloudWatch IP: ' + process.env[Module.constants.strings.IP].replace('.', '-'));
+ Module.logger.write(Module.constants.levels.INFO, 'CloudWatch IP: ' + process.env[Module.constants.strings.INSTANCE_ID]);
Module.logger.write(Module.constants.levels.INFO, 'CloudWatch MetricName: ' + metricName);
Module.logger.write(Module.constants.levels.INFO, 'CloudWatch Unit: ' + unit);
Module.logger.write(Module.constants.levels.INFO, 'CloudWatch Value: ' + value);
View
4 run/client.js
@@ -53,8 +53,8 @@ function NodeMonitor() {
utilities.parseCommandLineOptions(function () {
/* Validate credentials */
credentials.check(function () {
- utilities.getInternalIP(function (ip) {
- process.env[constants.strings.IP] = ip;
+ utilities.getInstanceId(function (id) {
+ process.env[constants.strings.INSTANCE_ID] = id;
});
callback();
});

0 comments on commit 725be62

Please sign in to comment.
Something went wrong with that request. Please try again.