BrightcoveOS/Diamond — Issue #39: Multiple Collector instances
Author: pablolb
Created: 2012-03-06 01:55:39+00:00
State: open

Hi,

Today I was trying to setup Diamond to collect data from several servers, each containing multiple instances of memcached.

I cannot see how to accomplish this right now, as the collectors are added to a dict with their class name as key.

I have created a branch in my fork with a solution: https://github.com/pablolb/Diamond/tree/multiple-collector-instances.

But maybe you have a workaround or you'd prefer a better way to solve this...?

In the first commit (https://github.com/pablolb/Diamond/commit/f2397aa7ec745173575a4907f894e07fed1047fe) I scan collectors config directory and schedule new instances of the collector.

In the second commit, I use MemcachedCollector as an example as how this can be used... I've seen this used in Genttoo network scripts I think (using symlinks and interpreting the actual name)

pablo@localhost collectors $ ls -l
total 4
-rw-r--r-- 1 root root 61 Mar 5 22:40 MemcachedCollector.conf
lrwxrwxrwx 1 root root 23 Mar 5 22:40 MemcachedCollector-localhost:11212.conf -> MemcachedCollector.conf

pablo@localhost collectors $ cat MemcachedCollector.conf

```INI
enabled=True
override_hostname=True
custom_name_is_host=True
```