From 1be1000bd367d803c6f9f12f15e25567e17fca7e Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Mon, 13 Jul 2026 14:23:11 +0000 Subject: [PATCH 01/17] docke-compose --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..9e4a3f5 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1 @@ +services: \ No newline at end of file From 42b6214276989e8dd618fb007ded08eac9beeb5e Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Mon, 13 Jul 2026 14:24:59 +0000 Subject: [PATCH 02/17] docke-compose --- docker-compose.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 9e4a3f5..94f06d3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1 +1,5 @@ -services: \ No newline at end of file +services: + sysmonitor: + build: + context: . + \ No newline at end of file From c07cca675f23e4a1099f6d71cda049a4f49b7b98 Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Mon, 13 Jul 2026 14:25:22 +0000 Subject: [PATCH 03/17] docke-compose --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 94f06d3..077ac2f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,4 +2,6 @@ services: sysmonitor: build: context: . + image: linux-sysmonitor:v2 + \ No newline at end of file From 7cd6345f3051b4b14328b409e05ab76a98a8ed56 Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Mon, 13 Jul 2026 14:25:45 +0000 Subject: [PATCH 04/17] docke-compose --- docker-compose.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 077ac2f..3263def 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,5 +3,6 @@ services: build: context: . image: linux-sysmonitor:v2 - + volumes: + - sysmonitor_logs:/app/logs \ No newline at end of file From 9de43bd3eb0afb21082e3120cd96b9ce49fda7f5 Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Mon, 13 Jul 2026 14:26:05 +0000 Subject: [PATCH 05/17] docke-compose --- docker-compose.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 3263def..1e99039 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,6 @@ +volumes: + sysmonitor_logs: + services: sysmonitor: build: From 376f2bd5fcda50e58b03a2372a820397a262a7f0 Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Mon, 13 Jul 2026 14:56:33 +0000 Subject: [PATCH 06/17] docke-compose --- docker-compose.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1e99039..a726ea4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ volumes: sysmonitor_logs: - + services: sysmonitor: build: @@ -8,4 +8,5 @@ services: image: linux-sysmonitor:v2 volumes: - sysmonitor_logs:/app/logs - \ No newline at end of file + environment: + - LOG_LEVEL=INFO \ No newline at end of file From 4f6c989462f84c352a864546c8771aa87f9e412c Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Mon, 13 Jul 2026 15:07:24 +0000 Subject: [PATCH 07/17] docke-compose --- docker-compose.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index a726ea4..b9bf327 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,4 +9,6 @@ services: volumes: - sysmonitor_logs:/app/logs environment: - - LOG_LEVEL=INFO \ No newline at end of file + - LOG_LEVEL=INFO + - CHECK_INTERVAL: 60 + restart: unless-stopped From 638961ef23d554ecec774718bed4ad866471350f Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Mon, 13 Jul 2026 15:07:58 +0000 Subject: [PATCH 08/17] docke-compose --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index b9bf327..5a393b0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,6 +9,6 @@ services: volumes: - sysmonitor_logs:/app/logs environment: - - LOG_LEVEL=INFO + - LOG_LEVEL: INFO - CHECK_INTERVAL: 60 restart: unless-stopped From eafec0600d6000fbdac002d366586708b292b651 Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Mon, 13 Jul 2026 15:09:06 +0000 Subject: [PATCH 09/17] docke-compose --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5a393b0..2752eee 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,6 +9,6 @@ services: volumes: - sysmonitor_logs:/app/logs environment: - - LOG_LEVEL: INFO - - CHECK_INTERVAL: 60 + - LOG_LEVEL=INFO + - CHECK_INTERVAL=60 restart: unless-stopped From bcfa916e667cdc1423cdd73615f9b5bddca800ba Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Tue, 14 Jul 2026 07:03:38 +0000 Subject: [PATCH 10/17] docker-compose --- docker-compose.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2752eee..f954afe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,4 +11,5 @@ services: environment: - LOG_LEVEL=INFO - CHECK_INTERVAL=60 - restart: unless-stopped + # restart: unless-stopped + # Enable this after health-check.sh is converted to a long-running monitoring service. From d2fb34698024315b754a6878ff32c8248cbc5941 Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Tue, 14 Jul 2026 08:28:47 +0000 Subject: [PATCH 11/17] docker-compose --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index f954afe..927ca78 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,3 +13,5 @@ services: - CHECK_INTERVAL=60 # restart: unless-stopped # Enable this after health-check.sh is converted to a long-running monitoring service. + webserver: + image: ngnix:alpine From 2cd7a5118bacb5ce9dd4ad266be85f8789578e03 Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Tue, 14 Jul 2026 08:31:49 +0000 Subject: [PATCH 12/17] docker-compose --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 927ca78..0007167 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,4 +14,4 @@ services: # restart: unless-stopped # Enable this after health-check.sh is converted to a long-running monitoring service. webserver: - image: ngnix:alpine + image: nginx:alpine From 4f17d842b00dc09b15ff8206bdef58de0680b651 Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Tue, 14 Jul 2026 08:38:36 +0000 Subject: [PATCH 13/17] docker-compose --- docker-compose.yml | 2 +- linux-sysmonitor/health-check.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0007167..026e99f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,4 +14,4 @@ services: # restart: unless-stopped # Enable this after health-check.sh is converted to a long-running monitoring service. webserver: - image: nginx:alpine + image: nginx:alpine \ No newline at end of file diff --git a/linux-sysmonitor/health-check.sh b/linux-sysmonitor/health-check.sh index 9b4e4ef..d2ef3b5 100755 --- a/linux-sysmonitor/health-check.sh +++ b/linux-sysmonitor/health-check.sh @@ -6,7 +6,7 @@ set -uo pipefail LOGFILE="logs/$(date +"%Y-%m-%d-%H-%M").log" - +TARGET_HOST="${TARGET_HOST:-8.8.8.8}" if [ -d logs ]; then : @@ -91,7 +91,7 @@ check_top_processes() { check_top_processes check_network () { - NETWORK_CHECK=$(ping -c 4 8.8.8.8) + NETWORK_CHECK=$(ping -c 4 "$TARGET_HOST") PING_STATUS=$? PING_LATENCY=$(echo "$NETWORK_CHECK"| grep "rtt" | awk '{print $4}' | awk -F'/' '{print $2}') if [ $PING_STATUS -eq 0 ] ; then From 14ce5b9d9a57bd799e078f4476a8048215f628f9 Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Tue, 14 Jul 2026 08:39:14 +0000 Subject: [PATCH 14/17] docker-compose --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 026e99f..7531c98 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,7 @@ services: environment: - LOG_LEVEL=INFO - CHECK_INTERVAL=60 + - TARGET_HOST=webserver # restart: unless-stopped # Enable this after health-check.sh is converted to a long-running monitoring service. webserver: From f43d9f87d5be26deb9628ca0fc6514f99a326b6b Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Tue, 14 Jul 2026 08:41:01 +0000 Subject: [PATCH 15/17] docker-compose --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 7531c98..234f99d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,6 +12,8 @@ services: - LOG_LEVEL=INFO - CHECK_INTERVAL=60 - TARGET_HOST=webserver + depends_on: + - webserver # restart: unless-stopped # Enable this after health-check.sh is converted to a long-running monitoring service. webserver: From e1cd6f55a5889b2f571920f3a525173a93163c63 Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Tue, 14 Jul 2026 08:42:34 +0000 Subject: [PATCH 16/17] docker-compose --- docker-compose.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 234f99d..090acbb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,3 @@ -volumes: - sysmonitor_logs: - services: sysmonitor: build: @@ -17,4 +14,7 @@ services: # restart: unless-stopped # Enable this after health-check.sh is converted to a long-running monitoring service. webserver: - image: nginx:alpine \ No newline at end of file + image: nginx:alpine + +volumes: + sysmonitor_logs: From 8fa91057f0239023856cd40aef45c5c48390b929 Mon Sep 17 00:00:00 2001 From: PuneethM-06 Date: Tue, 14 Jul 2026 08:43:24 +0000 Subject: [PATCH 17/17] docker-compose --- linux-sysmonitor/health-check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-sysmonitor/health-check.sh b/linux-sysmonitor/health-check.sh index d2ef3b5..08fe279 100755 --- a/linux-sysmonitor/health-check.sh +++ b/linux-sysmonitor/health-check.sh @@ -100,7 +100,7 @@ check_network () { write_log "CRITICAL" "No network connectivity" fi } -#check_network +check_network check_ports (){ PORTS=$(ss -tlnp | awk '{print $4}'| awk -F':' '{print $2}' | paste -sd ' ' -)