Skip to content

procstat plugin does not work on Windows Server and pattern searches with WMI query #8476

Closed
@Dubdelo

Description

Hello,
found a bug with monitoring a Windows process.
If you use pattern searches with forms of a WMI query.
It does not work with telegraf versions newer as v1.14.5.

Example Config (working with telegraf 1.14.5):

[[inputs.procstat]]
   pattern = "%tomcat%"
   pid_finder = "native"
   interval = "1m"

System info:

OS Windows Server 2016 / 2019
Version telegraf-1.14.5_windows_amd64.zip

Steps to reproduce:

  1. Use telegraf 1.14.5 and setup a process to monitor like my example above
  2. Now update telegraf to an newer version. With the WMI query, it says process is not running.

Configured as the readme says:
https://github.com/influxdata/telegraf/tree/master/plugins/inputs/procstat

Test output:

Telegraf 1.14.5

procstat_lookup,host=serverdev12,pattern=%tomcat%,pid_finder=native,result=success pid_count=3i,result_code=0i,running=3i 1606464960000000000

Telegraf 1.15.0

procstat_lookup,host=serverdev12,pattern=%tomcat%,pid_finder=native,result=success pid_count=0i,result_code=0i,running=0i 1606470057000000000

Telegraf 1.16.2

procstat_lookup,host=serverdev12,pattern=%tomcat%,pid_finder=native,result=success pid_count=0i,result_code=0i,running=0i 1606464970000000000

Telegraf 1.17.0

procstat_lookup,host=serverdev12,pattern=%tomcat%,pid_finder=native,result=success pid_count=0i,result_code=0i,running=0i 1606464970000000000

Metadata

Assignees

No one assigned

    Labels

    area/procstatarea/windowsRelated to windows plugins (win_eventlog, win_perf_counters, win_services)bugunexpected problem or unintended behaviorplatform/windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions