From 94c9c7a62434c7ec37663f2a7380ba3f34946c1d Mon Sep 17 00:00:00 2001 From: red0sena Date: Wed, 8 Nov 2023 13:13:34 +0900 Subject: [PATCH] update gcp collector fix logGroupName and time * 1000 --- collector/spot-dataset/gcp/lambda/lambda_function.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collector/spot-dataset/gcp/lambda/lambda_function.py b/collector/spot-dataset/gcp/lambda/lambda_function.py index 9aa2377..a535d45 100644 --- a/collector/spot-dataset/gcp/lambda/lambda_function.py +++ b/collector/spot-dataset/gcp/lambda/lambda_function.py @@ -39,12 +39,12 @@ def upload_cloudwatch(df_current, timestamp): cw_client = boto3.client('logs') log_event = { - 'timestamp': int(timestamp.timestamp()), + 'timestamp': int(timestamp.timestamp()) * 1000, 'message': f'GCPONDEMAND: {ondemand_count} GCPSPOT: {spot_count}' } cw_client.put_log_events( - logGroupName=GCP_CONST.LOG_GROUP_NAME, + logGroupName=GCP_CONST.SPOT_DATA_COLLECTION_LOG_GROUP_NAME, logStreamName=GCP_CONST.LOG_STREAM_NAME, logEvents=[log_event] )