prometheus-community / windows_exporter

Prometheus exporter for Windows machines

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Version 0.25.X ignore enable_iis_worker_process

rivoalrivoal opened this issue · comments

Hello

Since version 0.25, the w3wp doesn't have IIS Site name because of the EnableWorkerProcess variable.
But, this variable doesn't work.

It's not because there are "kingpin" and not "app" here ?

https://github.com/prometheus-community/windows_exporter/blob/master/pkg/collector/process/process.go#L93C24-L93C31

My config file

collectors:
  enabled: cache,cpu,cpu_info,cs,iis,logical_disk,logon,memory,netframework_clrexceptions,netframework_clrinterop,netframework_clrjit,netframework_clrloading,netframework_clrlocksandthreads,netframework_clrmemory,netframework_clrremoting,netframework_clrsecurity,net,os,process,service,tcp,time,smtp

collector:
  process:
    enable_iis_worker_process: true

And the windows_exporter --help does not indicate the option.

Yes that seems to be the issue: https://github.com/prometheus-community/windows_exporter/blob/master/pkg/collector/process/process.go#L93C24-L93C31 should be app.Flag

But also just to mention, your config file should be:

collectors:
  enabled: cache,cpu,cpu_info,cs,iis,logical_disk,logon,memory,netframework_clrexceptions,netframework_clrinterop,netframework_clrjit,netframework_clrloading,netframework_clrlocksandthreads,netframework_clrmemory,netframework_clrremoting,netframework_clrsecurity,net,os,process,service,tcp,time,smtp

collector:
  process:
      iis: true

@breed808 I am going to create a PR to fix this. Ok ?

Yep, go right ahead. I'm happy to review.

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.