Skip to content

Commit

Permalink
IIS: Don't try to normalize site name, use iis_site for metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
conorbranagan committed Apr 25, 2013
1 parent f1d971b commit 7d6538d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions checks.d/iis.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,14 @@ def check(self, instance):
if iis_site.Name == '_Total':
continue

norm_site = self.normalize_device_name(iis_site.Name)
tags = instance_tags + ['site:{0}'.format(norm_site)]
tags = instance_tags + ['site:%s' % iis_site.Name]
for metric, mtype, wmi_val in self.METRICS:
if not hasattr(wmi_cls, wmi_val):
if not hasattr(iis_site, wmi_val):
self.log.error('Unable to fetch metric %s. Missing %s in Win32_PerfFormattedData_W3SVC_WebService' \
% (metric, wmi_val))
continue

# Submit the metric value with the correct type
value = float(getattr(wmi_cls, wmi_val))
value = float(getattr(iis_site, wmi_val))
metric_func = getattr(self, mtype)
metric_func(metric, value, tags=tags)

0 comments on commit 7d6538d

Please sign in to comment.