Skip to content

Commit 4884fe1

Browse files
committed
fix for exited showing
1 parent ce38b6b commit 4884fe1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

index.js

+2-2
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') || (typeof query !== 'undefined' && query)) {
355+
if ((EXCLUDE_EXITED == 'true' && c.State.toLocaleLowerCase() == 'exited') || ((typeof query !== 'undefined' && query) || c.Id)) {
356356
// ignore
357357
}
358358
else {
@@ -405,7 +405,7 @@ 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') || (typeof c.Id !== 'undefined' && c.Id)){
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'){
411411
output += " " + c.Id

package.json

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

0 commit comments

Comments
 (0)