Skip to content

Commit

Permalink
Merge pull request #34 from alertlogic/checkin_aws
Browse files Browse the repository at this point in the history
Pass azcollect/checkin properties as is for AWS collectors
  • Loading branch information
kkuzmin authored Dec 4, 2019
2 parents d7a7535 + c0a1bd8 commit f25e277
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
9 changes: 1 addition & 8 deletions azcollectc.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,11 @@ class AzcollectC extends AlServiceC {

_doCheckinAws(checkinValues) {
'use strict';
let checkinBody = {
version : checkinValues.version,
status : checkinValues.status,
error_code : checkinValues.error_code,
details : checkinValues.details,
statistics : checkinValues.statistics
};
const type = this._collectorType;
var functionName = encodeURIComponent(checkinValues.functionName);
var checkinUrl = `/aws/${type}/checkin/${checkinValues.awsAccountId}/` +
`${checkinValues.region}/${functionName}`;
return this._doSendCheckin(checkinUrl, checkinBody);
return this._doSendCheckin(checkinUrl, checkinValues);
}

_doRegistrationAws(registrationValues) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@alertlogic/al-collector-js",
"version": "1.4.0",
"version": "1.4.1",
"license": "MIT",
"description": "Alert Logic Collector Common Library",
"repository": {
Expand Down
3 changes: 3 additions & 0 deletions test/al_mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ const AZURE_CHECKIN_VALUES = {

const AZCOLLECT_CHECKIN_QUERY = {
body : {
awsAccountId: '1234567890',
functionName: 'test-function',
region: 'us-east-1',
version: '1.0.0',
status: 'ok',
error_code: undefined,
Expand Down

0 comments on commit f25e277

Please sign in to comment.