<div dir="ltr">To carry on the discussion around whether the agent should create single metrics or hawkular should group the datapoints raised by Joel.<div><br></div><div>I've done a bit more digging into different prometheus endpoints and heres an example from some work being done by Kuberenetes:</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><a href="https://github.com/kubernetes/kube-state-metrics" target="_blank">https://github.com/kubernetes/<wbr>kube-state-metrics</a></div></div><div><div><div># HELP kube_node_info Information about a cluster node.</div></div></div><div><div><div># TYPE kube_node_info gauge</div></div></div><div><div><div>kube_node_info{container_<wbr>runtime_version="docker://1.<wbr>10.3",kernel_version="3.10.0-<wbr>327.28.3.el7.x86_64",kubelet_<wbr>version="v1.3.0+52492b4",<wbr>kubeproxy_version="v1.3.0+<wbr>52492b4",node="origin",os_<wbr>image="CentOS Linux 7 (Core)"} 1</div></div></div><div><div><br></div></div><div><div><div># HELP kube_pod_status_scheduled Describes the status of the scheduling process for the pod.</div></div></div><div><div><div># TYPE kube_pod_status_scheduled gauge</div></div></div><div><div><div>kube_pod_status_scheduled{<wbr>condition="true",namespace="<wbr>cockpit",pod="openshift-<wbr>cockpit-1-0jub2"} 1</div></div></div><div><div><br></div></div><div><div><div># HELP kube_pod_container_requested_<wbr>cpu_cores The number of requested cpu cores by a container.</div></div></div><div><div># TYPE kube_pod_container_requested_<wbr>cpu_cores gauge</div></div><div><div>kube_pod_container_requested_<wbr>cpu_cores{container="registry"<wbr>,namespace="default",node="<wbr>origin",pod="docker-registry-<wbr>1-i37wn"} 0.1</div></div><div><br></div></blockquote>If the agent was to create single metrics, the idea in my mind would be as follows:<div><ul><li>Add a new boolean flag to create unique metrics based on labels (default=false, to keep functionality as-is)</li><li>Allow use of "id" field to contain value replacements based on label value (probably need to be sanitised / escaped??)</li></ul><div>i.e.:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">metrics: <br>- name: kube_pod_container_requested_cpu_cores <br> id: kube_pod_container_requested_cpu_cores_${container}_${node} <br> unique_metric_per_label: true</blockquote></div><div class="gmail_extra"><br></div><div class="gmail_extra">Which would create a gauge called:</div><div class="gmail_extra"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">kube_pod_container_requested_<wbr>cpu_cores_registry_origin</blockquote><div class="gmail_extra"><br></div><div class="gmail_extra">Does that sound feasible? and thoughts?</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 4, 2017 at 1:06 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="gmail-">> Here, query by tag means time series tags, not data points tags. That's<br>
> probably why you don't get anything. Maybe we should more clearly<br>
> disambiguate these two concepts as there's often some confusion.<br>
<br>
</span>:-) And that, I think, is what I meant by tags on "metric definitions" - I think the H-Metrics team calls them "timeseries tags".<br>
<div class="gmail-HOEnZb"><div class="gmail-h5">______________________________<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>
</div></div></blockquote></div><br></div></div>