Add Exim Collector #55

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+17 −0
Diff settings

Always

Just for now

@@ -0,0 +1,17 @@
+from diamond import *
+import diamond.collector
+import subprocess
+import os
+
+class EximCollector(diamond.collector.Collector):
+ """
+ Shells out to get the exim queue length
+ """
+
+ COMMAND = ['/usr/sbin/exim', '-bpc']
+
+ def collect(self):
+ if not os.access(EximCollector.COMMAND[0], os.X_OK):
+ return
+ queuesize = subprocess.Popen(EximCollector.COMMAND, stdout=subprocess.PIPE).communicate()[0][:-1]
+ self.publish('queuesize', queuesize)