Skip to content

Commit 8233ae9

Browse files
committed
log the stoppedCode
1 parent 9422da4 commit 8233ae9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ exports.handler = async (event, context) => {
1919
const stoppedReason = event.detail.stoppedReason;
2020

2121
if(lastStatus === 'STOPPED' && stopCode) {
22-
console.error(`[acct: ${account}] task ${service} in ${region} STOPPED unexpectedly. Reason: ${stoppedReason}.`);
22+
console.error(`[acct: ${account}] task ${service} in ${region} STOPPED unexpectedly with code ${stopCode}. Reason: ${stoppedReason}.`);
2323

2424
await webhook.send({
25-
text: `_[acct: ${account}]_ task *${service}* in ${region} *STOPPED* unexpectedly.\n\t*Reason:* ${stoppedReason}.`
25+
text: `_[acct: ${account}]_ task *${service}* in ${region} *STOPPED* unexpectedly with code ${stopCode}.\n\t*Reason:* ${stoppedReason}.`
2626
});
2727
} else {
2828
console.log(`[acct: ${account}] task ${service} in ${region} is ${lastStatus}.`);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ecs-watchdog",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "Post a Slack notification to a channel when an AWS ECS task goes into an unexpected `STOPPED` status",
55
"repository": {
66
"type": "git"

0 commit comments

Comments
 (0)