Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Change how we disable collectors. We want to be able to override coll…

…ectors a little easier then the only can disable, can not re-enable disabled = method
  • Loading branch information...
commit d71dfba203cc00544894922ee9857c530ebb026c 1 parent c99979f
@kormoc kormoc authored
View
3  src/collectors/CPUCollector/CPUCollector.conf
@@ -1,4 +1,7 @@
### Options for the CPUCollector
+# Enabled by default
+enabled = True
+
# Path for cpu metrics
path = cpu
View
3  src/collectors/Disk/DiskSpaceCollector/DiskSpaceCollector.conf
@@ -1,4 +1,7 @@
## Options for the Disk Space Collector
+# Enabled by default
+enabled = True
+
path = diskspace
# filesystems to examine
filesystems = ext2, ext3, ext4, xfs, glusterfs, nfs
View
4 src/collectors/Disk/DiskUsageCollector/DiskUsageCollector.conf
@@ -1,2 +1,6 @@
## Options for the IO Stats collector
+
+# Enabled by default
+enabled = True
+
path = iostat
View
3  src/collectors/LoadAverageCollector/LoadAverageCollector.conf
@@ -1,4 +1,7 @@
### Options for the LoadAverageCollector
+# Enabled by default
+enabled = True
+
path = loadavg
# We don't use any derivative data to calculate this value
View
3  src/collectors/MemoryCollector/MemoryCollector.conf
@@ -1,4 +1,7 @@
### Options for the MemoryCollector
+# Enabled by default
+enabled = True
+
path = memory
# We don't use any derivative data to calculate this value
View
3  src/collectors/NetworkCollector/NetworkCollector.conf
@@ -1,5 +1,8 @@
### Options for the NetworkCollector
+# Enabled by default
+enabled = True
+
# Path for network metrics
path = network
View
3  src/collectors/SockstatCollector/SockstatCollector.conf
@@ -1,3 +1,6 @@
+# Enabled by default
+enabled = True
+
path = sockets
# We don't use any derivative data to calculate this value
View
3  src/collectors/TCPCollector/TCPCollector.conf
@@ -1,4 +1,7 @@
## Options for the TCP Stats Collector
+# Enabled by default
+enabled = True
+
path = tcp
allowed_names = ListenOverflows, ListenDrops, TCPLoss, TCPTimeouts
View
3  src/collectors/VMStatCollector/VMStatCollector.conf
@@ -1,2 +1,5 @@
## Options for the VMStat collector
+# Enabled by default
+enabled = True
+
path = vmstat
View
6 src/diamond/server.py
@@ -146,10 +146,6 @@ def load_collectors(self, path, filter=None):
modname = f[:-3]
- # If the master config has this module disabled, don't load at all
- if self.config['collectors'].has_key(modname) and self.config['collectors'][modname].has_key('disabled'):
- self.log.debug("Module %s is disabled." % (modname))
- continue
# Stat module file to get mtime
st = os.stat(os.path.join(path, f))
mtime = st.st_mtime
@@ -222,7 +218,7 @@ def schedule_collector(self, c, interval_task=True):
return
# Disabled?
- if c.config.has_key('disabled'):
+ if c.config['enabled'] != "True":
self.log.warn("Skipped loading disabled Collector: %s" % (c.__class__.__name__))
return
Please sign in to comment.
Something went wrong with that request. Please try again.