We are talking about the metrics name when stored in Hawkular Metrics,
correct ?
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 ?
How do we avoid clashes between 2 HOSA ?
Thomas
On Mon, Jan 16, 2017 at 8:54 PM, John Mazzitelli <mazz(a)redhat.com> wrote:
> I don't really understand. For the agent collecting its own
metrics, it
> shouldn't need any prefix to be applied at all. Or is this for something
> external to be collecting this metric?
This is simply "What should we call our own metrics that we emit over the
Prometheus protocol such that it conforms to Prometheus conventions"?
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).
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.
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:
https://github.com/hawkular/hawkular-openshift-agent/blob/
master/deploy/openshift/hawkular-openshift-agent-configmap.yaml#L42-L63
You'll see metrics like:
go_memstats_alloc_bytes
go_goroutines
process_open_fds
Some of these don't actually even follow that
"namespace_subsystem_name_units"
convention either, so perhaps I shouldn't worry too much about having the
hawkular metrics conform to that convention either??
----- Original Message -----
>
>
> ----- Original Message -----
> > From: "John Mazzitelli" <mazz(a)redhat.com>
> > To: "Discussions around Hawkular development"
> > <hawkular-dev(a)lists.jboss.org>
> > Sent: Monday, 16 January, 2017 8:29:54 AM
> > Subject: [Hawkular-dev] what to name metrics in HOSA?
> >
> > HOSA has its own Prometheus endpoint that emits its own metrics. Right
now,
> > we just have one custom agent metric but we plan to add more. Before I
get
> > too far, I'm trying to figure out a good prefix to use for metric
names.
> >
> > I was looking over the Prometheus naming conventions for metric names
here:
> >
https://prometheus.io/docs/practices/naming/
> >
> > In addition, I found additional naming conventions listed in the Prom
Go
> > client comments here:
> >
https://github.com/prometheus/client_golang/blob/master/
prometheus/metric.go#L63-L67
> >
> > Right now the one custom agent metric is called:
> >
> > hawkular_openshift_agent_metric_data_points_collected_total
> >
> > I think it's too long :) And the "subsystem" is two words
(openshift_agent)
> > when the Go comment says (and all other prometheus metrics I've seen)
use
> > one word with no underscore.
> >
> > I think starting it with "hawkular_" is good because looking at the
metric
> > you immediately know it is from a Hawkular component. But I don't know
what
> > the subsystem should be.
> >
> > I was thinking:
> >
> > hawkular_openshiftagent_<metric-name>
> >
> > That is a one-word subsystem "openshiftagent" but its still too long
IMO.
> > Maybe:
> >
> > hawkular_agent_<metric-name>
> >
> > But then, if our other agents emit their own metrics in the future,
this
> > will
> > be confusing (think vert.x agent, fuse agent, whatever).
> >
> > How about use the HOSA abbreviation?
> >
> > hawkular_hosa_<metric-name>
> >
> > That seems smaller and is more specific to the OpenShift Agent. But
will
> > "HOSA" make sense to people?
> >
> > Thoughts? Suggestions?
>
> I don't really understand. For the agent collecting its own metrics, it
> shouldn't need any prefix to be applied at all. Or is this for something
> external to be collecting this metric?
>
_______________________________________________
hawkular-dev mailing list
hawkular-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hawkular-dev