[stein][ceilometer] file/directory structure changes in ceilometer/agent and compute/pollsters with respect to liberty ceilometer

Sanjay K isanjayk5 at gmail.com
Thu Jul 18 16:16:31 UTC 2019

Hi All,
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 list_opts() with -
*('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

'ceilometer.service')availability_zone =
cfg.CONF.graphite_config.availability_zonehostname =
socket.gethostname()CARBON_SERVER =
 cfg.CONF.graphite_config.graphite_hostCARBON_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?

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.

Any pointers to specs/code reviews with respect to these structural changes
will be helpful to me.

Thank you for your help and pointers on this.

best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20190718/b642a815/attachment.html>

More information about the openstack-discuss mailing list