parent
6120c65a5a
commit
74667cd681
|
@ -32,7 +32,7 @@ type Procstat struct {
|
|||
SystemdUnit string
|
||||
CGroup string `toml:"cgroup"`
|
||||
PidTag bool
|
||||
WinService string `tom:"win_service"`
|
||||
WinService string `toml:"win_service"`
|
||||
|
||||
finder PIDFinder
|
||||
|
||||
|
@ -281,7 +281,6 @@ func (p *Procstat) updateProcesses(acc telegraf.Accumulator, prevInfo map[PID]Pr
|
|||
|
||||
// Create and return PIDGatherer lazily
|
||||
func (p *Procstat) getPIDFinder() (PIDFinder, error) {
|
||||
|
||||
if p.finder == nil {
|
||||
f, err := p.createPIDFinder()
|
||||
if err != nil {
|
||||
|
|
|
@ -25,7 +25,6 @@ func getService(name string) (*mgr.Service, error) {
|
|||
}
|
||||
|
||||
func queryPidWithWinServiceName(winServiceName string) (uint32, error) {
|
||||
|
||||
srv, err := getService(winServiceName)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
|
|
Loading…
Reference in New Issue