From a04eafd239fa8d071dd4097a5b6e711aa15d68e9 Mon Sep 17 00:00:00 2001 From: Uri Sternik Date: Thu, 28 Nov 2024 10:59:14 +0200 Subject: [PATCH] Replace docker_id for container_id Signed-off-by: Uri Sternik --- conf/parsers.conf | 2 +- plugins/filter_kubernetes/kube_conf.h | 2 +- plugins/filter_kubernetes/kube_meta.c | 66 +++++++++---------- plugins/filter_kubernetes/kube_meta.h | 4 +- plugins/filter_kubernetes/kube_regex.h | 2 +- plugins/filter_kubernetes/kubernetes.c | 8 +-- .../filter_log_to_metrics/log_to_metrics.c | 2 +- plugins/in_docker/cgroup_v1.c | 2 +- plugins/in_docker/cgroup_v2.c | 2 +- plugins/in_docker/docker.c | 2 +- plugins/in_docker/docker.h | 2 +- plugins/out_stackdriver/stackdriver.h | 2 +- scripts/rate_limit.lua | 4 +- tests/internal/avro.c | 6 +- tests/internal/data/avro/live-sample.json | 2 +- tests/internal/data/avro/multiline.json | 2 +- ...pace-labels-and-annotations_fluent-bit.out | 2 +- .../out/core/core_base_fluent-bit.out | 2 +- .../out/kairosdb-914055854-b63vq.out | 2 +- ...ptions_use-kubelet-disabled_fluent-bit.out | 2 +- ...options_use-kubelet-enabled_fluent-bit.out | 2 +- tests/runtime/filter_log_to_metrics.c | 6 +- tests/runtime/filter_throttle_size.c | 10 +-- 23 files changed, 68 insertions(+), 68 deletions(-) diff --git a/conf/parsers.conf b/conf/parsers.conf index ec1b11bf910..ec5a0ace55c 100644 --- a/conf/parsers.conf +++ b/conf/parsers.conf @@ -127,7 +127,7 @@ [PARSER] Name kube-custom Format regex - Regex (?[^.]+)?\.?(?[a-z0-9](?:[-a-z0-9]*[a-z0-9])?(?:\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)_(?[^_]+)_(?.+)-(?[a-z0-9]{64})\.log$ + Regex (?[^.]+)?\.?(?[a-z0-9](?:[-a-z0-9]*[a-z0-9])?(?:\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)_(?[^_]+)_(?.+)-(?[a-z0-9]{64})\.log$ [PARSER] # Examples: TCP: https://rubular.com/r/Q8YY6fHqlqwGI0 UDP: https://rubular.com/r/B0ID69H9FvN0tp diff --git a/plugins/filter_kubernetes/kube_conf.h b/plugins/filter_kubernetes/kube_conf.h index 50219330cd8..3a06aee6bbd 100644 --- a/plugins/filter_kubernetes/kube_conf.h +++ b/plugins/filter_kubernetes/kube_conf.h @@ -71,7 +71,7 @@ struct kube_meta; struct flb_kube { /* Configuration parameters */ int use_journal; - int cache_use_docker_id; + int cache_use_container_id; int labels; int annotations; int namespace_labels; diff --git a/plugins/filter_kubernetes/kube_meta.c b/plugins/filter_kubernetes/kube_meta.c index 1b0579661c0..b1488c0ebe7 100644 --- a/plugins/filter_kubernetes/kube_meta.c +++ b/plugins/filter_kubernetes/kube_meta.c @@ -592,10 +592,10 @@ static void cb_results(const char *name, const char *value, meta->container_name_len = vlen; meta->fields++; } - else if (meta->docker_id == NULL && - strcmp(name, "docker_id") == 0) { - meta->docker_id = flb_strndup(value, vlen); - meta->docker_id_len = vlen; + else if (meta->container_id == NULL && + strcmp(name, "container_id") == 0) { + meta->container_id = flb_strndup(value, vlen); + meta->container_id_len = vlen; meta->fields++; } else if (meta->container_hash == NULL && @@ -669,18 +669,18 @@ static void extract_container_hash(struct flb_kube_meta *meta, { int i; msgpack_object k, v; - int docker_id_len = 0; + int container_id_len = 0; int container_hash_len = 0; int container_image_len = 0; const char *container_hash; - const char *docker_id; + const char *container_id; const char *container_image; const char *tmp; int tmp_len = 0; int name_found = FLB_FALSE; - /* Process status/containerStatus map for docker_id, container_hash, container_image */ + /* Process status/containerStatus map for container_id, container_hash, container_image */ for (i = 0; - (meta->docker_id_len == 0 || meta->container_hash_len == 0 || + (meta->container_id_len == 0 || meta->container_hash_len == 0 || meta->container_image_len == 0) && i < status.via.map.size; i++) { k = status.via.map.ptr[i].key; @@ -695,7 +695,7 @@ static void extract_container_hash(struct flb_kube_meta *meta, int j; v = status.via.map.ptr[i].val; for (j = 0; - (meta->docker_id_len == 0 || + (meta->container_id_len == 0 || meta->container_hash_len == 0 || meta->container_image_len == 0) && j < v.via.array.size; j++) { @@ -704,7 +704,7 @@ static void extract_container_hash(struct flb_kube_meta *meta, msgpack_object_str v2; k1 = v.via.array.ptr[j]; for (l = 0; - (meta->docker_id_len == 0 || + (meta->container_id_len == 0 || meta->container_hash_len == 0 || meta->container_image_len == 0) && l < k1.via.map.size; l++) { @@ -727,8 +727,8 @@ static void extract_container_hash(struct flb_kube_meta *meta, "containerID", k2.via.str.size)) { if (extract_hash(v2.ptr, v2.size, &tmp, &tmp_len) == 0) { - docker_id = tmp; - docker_id_len = tmp_len; + container_id = tmp; + container_id_len = tmp_len; } } else if (k2.via.str.size == sizeof("imageID") - 1 && @@ -755,9 +755,9 @@ static void extract_container_hash(struct flb_kube_meta *meta, container_hash_len); meta->fields++; } - if (docker_id_len && !meta->docker_id_len) { - meta->docker_id_len = docker_id_len; - meta->docker_id = flb_strndup(docker_id, docker_id_len); + if (container_id_len && !meta->container_id_len) { + meta->container_id_len = container_id_len; + meta->container_id = flb_strndup(container_id, container_id_len); meta->fields++; } if (container_image_len && !meta->container_image_len) { @@ -951,13 +951,13 @@ static int merge_meta_from_tag(struct flb_kube *ctx, struct flb_kube_meta *meta, msgpack_pack_str_body(&mp_pck, meta->container_name, meta->container_name_len); } - if (meta->docker_id != NULL) { + if (meta->container_id != NULL) { flb_mp_map_header_append(&mh); msgpack_pack_str(&mp_pck, 9); - msgpack_pack_str_body(&mp_pck, "docker_id", 9); - msgpack_pack_str(&mp_pck, meta->docker_id_len); - msgpack_pack_str_body(&mp_pck, meta->docker_id, - meta->docker_id_len); + msgpack_pack_str_body(&mp_pck, "container_id", 9); + msgpack_pack_str(&mp_pck, meta->container_id_len); + msgpack_pack_str_body(&mp_pck, meta->container_id, + meta->container_id_len); } flb_mp_map_header_end(&mh); @@ -1268,7 +1268,7 @@ static int merge_pod_meta(struct flb_kube_meta *meta, struct flb_kube *ctx, } } - if ((!meta->container_hash || !meta->docker_id || !meta->container_image) && status_found) { + if ((!meta->container_hash || !meta->container_id || !meta->container_image) && status_found) { extract_container_hash(meta, status_val); } } @@ -1340,12 +1340,12 @@ static int merge_pod_meta(struct flb_kube_meta *meta, struct flb_kube *ctx, msgpack_pack_str_body(&mp_pck, meta->container_name, meta->container_name_len); } - if (meta->docker_id != NULL) { + if (meta->container_id != NULL) { msgpack_pack_str(&mp_pck, 9); - msgpack_pack_str_body(&mp_pck, "docker_id", 9); - msgpack_pack_str(&mp_pck, meta->docker_id_len); - msgpack_pack_str_body(&mp_pck, meta->docker_id, - meta->docker_id_len); + msgpack_pack_str_body(&mp_pck, "container_id", 9); + msgpack_pack_str(&mp_pck, meta->container_id_len); + msgpack_pack_str_body(&mp_pck, meta->container_id, + meta->container_id_len); } if (meta->container_hash != NULL) { msgpack_pack_str(&mp_pck, 14); @@ -1565,8 +1565,8 @@ static inline int extract_pod_meta(struct flb_kube *ctx, if (meta->container_name) { n += meta->container_name_len + 1; } - if (ctx->cache_use_docker_id && meta->docker_id) { - n += meta->docker_id_len + 1; + if (ctx->cache_use_container_id && meta->container_id) { + n += meta->container_id_len + 1; } meta->cache_key = flb_malloc(n); if (!meta->cache_key) { @@ -1592,11 +1592,11 @@ static inline int extract_pod_meta(struct flb_kube *ctx, off += meta->container_name_len; } - if (ctx->cache_use_docker_id && meta->docker_id) { + if (ctx->cache_use_container_id && meta->container_id) { /* Separator */ meta->cache_key[off++] = ':'; - memcpy(meta->cache_key + off, meta->docker_id, meta->docker_id_len); - off += meta->docker_id_len; + memcpy(meta->cache_key + off, meta->container_id, meta->container_id_len); + off += meta->container_id_len; } meta->cache_key[off] = '\0'; @@ -2125,8 +2125,8 @@ int flb_kube_meta_release(struct flb_kube_meta *meta) r++; } - if (meta->docker_id) { - flb_free(meta->docker_id); + if (meta->container_id) { + flb_free(meta->container_id); r++; } diff --git a/plugins/filter_kubernetes/kube_meta.h b/plugins/filter_kubernetes/kube_meta.h index e4e3b06685a..9aea984d7cc 100644 --- a/plugins/filter_kubernetes/kube_meta.h +++ b/plugins/filter_kubernetes/kube_meta.h @@ -31,7 +31,7 @@ struct flb_kube_meta { int podname_len; int cache_key_len; int container_name_len; - int docker_id_len; + int container_id_len; int container_hash_len; int container_image_len; @@ -39,7 +39,7 @@ struct flb_kube_meta { char *podname; char *container_name; char *container_image; - char *docker_id; + char *container_id; char *container_hash; /* set only on Systemd mode */ diff --git a/plugins/filter_kubernetes/kube_regex.h b/plugins/filter_kubernetes/kube_regex.h index bd94d9d93cb..7a88b83b81e 100644 --- a/plugins/filter_kubernetes/kube_regex.h +++ b/plugins/filter_kubernetes/kube_regex.h @@ -22,7 +22,7 @@ #include "kube_conf.h" -#define KUBE_TAG_TO_REGEX "(?[a-z0-9](?:[-a-z0-9]*[a-z0-9])?(?:\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)_(?[^_]+)_(?.+)-(?[a-z0-9]{64})\\.log$" +#define KUBE_TAG_TO_REGEX "(?[a-z0-9](?:[-a-z0-9]*[a-z0-9])?(?:\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)_(?[^_]+)_(?.+)-(?[a-z0-9]{64})\\.log$" #define KUBE_JOURNAL_TO_REGEX "^(?[^_]+)_(?[^\\._]+)(\\.(?[^_]+))?_(?[^_]+)_(?[^_]+)_[^_]+_[^_]+$" diff --git a/plugins/filter_kubernetes/kubernetes.c b/plugins/filter_kubernetes/kubernetes.c index ccbd4b168e5..4b655fbe780 100644 --- a/plugins/filter_kubernetes/kubernetes.c +++ b/plugins/filter_kubernetes/kubernetes.c @@ -995,11 +995,11 @@ static struct flb_config_map config_map[] = { 0, FLB_TRUE, offsetof(struct flb_kube, dns_wait_time), "dns interval between network status checks" }, - /* Fetch K8s meta when docker_id has changed */ + /* Fetch K8s meta when container_id has changed */ { - FLB_CONFIG_MAP_BOOL, "cache_use_docker_id", "false", - 0, FLB_TRUE, offsetof(struct flb_kube, cache_use_docker_id), - "fetch K8s meta when docker_id is changed" + FLB_CONFIG_MAP_BOOL, "cache_use_container_id", "false", + 0, FLB_TRUE, offsetof(struct flb_kube, cache_use_container_id), + "fetch K8s meta when container_id is changed" }, { diff --git a/plugins/filter_log_to_metrics/log_to_metrics.c b/plugins/filter_log_to_metrics/log_to_metrics.c index 87231f66392..f415c6dbe58 100644 --- a/plugins/filter_log_to_metrics/log_to_metrics.c +++ b/plugins/filter_log_to_metrics/log_to_metrics.c @@ -44,7 +44,7 @@ static char kubernetes_label_keys[NUMBER_OF_KUBERNETES_LABELS][16] = "namespace_name", "pod_name", "container_name", - "docker_id", + "container_id", "pod_id" }; diff --git a/plugins/in_docker/cgroup_v1.c b/plugins/in_docker/cgroup_v1.c index ab401478e72..2158bae247c 100644 --- a/plugins/in_docker/cgroup_v1.c +++ b/plugins/in_docker/cgroup_v1.c @@ -408,7 +408,7 @@ static mem_snapshot *get_docker_mem_snapshot(struct flb_docker *ctx, char *id) int in_docker_set_cgroup_api_v1(struct cgroup_api *api) { api->cgroup_version = 1; - api->get_active_docker_ids = get_active_dockers; + api->get_active_container_ids = get_active_dockers; api->get_container_name = get_container_name; api->get_cpu_snapshot = get_docker_cpu_snapshot; api->get_mem_snapshot = get_docker_mem_snapshot; diff --git a/plugins/in_docker/cgroup_v2.c b/plugins/in_docker/cgroup_v2.c index 295483cd259..76fe31cd925 100644 --- a/plugins/in_docker/cgroup_v2.c +++ b/plugins/in_docker/cgroup_v2.c @@ -458,7 +458,7 @@ static mem_snapshot *get_docker_mem_snapshot(struct flb_docker *ctx, char *id) int in_docker_set_cgroup_api_v2(struct cgroup_api *api) { api->cgroup_version = 2; - api->get_active_docker_ids = get_active_dockers; + api->get_active_container_ids = get_active_dockers; api->get_container_name = get_container_name; api->get_cpu_snapshot = get_docker_cpu_snapshot; api->get_mem_snapshot = get_docker_mem_snapshot; diff --git a/plugins/in_docker/docker.c b/plugins/in_docker/docker.c index 2a1389ec305..ee2e3cca477 100644 --- a/plugins/in_docker/docker.c +++ b/plugins/in_docker/docker.c @@ -482,7 +482,7 @@ static int cb_docker_collect(struct flb_input_instance *ins, (void) config; /* Get current active dockers. */ - active = ctx->cgroup_api.get_active_docker_ids(ctx); + active = ctx->cgroup_api.get_active_container_ids(ctx); filtered = apply_filters(ctx, active); if (!filtered) { diff --git a/plugins/in_docker/docker.h b/plugins/in_docker/docker.h index e6f61c1cdeb..e3423229399 100644 --- a/plugins/in_docker/docker.h +++ b/plugins/in_docker/docker.h @@ -89,7 +89,7 @@ struct flb_docker; struct cgroup_api { int cgroup_version; - struct mk_list* (*get_active_docker_ids) (); + struct mk_list* (*get_active_container_ids) (); char* (*get_container_name) (struct flb_docker *, char *); cpu_snapshot* (*get_cpu_snapshot) (struct flb_docker *, char *); mem_snapshot* (*get_mem_snapshot) (struct flb_docker *, char *); diff --git a/plugins/out_stackdriver/stackdriver.h b/plugins/out_stackdriver/stackdriver.h index 66462cf4fab..f9b489cb62b 100644 --- a/plugins/out_stackdriver/stackdriver.h +++ b/plugins/out_stackdriver/stackdriver.h @@ -82,7 +82,7 @@ #define STDOUT "stdout" #define STDERR "stderr" -#define DEFAULT_TAG_REGEX "(?[a-z0-9](?:[-a-z0-9]*[a-z0-9])?(?:\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)_(?[^_]+)_(?.+)-(?[a-z0-9]{64})\\.log$" +#define DEFAULT_TAG_REGEX "(?[a-z0-9](?:[-a-z0-9]*[a-z0-9])?(?:\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)_(?[^_]+)_(?.+)-(?[a-z0-9]{64})\\.log$" /* Metrics */ #ifdef FLB_HAVE_METRICS diff --git a/scripts/rate_limit.lua b/scripts/rate_limit.lua index 1474d113d85..5cec526d9aa 100644 --- a/scripts/rate_limit.lua +++ b/scripts/rate_limit.lua @@ -11,11 +11,11 @@ local counter = {} local time = 0 -local group_key = "docker_id" -- Used to group logs. Groups are rate limited independently. +local group_key = "container_id" -- Used to group logs. Groups are rate limited independently. local group_bucket_period_s = 60 -- This is the period of of time in seconds over which group_bucket_limit applies. local group_bucket_limit = 6000 -- Maximum number logs allowed per groups over the period of group_bucket_period_s. --- with above values, each and every containers running on the kubernetes will have a limit of 6000 logs for every 60 seconds since contianers have unique kubernetes.docker_id value +-- with above values, each and every containers running on the kubernetes will have a limit of 6000 logs for every 60 seconds since contianers have unique kubernetes.container_id value local function get_current_time(timestamp) return math.floor(timestamp / group_bucket_period_s) diff --git a/tests/internal/avro.c b/tests/internal/avro.c index 45f0734391c..424154eaba5 100644 --- a/tests/internal/avro.c +++ b/tests/internal/avro.c @@ -146,9 +146,9 @@ void test_unpack_to_avro() void test_parse_reordered_schema() { // test same schema but different order of fields - const char *ts1 = "{\"name\":\"qavrov2_record\",\"type\":\"record\",\"fields\":[{\"name\":\"log\",\"type\":\"string\"},{\"name\":\"capture\",\"type\":\"string\"},{\"name\":\"kubernetes\",\"type\":{\"name\":\"krec\",\"type\":\"record\",\"fields\":[{\"name\":\"pod_name\",\"type\":\"string\"},{\"name\":\"namespace_name\",\"type\":\"string\"},{\"name\":\"pod_id\",\"type\":\"string\"},{\"name\":\"labels\",\"type\":{\"type\":\"map\",\"values\":\"string\"}},{\"name\":\"annotations\",\"type\":{\"type\":\"map\",\"values\":\"string\"}},{\"name\":\"host\",\"type\":\"string\"},{\"name\":\"container_name\",\"type\":\"string\"},{\"name\":\"docker_id\",\"type\":\"string\"},{\"name\":\"container_hash\",\"type\":\"string\"},{\"name\":\"container_image\",\"type\":\"string\"}]}}]}"; - const char *ts2 = "{\"name\":\"qavrov2_record\",\"type\":\"record\",\"fields\":[{\"name\":\"capture\",\"type\":\"string\"},{\"name\":\"log\",\"type\":\"string\"},{\"name\":\"kubernetes\",\"type\":{\"name\":\"krec\",\"type\":\"record\",\"fields\":[{\"name\":\"namespace_name\",\"type\":\"string\"},{\"name\":\"pod_name\",\"type\":\"string\"},{\"name\":\"pod_id\",\"type\":\"string\"},{\"name\":\"annotations\",\"type\":{\"type\":\"map\",\"values\":\"string\"}},{\"name\":\"labels\",\"type\":{\"type\":\"map\",\"values\":\"string\"}},{\"name\":\"host\",\"type\":\"string\"},{\"name\":\"container_name\",\"type\":\"string\"},{\"name\":\"docker_id\",\"type\":\"string\"},{\"name\":\"container_hash\",\"type\":\"string\"},{\"name\":\"container_image\",\"type\":\"string\"}]}}]}"; - const char *ts3 = "{\"name\":\"qavrov2_record\",\"type\":\"record\",\"fields\":[{\"name\":\"newnovalue\",\"type\":\"string\"},{\"name\":\"capture\",\"type\":\"string\"},{\"name\":\"log\",\"type\":\"string\"},{\"name\":\"kubernetes\",\"type\":{\"name\":\"krec\",\"type\":\"record\",\"fields\":[{\"name\":\"namespace_name\",\"type\":\"string\"},{\"name\":\"pod_name\",\"type\":\"string\"},{\"name\":\"pod_id\",\"type\":\"string\"},{\"name\":\"annotations\",\"type\":{\"type\":\"map\",\"values\":\"string\"}},{\"name\":\"labels\",\"type\":{\"type\":\"map\",\"values\":\"string\"}},{\"name\":\"host\",\"type\":\"string\"},{\"name\":\"container_name\",\"type\":\"string\"},{\"name\":\"docker_id\",\"type\":\"string\"},{\"name\":\"container_hash\",\"type\":\"string\"},{\"name\":\"container_image\",\"type\":\"string\"}]}}]}"; + const char *ts1 = "{\"name\":\"qavrov2_record\",\"type\":\"record\",\"fields\":[{\"name\":\"log\",\"type\":\"string\"},{\"name\":\"capture\",\"type\":\"string\"},{\"name\":\"kubernetes\",\"type\":{\"name\":\"krec\",\"type\":\"record\",\"fields\":[{\"name\":\"pod_name\",\"type\":\"string\"},{\"name\":\"namespace_name\",\"type\":\"string\"},{\"name\":\"pod_id\",\"type\":\"string\"},{\"name\":\"labels\",\"type\":{\"type\":\"map\",\"values\":\"string\"}},{\"name\":\"annotations\",\"type\":{\"type\":\"map\",\"values\":\"string\"}},{\"name\":\"host\",\"type\":\"string\"},{\"name\":\"container_name\",\"type\":\"string\"},{\"name\":\"container_id\",\"type\":\"string\"},{\"name\":\"container_hash\",\"type\":\"string\"},{\"name\":\"container_image\",\"type\":\"string\"}]}}]}"; + const char *ts2 = "{\"name\":\"qavrov2_record\",\"type\":\"record\",\"fields\":[{\"name\":\"capture\",\"type\":\"string\"},{\"name\":\"log\",\"type\":\"string\"},{\"name\":\"kubernetes\",\"type\":{\"name\":\"krec\",\"type\":\"record\",\"fields\":[{\"name\":\"namespace_name\",\"type\":\"string\"},{\"name\":\"pod_name\",\"type\":\"string\"},{\"name\":\"pod_id\",\"type\":\"string\"},{\"name\":\"annotations\",\"type\":{\"type\":\"map\",\"values\":\"string\"}},{\"name\":\"labels\",\"type\":{\"type\":\"map\",\"values\":\"string\"}},{\"name\":\"host\",\"type\":\"string\"},{\"name\":\"container_name\",\"type\":\"string\"},{\"name\":\"container_id\",\"type\":\"string\"},{\"name\":\"container_hash\",\"type\":\"string\"},{\"name\":\"container_image\",\"type\":\"string\"}]}}]}"; + const char *ts3 = "{\"name\":\"qavrov2_record\",\"type\":\"record\",\"fields\":[{\"name\":\"newnovalue\",\"type\":\"string\"},{\"name\":\"capture\",\"type\":\"string\"},{\"name\":\"log\",\"type\":\"string\"},{\"name\":\"kubernetes\",\"type\":{\"name\":\"krec\",\"type\":\"record\",\"fields\":[{\"name\":\"namespace_name\",\"type\":\"string\"},{\"name\":\"pod_name\",\"type\":\"string\"},{\"name\":\"pod_id\",\"type\":\"string\"},{\"name\":\"annotations\",\"type\":{\"type\":\"map\",\"values\":\"string\"}},{\"name\":\"labels\",\"type\":{\"type\":\"map\",\"values\":\"string\"}},{\"name\":\"host\",\"type\":\"string\"},{\"name\":\"container_name\",\"type\":\"string\"},{\"name\":\"container_id\",\"type\":\"string\"},{\"name\":\"container_hash\",\"type\":\"string\"},{\"name\":\"container_image\",\"type\":\"string\"}]}}]}"; const char *schemas[] = {ts1, ts2, ts3, ts2, ts1, NULL}; diff --git a/tests/internal/data/avro/live-sample.json b/tests/internal/data/avro/live-sample.json index ba6eb8acae3..72551b9e92a 100644 --- a/tests/internal/data/avro/live-sample.json +++ b/tests/internal/data/avro/live-sample.json @@ -18,7 +18,7 @@ }, "host": "wedddd.dkdk.qqqq.com", "container_name": "tb1", - "docker_id": "50bfc67d-cd3c-410d-9369-8bda8f33b1c7", + "container_id": "50bfc67d-cd3c-410d-9369-8bda8f33b1c7", "container_hash": "qqqq.corp.qqqq.com/ai/centos/tf1.15.0-py3.7-horovod@sha256:68b6885f6d1d3fd87ce425a2b2aa687440b9578740d60996912a816ae67be85e", "container_image": "qqqq.corp.qqqq.com/ai/centos/tf1.15.0-py3.7-horovod:1.2" } diff --git a/tests/internal/data/avro/multiline.json b/tests/internal/data/avro/multiline.json index 8d0173e8903..2265fcbe131 100644 --- a/tests/internal/data/avro/multiline.json +++ b/tests/internal/data/avro/multiline.json @@ -19,7 +19,7 @@ }, "host": "wedddd.dkdk.qqqq.com", "container_name": "tb1", - "docker_id": "50bfc67d-cd3c-410d-9369-8bda8f33b1c7", + "container_id": "50bfc67d-cd3c-410d-9369-8bda8f33b1c7", "container_hash": "qqqq.corp.qqqq.com/ai/centos/tf1.15.0-py3.7-horovod@sha256:68b6885f6d1d3fd87ce425a2b2aa687440b9578740d60996912a816ae67be85e", "container_image": "qqqq.corp.qqqq.com/ai/centos/tf1.15.0-py3.7-horovod:1.2" } diff --git a/tests/runtime/data/kubernetes/out/core/core_base-with-namespace-labels-and-annotations_fluent-bit.out b/tests/runtime/data/kubernetes/out/core/core_base-with-namespace-labels-and-annotations_fluent-bit.out index 19deeb0503c..c3c6e838f5e 100644 --- a/tests/runtime/data/kubernetes/out/core/core_base-with-namespace-labels-and-annotations_fluent-bit.out +++ b/tests/runtime/data/kubernetes/out/core/core_base-with-namespace-labels-and-annotations_fluent-bit.out @@ -1 +1 @@ -[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"base-with-namespace-labels-and-annotations","namespace_name":"core","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","pod_ip":"100.116.192.42","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"},"kubernetes_namespace":{"name":"core","labels":{"fake-namespace-label1":"label1","fake-namespace-label2":"label2"},"annotations":{"fake-annotation1":"test1","fake-annotation2":"test2"}}}] +[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"base-with-namespace-labels-and-annotations","namespace_name":"core","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","pod_ip":"100.116.192.42","container_name":"fluent-bit","container_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"},"kubernetes_namespace":{"name":"core","labels":{"fake-namespace-label1":"label1","fake-namespace-label2":"label2"},"annotations":{"fake-annotation1":"test1","fake-annotation2":"test2"}}}] diff --git a/tests/runtime/data/kubernetes/out/core/core_base_fluent-bit.out b/tests/runtime/data/kubernetes/out/core/core_base_fluent-bit.out index e9de515f7af..58a433431c1 100644 --- a/tests/runtime/data/kubernetes/out/core/core_base_fluent-bit.out +++ b/tests/runtime/data/kubernetes/out/core/core_base_fluent-bit.out @@ -1 +1 @@ -[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"base","namespace_name":"core","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","pod_ip":"100.116.192.42","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] +[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"base","namespace_name":"core","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","pod_ip":"100.116.192.42","container_name":"fluent-bit","container_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] diff --git a/tests/runtime/data/kubernetes/out/kairosdb-914055854-b63vq.out b/tests/runtime/data/kubernetes/out/kairosdb-914055854-b63vq.out index cec200b8d54..b6790a7fa03 100644 --- a/tests/runtime/data/kubernetes/out/kairosdb-914055854-b63vq.out +++ b/tests/runtime/data/kubernetes/out/kairosdb-914055854-b63vq.out @@ -1 +1 @@ -[1541358747.464754,{"_UID":"1000","_GID":"1000","_CAP_EFFECTIVE":"0","_SELINUX_CONTEXT":"unconfined\n","_AUDIT_LOGINUID":"1000","_SYSTEMD_OWNER_UID":"1000","_SYSTEMD_SLICE":"user-1000.slice","_SYSTEMD_USER_SLICE":"-.slice","_BOOT_ID":"e3abb4093a904a169e2ac21af241392f","_MACHINE_ID":"28d81df105e641e9b7d85e9d41433662","_HOSTNAME":"cube","PRIORITY":"6","CODE_FILE":"filter_kubernetes.c","CODE_LINE":"456","CODE_FUNC":"flb_test_systemd_logs","CONTAINER_NAME":"k8s_kairosdb_kairosdb-914055854-b63vq_default_d6c53deb-05a4-11e8-a8c4-080027435fb7_23","CONTAINER_TAG":"","CONTAINER_ID":"56e257661383","CONTAINER_ID_FULL":"56e257661383836fac4cd90a23ee8a7a02ee1538c8f35657d1a90f3de1065a22","MESSAGE":"08:58:45.839 [qtp151442075-47] DEBUG [HttpParser.java:281] - filled 157/157","KUBE_TEST":"2018","SYSLOG_IDENTIFIER":"flb-rt-filter_kubernetes","_TRANSPORT":"journal","_PID":"32318","_COMM":"flb-rt-filter_k","_EXE":"build/bin/flb-rt-filter_kubernetes","_CMDLINE":"bin/flb-rt-filter_kubernetes","_AUDIT_SESSION":"7417","_SYSTEMD_CGROUP":"/user.slice/user-1000.slice/session-7417.scope","_SYSTEMD_SESSION":"7417","_SYSTEMD_UNIT":"session-7417.scope","_SYSTEMD_INVOCATION_ID":"899c0f7241ae4db0af3cb4088dca76b0","_SOURCE_REALTIME_TIMESTAMP":"1541358747464738","kubernetes":{"pod_name":"kairosdb-914055854-b63vq","namespace_name":"default","pod_id":"d6c53deb-05a4-11e8-a8c4-080027435fb7","labels":{"name":"kairosdb","pod-template-hash":"914055854"},"annotations":{"kubernetes.io/created-by":"{\"kind\":\"SerializedReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"ReplicaSet\",\"namespace\":\"default\",\"name\":\"kairosdb-914055854\",\"uid\":\"d6c2f841-05a4-11e8-a8c4-080027435fb7\",\"apiVersion\":\"extensions\",\"resourceVersion\":\"1592\"}}\n"},"host":"192.168.10.169","pod_ip":"10.2.39.12","container_name":"kairosdb","docker_id":"02d45318f220ad01109d13df31fbbb0668b87fdd06ef6607abfdecf5eba4b311","container_hash":"davradocker/docker-kairosdb@sha256:2ee07e3f3ba61b96597c78ab0aa7b837d771b375888b020da7a7316bb524b6e8","container_image":"davradocker/docker-kairosdb:1.1.1_9"}}] +[1541358747.464754,{"_UID":"1000","_GID":"1000","_CAP_EFFECTIVE":"0","_SELINUX_CONTEXT":"unconfined\n","_AUDIT_LOGINUID":"1000","_SYSTEMD_OWNER_UID":"1000","_SYSTEMD_SLICE":"user-1000.slice","_SYSTEMD_USER_SLICE":"-.slice","_BOOT_ID":"e3abb4093a904a169e2ac21af241392f","_MACHINE_ID":"28d81df105e641e9b7d85e9d41433662","_HOSTNAME":"cube","PRIORITY":"6","CODE_FILE":"filter_kubernetes.c","CODE_LINE":"456","CODE_FUNC":"flb_test_systemd_logs","CONTAINER_NAME":"k8s_kairosdb_kairosdb-914055854-b63vq_default_d6c53deb-05a4-11e8-a8c4-080027435fb7_23","CONTAINER_TAG":"","CONTAINER_ID":"56e257661383","CONTAINER_ID_FULL":"56e257661383836fac4cd90a23ee8a7a02ee1538c8f35657d1a90f3de1065a22","MESSAGE":"08:58:45.839 [qtp151442075-47] DEBUG [HttpParser.java:281] - filled 157/157","KUBE_TEST":"2018","SYSLOG_IDENTIFIER":"flb-rt-filter_kubernetes","_TRANSPORT":"journal","_PID":"32318","_COMM":"flb-rt-filter_k","_EXE":"build/bin/flb-rt-filter_kubernetes","_CMDLINE":"bin/flb-rt-filter_kubernetes","_AUDIT_SESSION":"7417","_SYSTEMD_CGROUP":"/user.slice/user-1000.slice/session-7417.scope","_SYSTEMD_SESSION":"7417","_SYSTEMD_UNIT":"session-7417.scope","_SYSTEMD_INVOCATION_ID":"899c0f7241ae4db0af3cb4088dca76b0","_SOURCE_REALTIME_TIMESTAMP":"1541358747464738","kubernetes":{"pod_name":"kairosdb-914055854-b63vq","namespace_name":"default","pod_id":"d6c53deb-05a4-11e8-a8c4-080027435fb7","labels":{"name":"kairosdb","pod-template-hash":"914055854"},"annotations":{"kubernetes.io/created-by":"{\"kind\":\"SerializedReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"ReplicaSet\",\"namespace\":\"default\",\"name\":\"kairosdb-914055854\",\"uid\":\"d6c2f841-05a4-11e8-a8c4-080027435fb7\",\"apiVersion\":\"extensions\",\"resourceVersion\":\"1592\"}}\n"},"host":"192.168.10.169","pod_ip":"10.2.39.12","container_name":"kairosdb","container_id":"02d45318f220ad01109d13df31fbbb0668b87fdd06ef6607abfdecf5eba4b311","container_hash":"davradocker/docker-kairosdb@sha256:2ee07e3f3ba61b96597c78ab0aa7b837d771b375888b020da7a7316bb524b6e8","container_image":"davradocker/docker-kairosdb:1.1.1_9"}}] diff --git a/tests/runtime/data/kubernetes/out/options/options_use-kubelet-disabled_fluent-bit.out b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-disabled_fluent-bit.out index b2f8eda4a8f..aaf4cd72bbb 100644 --- a/tests/runtime/data/kubernetes/out/options/options_use-kubelet-disabled_fluent-bit.out +++ b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-disabled_fluent-bit.out @@ -1 +1 @@ -[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-disabled","namespace_name":"options","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","pod_ip":"100.116.192.42","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] +[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-disabled","namespace_name":"options","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","pod_ip":"100.116.192.42","container_name":"fluent-bit","container_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] diff --git a/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled_fluent-bit.out b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled_fluent-bit.out index a4a30664b8b..13de0094625 100644 --- a/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled_fluent-bit.out +++ b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled_fluent-bit.out @@ -1 +1 @@ -[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-enabled","namespace_name":"options","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","pod_ip":"100.116.192.42","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] +[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-enabled","namespace_name":"options","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","pod_ip":"100.116.192.42","container_name":"fluent-bit","container_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] diff --git a/tests/runtime/filter_log_to_metrics.c b/tests/runtime/filter_log_to_metrics.c index a68007b0885..d98aa4e169f 100644 --- a/tests/runtime/filter_log_to_metrics.c +++ b/tests/runtime/filter_log_to_metrics.c @@ -73,7 +73,7 @@ void flb_test_log_to_metrics_label(void); "\"kubernetes\":{" \ "\"container_name\": \"mycontainer\"," \ "\"namespace_name\": \"k8s-dummy\"," \ - "\"docker_id\": \"abc123\"," \ + "\"container_id\": \"abc123\"," \ "\"pod_name\": \"testpod\"," \ "\"pod_id\": \"def456\"," \ "}," \ @@ -89,7 +89,7 @@ void flb_test_log_to_metrics_label(void); "\"kubernetes\":{" \ "\"container_name\": \"mycontainer\"," \ "\"namespace_name\": \"k8s-dummy\"," \ - "\"docker_id\": \"abc123\"," \ + "\"container_id\": \"abc123\"," \ "\"pod_name\": \"testpod\"," \ "\"pod_id\": \"def456\"," \ "}," \ @@ -105,7 +105,7 @@ void flb_test_log_to_metrics_label(void); "\"kubernetes\":{" \ "\"container_name\": \"mycontainer\"," \ "\"namespace_name\": \"k8s-dummy\"," \ - "\"docker_id\": \"abc123\"," \ + "\"container_id\": \"abc123\"," \ "\"pod_name\": \"testpod\"," \ "\"pod_id\": \"def456\"," \ "}," \ diff --git a/tests/runtime/filter_throttle_size.c b/tests/runtime/filter_throttle_size.c index b3f7c3c8c4d..72a70085888 100644 --- a/tests/runtime/filter_throttle_size.c +++ b/tests/runtime/filter_throttle_size.c @@ -15,15 +15,15 @@ static const char *simple_log_with_missing_log_key = static const char *simple_log_with_missing_stream_key = "[1519233660.000000, {\"log\":\"%s\", \"source\":\"%s\", \"time\":\"2018-02-21T17:26:53.360920913Z\", \"value\":\"%d\"}]"; static const char *nested_log = - "[1519234013.360921, {\"logwrapper\":{\"log\":\"%s\", \"extra\":\"field\"}, \"stream\":\"stdout\", \"time\":\"2018-02-21T17:26:53.360920913Z\", \"kubernetes\":{\"pod_name\":\"%s\", \"namespace_name\":\"default\", \"pod_id\":\"64f7da23-172c-11e8-bfad-080027749cbc\", \"labels\":{\"run\":\"apache-logs\"}, \"host\":\"minikube\", \"container_name\":\"apache-logs\", \"docker_id\":\"ac6095b6c715d823d732dcc9067f75b1299de5cc69a012b08d616a6058bdc0ad\"}, \"va\":\"%d\"}]"; + "[1519234013.360921, {\"logwrapper\":{\"log\":\"%s\", \"extra\":\"field\"}, \"stream\":\"stdout\", \"time\":\"2018-02-21T17:26:53.360920913Z\", \"kubernetes\":{\"pod_name\":\"%s\", \"namespace_name\":\"default\", \"pod_id\":\"64f7da23-172c-11e8-bfad-080027749cbc\", \"labels\":{\"run\":\"apache-logs\"}, \"host\":\"minikube\", \"container_name\":\"apache-logs\", \"container_id\":\"ac6095b6c715d823d732dcc9067f75b1299de5cc69a012b08d616a6058bdc0ad\"}, \"va\":\"%d\"}]"; static const char *swap_log_field = - "[1519234013.360921, {\"log\":{\"logwrapper\":\"%s\", \"extra\":\"field\"}, \"stream\":\"stdout\", \"time\":\"2018-02-21T17:26:53.360920913Z\", \"kubernetes\":{\"pod_name\":\"%s\", \"namespace_name\":\"default\", \"pod_id\":\"64f7da23-172c-11e8-bfad-080027749cbc\", \"labels\":{\"run\":\"apache-logs\"}, \"host\":\"minikube\", \"container_name\":\"apache-logs\", \"docker_id\":\"ac6095b6c715d823d732dcc9067f75b1299de5cc69a012b08d616a6058bdc0ad\"}, \"va\":\"%d\"}]"; + "[1519234013.360921, {\"log\":{\"logwrapper\":\"%s\", \"extra\":\"field\"}, \"stream\":\"stdout\", \"time\":\"2018-02-21T17:26:53.360920913Z\", \"kubernetes\":{\"pod_name\":\"%s\", \"namespace_name\":\"default\", \"pod_id\":\"64f7da23-172c-11e8-bfad-080027749cbc\", \"labels\":{\"run\":\"apache-logs\"}, \"host\":\"minikube\", \"container_name\":\"apache-logs\", \"container_id\":\"ac6095b6c715d823d732dcc9067f75b1299de5cc69a012b08d616a6058bdc0ad\"}, \"va\":\"%d\"}]"; static const char *swap_name_field = - "[1519234013.360921, {\"logwrapper\":{\"log\":\"%s\", \"extra\":\"field\"}, \"stream\":\"stdout\", \"time\":\"2018-02-21T17:26:53.360920913Z\", \"pod_name\":{\"kubernetes\":\"%s\", \"namespace_name\":\"default\", \"pod_id\":\"64f7da23-172c-11e8-bfad-080027749cbc\", \"labels\":{\"run\":\"apache-logs\"}, \"host\":\"minikube\", \"container_name\":\"apache-logs\", \"docker_id\":\"ac6095b6c715d823d732dcc9067f75b1299de5cc69a012b08d616a6058bdc0ad\"}, \"va\":\"%d\"}]"; + "[1519234013.360921, {\"logwrapper\":{\"log\":\"%s\", \"extra\":\"field\"}, \"stream\":\"stdout\", \"time\":\"2018-02-21T17:26:53.360920913Z\", \"pod_name\":{\"kubernetes\":\"%s\", \"namespace_name\":\"default\", \"pod_id\":\"64f7da23-172c-11e8-bfad-080027749cbc\", \"labels\":{\"run\":\"apache-logs\"}, \"host\":\"minikube\", \"container_name\":\"apache-logs\", \"container_id\":\"ac6095b6c715d823d732dcc9067f75b1299de5cc69a012b08d616a6058bdc0ad\"}, \"va\":\"%d\"}]"; static const char *nested_log_with_missing_log_field = - "[1519234013.360921, {\"logwrapper\":{\"msg\":\"%s\", \"extra\":\"field\"}, \"stream\":\"stdout\", \"time\":\"2018-02-21T17:26:53.360920913Z\", \"kubernetes\":{\"pod_name\":\"%s\", \"namespace_name\":\"default\", \"pod_id\":\"64f7da23-172c-11e8-bfad-080027749cbc\", \"labels\":{\"run\":\"apache-logs\"}, \"host\":\"minikube\", \"container_name\":\"apache-logs\", \"docker_id\":\"ac6095b6c715d823d732dcc9067f75b1299de5cc69a012b08d616a6058bdc0ad\"}, \"va\":\"%d\"}]"; + "[1519234013.360921, {\"logwrapper\":{\"msg\":\"%s\", \"extra\":\"field\"}, \"stream\":\"stdout\", \"time\":\"2018-02-21T17:26:53.360920913Z\", \"kubernetes\":{\"pod_name\":\"%s\", \"namespace_name\":\"default\", \"pod_id\":\"64f7da23-172c-11e8-bfad-080027749cbc\", \"labels\":{\"run\":\"apache-logs\"}, \"host\":\"minikube\", \"container_name\":\"apache-logs\", \"container_id\":\"ac6095b6c715d823d732dcc9067f75b1299de5cc69a012b08d616a6058bdc0ad\"}, \"va\":\"%d\"}]"; static const char *nested_log_with_missing_name_field = - "[1519234013.360921, {\"logwrapper\":{\"log\":\"%s\", \"extra\":\"field\"}, \"stream\":\"stdout\", \"time\":\"2018-02-21T17:26:53.360920913Z\", \"kubernetes\":{\"pod_alias\":\"%s\", \"namespace_name\":\"default\", \"pod_id\":\"64f7da23-172c-11e8-bfad-080027749cbc\", \"labels\":{\"run\":\"apache-logs\"}, \"host\":\"minikube\", \"container_name\":\"apache-logs\", \"docker_id\":\"ac6095b6c715d823d732dcc9067f75b1299de5cc69a012b08d616a6058bdc0ad\"}, \"va\":\"%d\"}]"; + "[1519234013.360921, {\"logwrapper\":{\"log\":\"%s\", \"extra\":\"field\"}, \"stream\":\"stdout\", \"time\":\"2018-02-21T17:26:53.360920913Z\", \"kubernetes\":{\"pod_alias\":\"%s\", \"namespace_name\":\"default\", \"pod_id\":\"64f7da23-172c-11e8-bfad-080027749cbc\", \"labels\":{\"run\":\"apache-logs\"}, \"host\":\"minikube\", \"container_name\":\"apache-logs\", \"container_id\":\"ac6095b6c715d823d732dcc9067f75b1299de5cc69a012b08d616a6058bdc0ad\"}, \"va\":\"%d\"}]"; static const char *_32_bytes_msg = "This meeesage is 32 symbols long"; static const char *_11_bytes_msg = "I will pass"; static const char *_6_bytes_msg = "I pass";