Ejemplo n.º 1
0
from client_psutil_plugin import psutil_stat
from client_memcached_plugin import memcached_stat
from client_cubrid_plugin import cubrid_stat


hostname = socket.gethostname()
c = collectd(hostname, ['10.98.129.47:30000'])

'''
arcus = arcus_stat()
arcus.auto_register()
print(arcus.addr)
c.plugins.append(arcus)
'''

mc = memcached_stat()
mc.auto_register()
c.plugins.append(mc)

cub = cubrid_stat()
cub.auto_register()
c.plugins.append(cub)

ps = psutil_stat()
c.plugins.append(ps)

c.daemon()



Ejemplo n.º 2
0
"""

# mysql stat example
my = mysql_stat()
my.push_db(environ['MYSQL_DATABASE'], '3306', environ['MYSQL_USER'],
           environ['MYSQL_PASSWORD'])
c.plugins.append(my)
"""
# cubrid stat example
cub = cubrid_stat()
cub.auto_register()
c.plugins.append(cub)

# redis stat example
rds = redis_stat()
rds.auto_arc_register()
c.plugins.append(rds)

# jstat stat example
js = jstat_stat()
js.auto_register(['java', 'apache', 'catalina'], trace=True)
c.plugins.append(js)
"""

# system stat (psutil) example
ps = psutil_stat()
c.plugins.append(ps)

c.daemon()