<div dir="ltr"><font face="verdana, sans-serif">Hi All,</font><div><font face="verdana, sans-serif">Currently we are trying to upgrade our older customized openstack deployment by upgrading it to Openstack Stein release from Openstack liberty release. In the older version, we had customized ceilometer source to integrate graphite so that we can send some metrices information to the carbon db which will be consumed by some other UI tools or application. For that we modified code in ceilometer/opts.py in <span style="white-space:pre;color:rgb(21,184,174)">list_opts</span><span style="color:rgb(65,79,92);white-space:pre">() with</span> -</font></div><div><div style="color:rgb(65,79,92);line-height:19px;white-space:pre"><div><i><font face="verdana, sans-serif">(<span style="color:rgb(21,184,174)">'graphite_config'</span>, ceilometer.graphite.dispatcher_opts),</font></i></div><div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif">and defined dispatcher_opts for graphite host and ports in a new graphite.py file. </font></div><div><font face="verdana, sans-serif">Also we did some changes in ceilometer/agent/manager.py to import graphite config values like -</font></div><div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif"><i>cfg.CONF.import_group('graphite_config', 'ceilometer.graphite')</i><br></font></div><div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif">In compute/pollsters, we modified cpu.py, memory.py and net.py files to send the metric data to graphite adding new function for</font></div><div><font face="verdana, sans-serif">it.</font></div><div><font face="verdana, sans-serif"><br></font></div><div><i><font face="verdana, sans-serif">cfg.CONF.import_group('graphite_config', 'ceilometer.service')<br>availability_zone = cfg.CONF.graphite_config.availability_zone<br>hostname = socket.gethostname()<br>CARBON_SERVER =  cfg.CONF.graphite_config.graphite_host<br>CARBON_PORT = cfg.CONF.graphite_config.graphite_port<br></font></i></div><div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif"><i>def send_to_graphite(self,instance,cpupercent):<br>    path = 'ceilometer.' + availability_zone + '.' + hostname + '.' + instance + '.cpu.utilization'<br>    timestamp = int(time.time())<br>    message = '%s %s %d\n' % (path, cpupercent, timestamp)<br>    sock = socket.socket()<br>    sock.connect((CARBON_SERVER, CARBON_PORT))<br>    sock.sendall(message)<br>    sock.close()</i><br></font></div><div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif">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.</font></div><div><font face="verdana, sans-serif">As I was applying the same changes into stein ceilometer, I found there are lot of structural changes in files and source code level.</font></div><div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif">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.  </font></div><div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif">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?</font></div></div><div style="color:rgb(65,79,92);line-height:19px;white-space:pre"><font face="verdana, sans-serif"><br></font></div><div style="color:rgb(65,79,92);line-height:19px;white-space:pre"><font face="verdana, sans-serif">As being new to openstack system, I don't have complete knowledge of what happened to the code in between liberty and stein version though I have gone through release notes and few details about these openstack services.</font></div><div style="color:rgb(65,79,92);line-height:19px;white-space:pre"><font face="verdana, sans-serif"><br></font></div><div style="color:rgb(65,79,92);line-height:19px;white-space:pre"><font face="verdana, sans-serif">Any pointers to specs/code reviews with respect to these structural changes will be helpful to me.</font></div><div style="color:rgb(65,79,92);line-height:19px;white-space:pre"><font face="verdana, sans-serif"><br></font></div><div style="color:rgb(65,79,92);line-height:19px;white-space:pre"><font face="verdana, sans-serif">Thank you for your help and pointers on this.</font></div><div style="color:rgb(65,79,92);line-height:19px;white-space:pre"><font face="verdana, sans-serif"><br></font></div><div style="color:rgb(65,79,92);line-height:19px;white-space:pre"><font face="verdana, sans-serif">best regards,</font></div><div style="color:rgb(65,79,92);line-height:19px;white-space:pre"><font face="verdana, sans-serif">Sanjay</font><span style="font-size:14px"><font face="verdana, sans-serif">
</font><font face="Consolas, Courier New, monospace">
</font></span></div></div></div>