diff --git a/pkg/nginxprocess/process.go b/pkg/nginxprocess/process.go index 9d95e6731..2224916b0 100644 --- a/pkg/nginxprocess/process.go +++ b/pkg/nginxprocess/process.go @@ -28,7 +28,10 @@ type Process struct { } // IsWorker returns true if the process is a NGINX worker process. -func (p *Process) IsWorker() bool { return strings.HasPrefix(p.Cmd, "nginx: worker") } +func (p *Process) IsWorker() bool { + return strings.HasPrefix(p.Cmd, "nginx: worker") || + strings.HasPrefix(p.Cmd, "{nginx-debug} nginx: worker") +} // IsMaster returns true if the process is a NGINX master process. func (p *Process) IsMaster() bool { diff --git a/pkg/nginxprocess/process_test.go b/pkg/nginxprocess/process_test.go index fb8d4cbee..119decb7c 100644 --- a/pkg/nginxprocess/process_test.go +++ b/pkg/nginxprocess/process_test.go @@ -55,6 +55,10 @@ func TestProcess_IsNginxWorker(t *testing.T) { cmd: "nginx: cache manager process", want: false, }, + "Test 5 nginx debug": { + cmd: "{nginx-debug} nginx: worker process", + want: true, + }, } for name, tc := range testcases { t.Run(name, func(t *testing.T) {