('graphite_config', ceilometer.graphite.dispatcher_opts),
and defined dispatcher_opts for graphite host and ports in a new graphite.py file.
Also we did some changes in ceilometer/agent/manager.py to import graphite config values like -
cfg.CONF.import_group('graphite_config', 'ceilometer.graphite')
In compute/pollsters, we modified cpu.py, memory.py and net.py files to send the metric data to graphite adding new function for
it.
cfg.CONF.import_group('graphite_config', 'ceilometer.service')
availability_zone = cfg.CONF.graphite_config.availability_zone
hostname = socket.gethostname()
CARBON_SERVER = cfg.CONF.graphite_config.graphite_host
CARBON_PORT = cfg.CONF.graphite_config.graphite_port
def send_to_graphite(self,instance,cpupercent):
path = 'ceilometer.' + availability_zone + '.' + hostname + '.' + instance + '.cpu.utilization'
timestamp = int(time.time())
message = '%s %s %d\n' % (path, cpupercent, timestamp)
sock = socket.socket()
sock.connect((CARBON_SERVER, CARBON_PORT))
sock.sendall(message)
sock.close()
The same function we redefined for cpu, memory and net. We also used this function inside get_sample() function to send the data to graphite.
As I was applying the same changes into stein ceilometer, I found there are lot of structural changes in files and source code level.
I was trying to correlate the old change with respect to new source in stein. However the files/directory structure is changed inside ceilometer/agent and compute/pollsters.
Can you please guide me how these agent and pollsters changes can be mapped into the newer source code so that I can apply my old code changes in the latest ceilometer source files?