From 15a372387f6d7570cfc7bbc8ee60973f1fcb349f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juho=20M=C3=A4kinen?= <juho.makinen@gmail.com> Date: Tue, 9 Apr 2019 09:42:01 +0300 Subject: [PATCH] Fix underscores with Markdown rendering in Promtail examples --- docs/promtail.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/promtail.md b/docs/promtail.md index 5dd07737..bcd7fc5a 100644 --- a/docs/promtail.md +++ b/docs/promtail.md @@ -14,20 +14,20 @@ The term "label" here is used in more than one different way and they can be eas * Labels starting with __ (two underscores) are internal labels. They are not stored to the loki index and are invisible after Promtail. They "magically" appear from different sources. -* Labels starting with __meta_kubernetes_pod_label_* are "meta labels" which are generated based on your kubernetes +* Labels starting with \_\_meta_kubernetes_pod_label_* are "meta labels" which are generated based on your kubernetes pod labels. Example: If your kubernetes pod has a label "name" set to "foobar" then the scrape_configs section - will have a label __meta_kubernetes_pod_label_name with value set to "foobar". + will have a label \_\_meta_kubernetes_pod_label_name with value set to "foobar". * There are other __meta_kubernetes_* labels based on the Kubernetes metadadata, such as the namespace the pod is - running (__meta_kubernetes_namespace) or the name of the container inside the pod (__meta_kubernetes_pod_container_name) -* The label __path__ is a special label which Promtail will read to find out where the log files are to be read in. + running (__meta_kubernetes_namespace) or the name of the container inside the pod (\_\_meta_kubernetes_pod_container_name) +* The label \_\_path\_\_ is a special label which Promtail will read to find out where the log files are to be read in. The most important part of each entry is the *relabel_configs* which are a list of operations which creates, renames, modifies or alters labels. A single scrape_config can also reject logs by doing an "action: drop" which means that this particular scrape_config will not forward logs from a particular pod, but another scrape_config might. Many of the scrape_configs read labels from __meta_kubernetes_* meta-labels, assign them to intermediate labels -such as __service__ based on a few different logic, possibly drop the processing if the __service__ was empty -and finally set visible labels (such as "job") based on the __service__ label. +such as \_\_service\_\_ based on a few different logic, possibly drop the processing if the \_\_service\_\_ was empty +and finally set visible labels (such as "job") based on the \_\_service\_\_ label. In general, all of the default Promtail scrape_configs do the following: * They read pod logs from under /var/log/pods/$1/*.log. -- GitLab