<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"><<a href="mailto:mazz@redhat.com" target="_blank">mazz@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> I don't really understand. For the agent collecting its own metrics, it<br>
> shouldn't need any prefix to be applied at all. Or is this for something<br>
> external to be collecting this metric?<br>
<br>
</span>This is simply "What should we call our own metrics that we emit over the Prometheus protocol such that it conforms to Prometheus conventions"?<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'm just trying to be a "good public citizen" 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'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'll see metrics like:<br>
<br>
go_memstats_alloc_bytes<br>
go_goroutines<br>
process_open_fds<br>
<br>
Some of these don't actually even follow that "namespace_subsystem_name_<wbr>units" convention either, so perhaps I shouldn'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>
><br>
><br>
> ----- Original Message -----<br>
> > From: "John Mazzitelli" <<a href="mailto:mazz@redhat.com">mazz@redhat.com</a>><br>
> > To: "Discussions around Hawkular development"<br>
> > <<a href="mailto:hawkular-dev@lists.jboss.org">hawkular-dev@lists.jboss.org</a>><br>
> > Sent: Monday, 16 January, 2017 8:29:54 AM<br>
> > Subject: [Hawkular-dev] what to name metrics in HOSA?<br>
> ><br>
> > HOSA has its own Prometheus endpoint that emits its own metrics. Right now,<br>
> > we just have one custom agent metric but we plan to add more. Before I get<br>
> > too far, I'm trying to figure out a good prefix to use for metric names.<br>
> ><br>
> > I was looking over the Prometheus naming conventions for metric names here:<br>
> > <a href="https://prometheus.io/docs/practices/naming/" rel="noreferrer" target="_blank">https://prometheus.io/docs/<wbr>practices/naming/</a><br>
> ><br>
> > In addition, I found additional naming conventions listed in the Prom Go<br>
> > client comments here:<br>
> > <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>
> ><br>
> > Right now the one custom agent metric is called:<br>
> ><br>
> > hawkular_openshift_agent_<wbr>metric_data_points_collected_<wbr>total<br>
> ><br>
> > I think it's too long :) And the "subsystem" is two words (openshift_agent)<br>
> > when the Go comment says (and all other prometheus metrics I've seen) use<br>
> > one word with no underscore.<br>
> ><br>
> > I think starting it with "hawkular_" is good because looking at the metric<br>
> > you immediately know it is from a Hawkular component. But I don't know what<br>
> > the subsystem should be.<br>
> ><br>
> > I was thinking:<br>
> ><br>
> > hawkular_openshiftagent_<<wbr>metric-name><br>
> ><br>
> > That is a one-word subsystem "openshiftagent" but its still too long IMO.<br>
> > Maybe:<br>
> ><br>
> > hawkular_agent_<metric-name><br>
> ><br>
> > But then, if our other agents emit their own metrics in the future, this<br>
> > will<br>
> > be confusing (think vert.x agent, fuse agent, whatever).<br>
> ><br>
> > How about use the HOSA abbreviation?<br>
> ><br>
> > hawkular_hosa_<metric-name><br>
> ><br>
> > That seems smaller and is more specific to the OpenShift Agent. But will<br>
> > "HOSA" make sense to people?<br>
> ><br>
> > Thoughts? Suggestions?<br>
><br>
> I don't really understand. For the agent collecting its own metrics, it<br>
> shouldn't need any prefix to be applied at all. Or is this for something<br>
> external to be collecting this metric?<br>
><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>