<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">I'm trying to get my arms around how to develop ceilometer support for networking related data/counters. Seems like there might be a couple of ways to go about this.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">On the one hand, there are the OpenDaylight and opencontrail contributions in
<a href="https://github.com/openstack/ceilometer/tree/master/ceilometer/network/statistics" target="_blank">
<span style="font-size:9.5pt;font-family:Consolas;background:#F0F7FF">https://github.com/openstack/ceilometer/tree/master/ceilometer/network/statistics</span></a>
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">There is also the more general notification base class that is discussed somewhat heavily in the ceilometer documentation and in various presentations, and represented by the code here: https://github.com/openstack/ceilometer/blob/master/ceilometer/network/notifications.py
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">There is a third method, polling, that I will ignore as ceilometer seems to disapprove of its use (notifications to the OSLO bus are preferred).
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Neutron seems to have fairly simple, billing-related counters implemented in
<span style="font-size:9.0pt;font-family:Consolas;color:#795DA3;background:white">
NetworkNotificationBase (</span>https://github.com/openstack/ceilometer/blob/master/ceilometer/network/notifications.py, currently around line 39).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In <a href="https://github.com/openstack/ceilometer/tree/master/ceilometer/network/statistics" target="_blank">
<span style="font-size:9.5pt;font-family:Consolas;background:#F0F7FF">https://github.com/openstack/ceilometer/tree/master/ceilometer/network/statistics</span></a> there are a few python files (e.g., flow.py) that define various counters.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The OpenDaylight and opencontrail contributions use very little of these (e.g., nothing from flow.py) - they just publish some basic SNMP-ish data like received and sent packets.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">So, let's say I have network statistics. How do I approach the problem of integrating them with ceilometer?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">1) Do I write my own agent and push whatever I want to OSLO bus, ignoring https://github.com/openstack/ceilometer/blob/master/ceilometer/network/notifications.py and what is in  <a href="https://github.com/openstack/ceilometer/tree/master/ceilometer/network/statistics" target="_blank"><span style="font-size:9.5pt;font-family:Consolas;background:#F0F7FF">https://github.com/openstack/ceilometer/tree/master/ceilometer/network/statistics</span></a>
 ? <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">or<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">2) Do I use only what is in <a href="https://github.com/openstack/ceilometer/tree/master/ceilometer/network/statistics" target="_blank">
<span style="font-size:9.5pt;font-family:Consolas;background:#F0F7FF">https://github.com/openstack/ceilometer/tree/master/ceilometer/network/statistics</span></a> (e.g., the counters in flow.py, port.py, switch.py, table.py) and write a driver?
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If 2), am I expected to add new python files if something I have to publish to ceilometer is not represented by the counters that are already defined?
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I believe both opendaylight and opencontrail have ml2 plugins - is this the reason for having ceilometer/network/statistics and driver.py interface? I realize in some sense these are different than say, Cisco nexus in that they are platforms,
 not switches. Is being a platform with a Neutron plugin the criteria for using driver.py and being located in ceilometer/network/statistics?
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">How does a Nexus plugin write to ceilometer, if it does? Do they have code that they supply customers or partners that supports ceilometer that fits one of these models but is not checked into openstack git repos?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">syd<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Syd Logan<o:p></o:p></p>
<p class="MsoNormal">Principal Engineer<o:p></o:p></p>
<p class="MsoNormal">Network Switching Software<o:p></o:p></p>
<p class="MsoNormal">Broadcom Corporation<o:p></o:p></p>
<p class="MsoNormal">Direct: 858-521-5101<o:p></o:p></p>
<p class="MsoNormal">Cell: 858-432-8597<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>