<div dir="ltr">We are talking about the metrics name when stored in Hawkular Metrics, correct ?<div><br></div><div>With multiple agents,I guess we would need some kind of isolation with a prefix or tags or tenant or else ? What options do we have ?</div><div><br></div><div>How do we avoid clashes between 2 HOSA ?</div><div><br></div><div>Thomas</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 16, 2017 at 8:54 PM, John Mazzitelli <span dir="ltr">&lt;<a href="mailto:mazz@redhat.com" target="_blank">mazz@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">&gt; I don&#39;t really understand. For the agent collecting its own metrics, it<br>
&gt; shouldn&#39;t need any prefix to be applied at all. Or is this for something<br>
&gt; external to be collecting this metric?<br>
<br>
</span>This is simply &quot;What should we call our own metrics that we emit over the Prometheus protocol such that it conforms to Prometheus conventions&quot;?<br>
<br>
The agent can call it anything it wants (as long as it follows the syntax rules, i.e. can have only alphanumeric characters and underscores).<br>
<br>
But I&#39;m just trying to be a &quot;good public citizen&quot; and want to name these following the same patterns, norms, and conventions that all other Prometheus endpoints out there follow, but I also want them to be easily understandable and not have extremely long names.<br>
<br>
Note that the agent emits more than just the one I documented in my last post - because we are using Prometheus&#39;s Go client, we get for free a bunch of metrics the Go client, itself, emits - basically metrics operating system and Go platform metrics. So, for example, the agent really emits these, too:<br>
<br>
<a href="https://github.com/hawkular/hawkular-openshift-agent/blob/master/deploy/openshift/hawkular-openshift-agent-configmap.yaml#L42-L63" rel="noreferrer" target="_blank">https://github.com/hawkular/<wbr>hawkular-openshift-agent/blob/<wbr>master/deploy/openshift/<wbr>hawkular-openshift-agent-<wbr>configmap.yaml#L42-L63</a><br>
<br>
You&#39;ll see metrics like:<br>
<br>
go_memstats_alloc_bytes<br>
go_goroutines<br>
process_open_fds<br>
<br>
Some of these don&#39;t actually even follow that &quot;namespace_subsystem_name_<wbr>units&quot; convention either, so perhaps I shouldn&#39;t worry too much about having the hawkular metrics conform to that convention either??<br>
<div class="HOEnZb"><div class="h5"><br>
----- Original Message -----<br>
&gt;<br>
&gt;<br>
&gt; ----- Original Message -----<br>
&gt; &gt; From: &quot;John Mazzitelli&quot; &lt;<a href="mailto:mazz@redhat.com">mazz@redhat.com</a>&gt;<br>
&gt; &gt; To: &quot;Discussions around Hawkular development&quot;<br>
&gt; &gt; &lt;<a href="mailto:hawkular-dev@lists.jboss.org">hawkular-dev@lists.jboss.org</a>&gt;<br>
&gt; &gt; Sent: Monday, 16 January, 2017 8:29:54 AM<br>
&gt; &gt; Subject: [Hawkular-dev] what to name metrics in HOSA?<br>
&gt; &gt;<br>
&gt; &gt; HOSA has its own Prometheus endpoint that emits its own metrics. Right now,<br>
&gt; &gt; we just have one custom agent metric but we plan to add more. Before I get<br>
&gt; &gt; too far, I&#39;m trying to figure out a good prefix to use for metric names.<br>
&gt; &gt;<br>
&gt; &gt; I was looking over the Prometheus naming conventions for metric names here:<br>
&gt; &gt; <a href="https://prometheus.io/docs/practices/naming/" rel="noreferrer" target="_blank">https://prometheus.io/docs/<wbr>practices/naming/</a><br>
&gt; &gt;<br>
&gt; &gt; In addition, I found additional naming conventions listed in the Prom Go<br>
&gt; &gt; client comments here:<br>
&gt; &gt; <a href="https://github.com/prometheus/client_golang/blob/master/prometheus/metric.go#L63-L67" rel="noreferrer" target="_blank">https://github.com/prometheus/<wbr>client_golang/blob/master/<wbr>prometheus/metric.go#L63-L67</a><br>
&gt; &gt;<br>
&gt; &gt; Right now the one custom agent metric is called:<br>
&gt; &gt;<br>
&gt; &gt; hawkular_openshift_agent_<wbr>metric_data_points_collected_<wbr>total<br>
&gt; &gt;<br>
&gt; &gt; I think it&#39;s too long :) And the &quot;subsystem&quot; is two words (openshift_agent)<br>
&gt; &gt; when the Go comment says (and all other prometheus metrics I&#39;ve seen) use<br>
&gt; &gt; one word with no underscore.<br>
&gt; &gt;<br>
&gt; &gt; I think starting it with &quot;hawkular_&quot; is good because looking at the metric<br>
&gt; &gt; you immediately know it is from a Hawkular component. But I don&#39;t know what<br>
&gt; &gt; the subsystem should be.<br>
&gt; &gt;<br>
&gt; &gt; I was thinking:<br>
&gt; &gt;<br>
&gt; &gt; hawkular_openshiftagent_&lt;<wbr>metric-name&gt;<br>
&gt; &gt;<br>
&gt; &gt; That is a one-word subsystem &quot;openshiftagent&quot; but its still too long IMO.<br>
&gt; &gt; Maybe:<br>
&gt; &gt;<br>
&gt; &gt; hawkular_agent_&lt;metric-name&gt;<br>
&gt; &gt;<br>
&gt; &gt; But then, if our other agents emit their own metrics in the future, this<br>
&gt; &gt; will<br>
&gt; &gt; be confusing (think vert.x agent, fuse agent, whatever).<br>
&gt; &gt;<br>
&gt; &gt; How about use the HOSA abbreviation?<br>
&gt; &gt;<br>
&gt; &gt; hawkular_hosa_&lt;metric-name&gt;<br>
&gt; &gt;<br>
&gt; &gt; That seems smaller and is more specific to the OpenShift Agent. But will<br>
&gt; &gt; &quot;HOSA&quot; make sense to people?<br>
&gt; &gt;<br>
&gt; &gt; Thoughts? Suggestions?<br>
&gt;<br>
&gt; I don&#39;t really understand. For the agent collecting its own metrics, it<br>
&gt; shouldn&#39;t need any prefix to be applied at all. Or is this for something<br>
&gt; external to be collecting this metric?<br>
&gt;<br>
______________________________<wbr>_________________<br>
hawkular-dev mailing list<br>
<a href="mailto:hawkular-dev@lists.jboss.org">hawkular-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/hawkular-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/hawkular-dev</a><br>
<br>
<br>
</div></div></blockquote></div><br></div>