I'm not sure I understand your question. Are you looking for docker labels
or application metrics? If you're looking for the docker labels, when I run
your command it does include the labels in the container:

$ curl -Gs
> http://localhost:8080/api/v1.3/containers/docker/f2aa3878bd4eab2e300b8d0dad48e4175047d0ef9d340d2e9573b39c7dcbe038
> | grep -o '"labels":{[^}]*}'
> "labels":{"io.cadvisor.metric.type":"webservers"}
> "labels":{"io.cadvisor.metric.type":"webservers"}


If you're looking for application metrics (as described here
<https://github.com/google/cadvisor/blob/master/docs/application_metrics.md>),
the "io.cadvisor.metric.type" label is not yet implemented. Instead, you
must add a metric configuration file to your container, and create an
"io.cadvisor.metric.foo" who's value is the path to the configuration.

On Thu, Jun 2, 2016 at 1:19 AM, Ashish Jain <[email protected]> wrote:

> Can I get some help here?
>
> On Tuesday, 31 May 2016 19:41:22 UTC, Vishnu Kannan wrote:
>>
>> +Tim St. Clair
>>
>> On Mon, May 30, 2016 at 9:02 AM, Ashish Jain <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> How can I export docker labels in metrics(
>>> https://github.com/google/cadvisor/blob/master/info/v1/container.go#L49).
>>> I am running the following command
>>>
>>> sudo docker run -d --label io.cadvisor.metric.type="webservers" httpd
>>>
>>> Once I run this command I do not see metrics for this container at all.
>>>
>>> Regards
>>> Ashish
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Containers at Google" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at https://groups.google.com/group/google-containers.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Containers at Google" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-containers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to