We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe295f9 commit f234f09Copy full SHA for f234f09
plugin/input/journalctl/reader.go
@@ -7,6 +7,7 @@ import (
7
"io"
8
"os/exec"
9
"strings"
10
+ "syscall"
11
12
"github.com/prometheus/client_golang/prometheus"
13
"go.uber.org/zap"
@@ -94,10 +95,15 @@ func (r *journalReader) start() error {
94
95
}
96
97
go r.readLines(out, r.config)
98
+ go func() {
99
+ if err := r.cmd.Wait(); err != nil {
100
+ r.config.logger.Fatal("journalctl command exited with error", zap.Error(err))
101
+ }
102
+ }()
103
104
return nil
105
106
107
func (r *journalReader) stop() error {
- return r.cmd.Process.Kill()
108
+ return r.cmd.Process.Signal(syscall.SIGTERM)
109
0 commit comments