python-diamond / Diamond

Diamond is a python daemon that collects system metrics and publishes them to Graphite (and others). It is capable of collecting cpu, memory, network, i/o, load and disk metrics. Additionally, it features an API for implementing custom collectors for gathering metrics from almost any source.
http://diamond.readthedocs.org/
MIT License
1.74k stars 602 forks source link

Fix for issue introduced in #698 #760

Closed smartattack closed 2 years ago

smartattack commented 2 years ago

This patch should fix the error introduced with the merge of PR698:

Process MemoryCollector: Traceback (most recent call last): File "/usr/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap self.run() File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run self._target(*self._args, **self._kwargs) File "/home/petem/git/Diamond/src/diamond/utils/scheduler.py", line 55, in collector_process if str_to_bool(self.config['stagger_collection']): NameError: global name 'self' is not defined

smartattack commented 2 years ago

Accidentally included a fix for issue introduced in PR759. I meant to split these out as separate PRs, but I don't know how to undo it, offhand.

shortdudey123 commented 2 years ago

Thank you for the fix!