small changes

This commit is contained in:
ryan 2016-02-18 11:39:10 +01:00
parent a037e7f042
commit b9279431cd
2 changed files with 5 additions and 6 deletions

View File

@ -1,5 +1,4 @@
import statsd import statsd
from os import getppid
from platform import node from platform import node
class Monitor(statsd.StatsClient): class Monitor(statsd.StatsClient):
@ -7,5 +6,5 @@ class Monitor(statsd.StatsClient):
if not kwargs: if not kwargs:
kwargs = {} kwargs = {}
if not kwargs.get('prefix'): if not kwargs.get('prefix'):
kwargs['prefix'] = '{hostname}_{pid}.'.format(hostname=node(), pid=getppid()) kwargs['prefix'] = '{hostname}.'.format(hostname=node())
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)

View File

@ -2,8 +2,8 @@ rethinkdb-1:
image: rethinkdb image: rethinkdb
ports: ports:
- "9999:8080" - "9999:8080"
- "28015:28015" - "28015"
- "29015:29015" - "29015"
volumes_from: volumes_from:
- rethinkdb-data-1 - rethinkdb-data-1
@ -35,8 +35,8 @@ rethinkdb-2:
image: rethinkdb image: rethinkdb
ports: ports:
- "9998:8080" - "9998:8080"
- "28015:28015" - "28015"
- "29015:29015" - "29015"
links: links:
- rethinkdb-1:localhost - rethinkdb-1:localhost
volumes_from: volumes_from: