Skip to content

Commit

Permalink
iis: Fix label for Default Web Site
Browse files Browse the repository at this point in the history
Signed-off-by: Jan-Otto Kröpke <[email protected]>
  • Loading branch information
jkroepke committed Nov 30, 2024
1 parent 40ff2f2 commit c68a8f1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .run/all.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<configuration default="false" name="all" type="GoApplicationRunConfiguration" factoryName="Go Application" folderName="run">
<module name="windows_exporter" />
<working_directory value="$PROJECT_DIR$" />
<parameters value="--web.listen-address=127.0.0.1:9182 --log.level=info --collectors.enabled=ad,adcs,adfs,cache,container,cpu,cpu_info,cs,dfsr,dhcp,diskdrive,dns,exchange,filetime,fsrmquota,hyperv,iis,license,logical_disk,logon,memory,mscluster,msmq,mssql,net,netframework,nps,os,pagefile,perfdata,physical_disk,printer,process,remote_fx,scheduled_task,service,smb,smbclient,smtp,system,tcp,terminal_services,thermalzone,time,udp,update,vmware --debug.enabled" />
<parameters value="--web.listen-address=127.0.0.1:9182 --log.level=info --collectors.enabled=ad,adcs,adfs,cache,container,cpu,cpu_info,cs,dfsr,dhcp,diskdrive,dns,exchange,filetime,fsrmquota,hyperv,iis,license,logical_disk,logon,memory,mscluster,msmq,mssql,net,netframework,nps,os,pagefile,performancecounter,physical_disk,printer,process,remote_fx,scheduled_task,service,smb,smbclient,smtp,system,tcp,terminal_services,thermalzone,time,udp,update,vmware --debug.enabled" />
<sudo value="true" />
<kind value="PACKAGE" />
<package value="github.com/prometheus-community/windows_exporter/cmd/windows_exporter" />
Expand Down
22 changes: 11 additions & 11 deletions internal/collector/iis/iis.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,19 +254,19 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
if err := c.collectWebService(ch); err != nil {
errs = append(errs, fmt.Errorf("failed to collect Web Service metrics: %w", err))
}
/*
if err := c.collectAppPoolWAS(ch); err != nil {
errs = append(errs, fmt.Errorf("failed to collect APP_POOL_WAS metrics: %w", err))
}
if err := c.collectAppPoolWAS(ch); err != nil {
errs = append(errs, fmt.Errorf("failed to collect APP_POOL_WAS metrics: %w", err))
}

if err := c.collectW3SVCW3WP(ch); err != nil {
errs = append(errs, fmt.Errorf("failed to collect W3SVC_W3WP metrics: %w", err))
}

if err := c.collectWebServiceCache(ch); err != nil {
errs = append(errs, fmt.Errorf("failed to collect Web Service Cache metrics: %w", err))
}
if err := c.collectW3SVCW3WP(ch); err != nil {
errs = append(errs, fmt.Errorf("failed to collect W3SVC_W3WP metrics: %w", err))
}
if err := c.collectWebServiceCache(ch); err != nil {
errs = append(errs, fmt.Errorf("failed to collect Web Service Cache metrics: %w", err))
}
*/
return errors.Join(errs...)
}

Expand Down
2 changes: 1 addition & 1 deletion internal/collector/iis/iis_app_pool_was.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func (c *Collector) buildAppPoolWAS() error {
}

func (c *Collector) collectAppPoolWAS(ch chan<- prometheus.Metric) error {

Check failure on line 176 in internal/collector/iis/iis_app_pool_was.go

View workflow job for this annotation

GitHub Actions / lint

func `(*Collector).collectAppPoolWAS` is unused (unused)
perfData, err := c.perfDataCollectorWebService.Collect()
perfData, err := c.perfDataCollectorAppPoolWAS.Collect()
if err != nil {
return fmt.Errorf("failed to collect APP_POOL_WAS metrics: %w", err)
}
Expand Down
4 changes: 2 additions & 2 deletions internal/collector/iis/iis_web_service_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const (
func (c *Collector) buildWebServiceCache() error {
var err error

c.perfDataCollectorWebService, err = perfdata.NewCollector("Web Service Cache", perfdata.InstancesAll, []string{
c.serviceCachePerfDataCollector, err = perfdata.NewCollector("Web Service Cache", perfdata.InstancesAll, []string{
serviceCacheActiveFlushedEntries,
serviceCacheCurrentFileCacheMemoryUsage,
serviceCacheMaximumFileCacheMemoryUsage,
Expand Down Expand Up @@ -314,7 +314,7 @@ func (c *Collector) buildWebServiceCache() error {
}

func (c *Collector) collectWebServiceCache(ch chan<- prometheus.Metric) error {

Check failure on line 316 in internal/collector/iis/iis_web_service_cache.go

View workflow job for this annotation

GitHub Actions / lint

func `(*Collector).collectWebServiceCache` is unused (unused)
perfData, err := c.perfDataCollectorWebService.Collect()
perfData, err := c.serviceCachePerfDataCollector.Collect()
if err != nil {
return fmt.Errorf("failed to collect Web Service Cache metrics: %w", err)
}
Expand Down

0 comments on commit c68a8f1

Please sign in to comment.