The detailed documentation is at https://prometheus.io/docs/operating/configuration/#<metric_relabel_configs>
Something like metric_relabel_configs: - action: keep - source_labels: [ "container_name" ] - regex: redis should do. Adapt as needed. /MR On Mon, Jun 26, 2017 at 9:42 AM wangpeng007 <huihuiheh...@gmail.com> wrote: > Thanks for your answer! > I am using Prometheus to grab metrics from cadvisor, if I just want to > grab the redis docker container, can you give a example how to apply metric > relabeling to keep metrics matching redis container? Thank you very much! > > > On Monday, June 26, 2017 at 3:42:16 PM UTC+8, Matthias Rampke wrote: > >> Just drop the data you need when you collect it. For example, with >> Prometheus, you can apply metric relabeling to keep metrics matching any >> label combination you specify. If you are using the API fro. custom code, >> you have even more freedom. >> >> /MR >> >> On Mon, Jun 26, 2017, 09:14 wangpeng007 <huihui...@gmail.com> wrote: >> > I want to monitor a specific docker container, rather than monitor all the >>> docker containers. >>> Is there anyway to do this? >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Kubernetes user discussion and Q&A" group. >>> >> To unsubscribe from this group and stop receiving emails from it, send an >>> email to kubernetes-use...@googlegroups.com. >>> To post to this group, send email to kubernet...@googlegroups.com. >> >> >>> Visit this group at https://groups.google.com/group/kubernetes-users. >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- > You received this message because you are subscribed to the Google Groups > "Kubernetes user discussion and Q&A" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to kubernetes-users+unsubscr...@googlegroups.com. > To post to this group, send email to kubernetes-users@googlegroups.com. > Visit this group at https://groups.google.com/group/kubernetes-users. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group. To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscr...@googlegroups.com. To post to this group, send email to kubernetes-users@googlegroups.com. Visit this group at https://groups.google.com/group/kubernetes-users. For more options, visit https://groups.google.com/d/optout.