{"id":28501946,"url":"https://github.com/fluent/fluent-plugin-parser-cri","last_synced_at":"2025-07-05T02:31:51.633Z","repository":{"id":44668794,"uuid":"322451719","full_name":"fluent/fluent-plugin-parser-cri","owner":"fluent","description":"CRI log parser for Fluentd","archived":false,"fork":false,"pushed_at":"2023-09-12T01:24:34.000Z","size":22,"stargazers_count":34,"open_issues_count":3,"forks_count":9,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-06-08T16:08:27.368Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fluent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-18T01:01:52.000Z","updated_at":"2025-01-02T21:18:35.000Z","dependencies_parsed_at":"2024-06-19T06:17:23.908Z","dependency_job_id":"b34ac0c0-77b4-4e21-abcd-c766e46aca25","html_url":"https://github.com/fluent/fluent-plugin-parser-cri","commit_stats":{"total_commits":16,"total_committers":5,"mean_commits":3.2,"dds":0.5625,"last_synced_commit":"3d89d4db0122e9ff5cb6688f584a4521c016170d"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/fluent/fluent-plugin-parser-cri","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluent%2Ffluent-plugin-parser-cri","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluent%2Ffluent-plugin-parser-cri/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluent%2Ffluent-plugin-parser-cri/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluent%2Ffluent-plugin-parser-cri/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fluent","download_url":"https://codeload.github.com/fluent/fluent-plugin-parser-cri/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluent%2Ffluent-plugin-parser-cri/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263671745,"owners_count":23494027,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-08T16:08:30.522Z","updated_at":"2025-07-05T02:31:51.627Z","avatar_url":"https://github.com/fluent.png","language":"Ruby","readme":"# fluent-plugin-parser-cri\n\n[Fluentd](https://fluentd.org/) parser plugin to parse CRI logs.\n\nCRI logs consist of `time`, `stream`, `logtag` and `message` parts like below:\n\n```\n2020-10-10T00:10:00.333333333Z stdout F Hello Fluentd\n\ntime: 2020-10-10T00:10:00.333333333Z\nstream: stdout\nlogtag: F\nmessage: Hello Fluentd\n```\n\n## Installation\n\n### RubyGems\n\n```\n$ gem install fluent-plugin-parser-cri --no-document\n```\n\n## Configuration\n\n* **merge_cri_fields** (bool) (optional): Put `stream`/`logtag` fields or not when `\u003cparse\u003e` section is specified. Default is `true`\n\n### \\\u003cparse\\\u003e section (optional)\n\nSame as [parser plugin configuration](https://docs.fluentd.org/configuration/parse-section).\n\n```aconf\n\u003cparse\u003e\n  @type cri\n  \u003cparse\u003e\n    @type json\n  \u003c/parse\u003e\n\u003c/parse\u003e\n```\n\nThis nested `\u003cparse\u003e` is used for parsing `message` part.\n\n## Log and configuration example\n\n### Basic case\n\n```aconf\n\u003cparse\u003e\n  @type cri\n\u003c/parse\u003e\n```\n\nWith this configuration, following CRI log\n\n```\n2020-10-10T00:10:00.333333333Z stdout F Hello Fluentd\n```\n\nis parsed to\n\n```\ntime: 2020-10-10T00:10:00.333333333Z\nrecord: {\"stream\":\"stdout\",\"logtag\":\"F\",\"message\":\"Hello Fluentd\",\"time':'2020-10-10T00:10:00.333333333Z\"}\n```\n\n### Parse message part with parsers\n\nBy specifying `\u003cparse\u003e` section, you can parse `message` part with parser plugins.\n\n```aconf\n\u003cparse\u003e\n  @type cri\n  \u003cparse\u003e\n    @type json\n    time_key time\n    time_format %Y-%m-%dT%H:%M:%S.%L%z\n    # keep_time_key true # if you want to keep \"time\" field, enable this parameter\n  \u003c/parse\u003e\n\u003c/parse\u003e\n```\n\nWith this configuration, following CRI log\n\n```\n2020-10-10T00:10:00.333333333Z stdout F {\"foo\":\"bar\",\"num\":100,\"time\":\"2020-11-11T00:11:00.111111111Z\"}\n```\n\nis parsed to\n\n```\ntime: 2020-11-11T00:11:00.111111111Z\nrecord: {\"foo\":\"bar\",\"num\":100,\"stream\":\"stdout\",\"logtag\":\"F\"}\n```\n\nIf you don't need `stream`/`logtag` fields, set `merge_cri_fields false` like below:\n\n```\n\u003cparse\u003e\n  @type cri\n  merge_cri_fields false\n  \u003cparse\u003e\n    @type json\n    time_key time\n    time_format %Y-%m-%dT%H:%M:%S.%L%z\n  \u003c/parse\u003e\n\u003c/parse\u003e\n```\n\n### Concatenate multiple `message` records into one\n\nIf you want to concatenate the following `message` records into one record, \nuse @type [concat](https://github.com/fluent-plugins-nursery/fluent-plugin-concat) filter plugin with `use_partial_cri_logtag` parameter.\n\n ```\n2020-10-10 09:10:00.333333333 +0900 cri: {\"stream\":\"stdout\",\"logtag\":\"P\",\"message\":\"This is first line\",\"time\":\"2020-10-10T00:10:00.333333333Z\"}\n2020-10-10 09:11:00.333333333 +0900 cri: {\"stream\":\"stdout\",\"logtag\":\"F\",\"message\":\"This is last line\",\"time\":\"2020-10-10T00:11:00.333333333Z\"}\n```\n\nSee fluent-plugin-concat's [usage](https://github.com/fluent-plugins-nursery/fluent-plugin-concat#usage) in more details.\n\n\n## Copyright\n\n* Copyright(c) 2020- Fluentd project\n* License\n  * Apache License, Version 2.0\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluent%2Ffluent-plugin-parser-cri","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluent%2Ffluent-plugin-parser-cri","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluent%2Ffluent-plugin-parser-cri/lists"}