Skip to content

Commit 164e728

Browse files
committed
Update to remove output for interim watchtower containers.
1 parent c283910 commit 164e728

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

index.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ async function list() {
352352
if (c.Status.includes("(unhealthy)")) hcStatus = "(unhealthy)"
353353
if (monContainers.includes(c.Id + "," + c.State + "," + c.Names[0] + "," + hcStatus) == false && monContainers.length !== 0) {
354354
// exclude exited status if set
355-
if (EXCLUDE_EXITED == 'true' && c.State.toLocaleLowerCase() == 'exited') {
355+
if (EXCLUDE_EXITED == 'true' && c.State.toLocaleLowerCase() == 'exited' && (typeof query !== 'undefined' && query)) {
356356
// ignore
357357
}
358358
else {
@@ -405,10 +405,11 @@ async function list() {
405405
monContainers.forEach(c => {
406406
let delArray = newConArray.filter(nc => nc.includes(c.split(",")[0]));
407407
// if no match in history array and latest scan, then is deleted
408-
if(delArray.length==0 && EXCLUDE_EXITED !== 'true'){
408+
if(delArray.length==0 && EXCLUDE_EXITED !== 'true' && (typeof c.Id !== 'undefined' && c.Id)){
409409
var output = c.split(",")[2].replace("/","") + ": exited"
410410
if(SHA.toLowerCase()=='true'){
411-
output += " " + c.ImageID
411+
output += " " + c.Id
412+
console.log(c);
412413
}
413414
console.log(" - " + output);
414415
//send(output)

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "monocker",
3-
"version": "2.13.1",
3+
"version": "2.13.2",
44
"description": "Monitors and alerts for docker containers state changes",
55
"type": "module",
66
"main": "index.js",

0 commit comments

Comments
 (0)