From 344daabaa720daa273e78fca79e97ae80522123a Mon Sep 17 00:00:00 2001 From: michelletandya Date: Tue, 30 Mar 2021 23:26:06 +0000 Subject: [PATCH 1/2] Update windows containerd config file to run without errors --- README.md | 6 +++--- config/windows-containerd-monitor-filelog.json | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d3709fd15..87a212dd4 100644 --- a/README.md +++ b/README.md @@ -221,13 +221,13 @@ To develop NPD on Windows you'll need to setup your Windows machine for Go devel ```powershell # Run these commands in the node-problem-detector directory. -# Build +# Build in MINGW64 Window make clean windows-binaries -# Test +# Test in MINGW64 Window make test -# Run with containerd log monitoring enabled. (Assumes containerd is installed.) +# Run with containerd log monitoring enabled in Powershell/Command Prompt. (Assumes containerd is installed.) %CD%\bin\windows_amd64\node-problem-detector.exe --logtostderr --enable-k8s-exporter=false --config.system-log-monitor=%CD%\config\windows-containerd-monitor-filelog.json ``` diff --git a/config/windows-containerd-monitor-filelog.json b/config/windows-containerd-monitor-filelog.json index 1c9a36aae..b6f94d77a 100644 --- a/config/windows-containerd-monitor-filelog.json +++ b/config/windows-containerd-monitor-filelog.json @@ -2,10 +2,10 @@ "plugin": "filelog", "pluginConfig": { "timestamp": "^time=\"(\\S*)\"", - "message": "msg=\"([^\n]*)\"", - "timestampFormat": "2006-01-02T15:04:05.999999999-07:00" + "message": "msg=\"?([^\n]*)\"?", + "timestampFormat": "2006-01-02T15:04:05.999999999Z" }, - "logPath": "C:\\Program Files\\containerd\\containerd.log", + "logPath": "C:\\etc\\kubernetes\\logs\\containerd.log", "lookback": "5m", "bufferSize": 10, "source": "containerd", From 8acd791fa7eb9fe83e65ec6fd4ea0fd39d1a5a87 Mon Sep 17 00:00:00 2001 From: michelletandya Date: Thu, 1 Apr 2021 23:19:48 +0000 Subject: [PATCH 2/2] update instructions for running NPD on windows --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 87a212dd4..e0dee9fab 100644 --- a/README.md +++ b/README.md @@ -227,7 +227,7 @@ make clean windows-binaries # Test in MINGW64 Window make test -# Run with containerd log monitoring enabled in Powershell/Command Prompt. (Assumes containerd is installed.) +# Run with containerd log monitoring enabled in Command Prompt. (Assumes containerd is installed.) %CD%\bin\windows_amd64\node-problem-detector.exe --logtostderr --enable-k8s-exporter=false --config.system-log-monitor=%CD%\config\windows-containerd-monitor-filelog.json ```