{"id":42462838,"url":"https://github.com/chronosphereio/calyptia-fluent-bit-config-parser","last_synced_at":"2026-01-28T09:30:16.279Z","repository":{"id":38425412,"uuid":"436645665","full_name":"chronosphereio/calyptia-fluent-bit-config-parser","owner":"chronosphereio","description":"🐦  ⚙️  🦫  for JS/TS","archived":false,"fork":false,"pushed_at":"2024-06-18T08:06:54.000Z","size":3067,"stargazers_count":3,"open_issues_count":17,"forks_count":1,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-10-10T18:55:55.908Z","etag":null,"topics":["configuration","fluent-bit","parser","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":false,"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/chronosphereio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-12-09T14:25:12.000Z","updated_at":"2024-03-14T21:12:18.000Z","dependencies_parsed_at":"2023-11-15T22:36:54.538Z","dependency_job_id":"3e36dd9c-13e6-4620-9540-0a0f1ccbab34","html_url":"https://github.com/chronosphereio/calyptia-fluent-bit-config-parser","commit_stats":{"total_commits":37,"total_committers":2,"mean_commits":18.5,"dds":"0.10810810810810811","last_synced_commit":"01349de7128eaf20ff4aa518502b853984c4c72f"},"previous_names":["calyptia/fluent-bit-config-parser"],"tags_count":9,"template":false,"template_full_name":"gagoar/ts-node-template","purl":"pkg:github/chronosphereio/calyptia-fluent-bit-config-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronosphereio%2Fcalyptia-fluent-bit-config-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronosphereio%2Fcalyptia-fluent-bit-config-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronosphereio%2Fcalyptia-fluent-bit-config-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronosphereio%2Fcalyptia-fluent-bit-config-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chronosphereio","download_url":"https://codeload.github.com/chronosphereio/calyptia-fluent-bit-config-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronosphereio%2Fcalyptia-fluent-bit-config-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28843917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T07:39:25.367Z","status":"ssl_error","status_checked_at":"2026-01-28T07:39:24.487Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["configuration","fluent-bit","parser","typescript"],"created_at":"2026-01-28T09:30:12.235Z","updated_at":"2026-01-28T09:30:16.273Z","avatar_url":"https://github.com/chronosphereio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.npmjs.com/package/@calyptia/fluent-bit-config-parser\"\u003e\n      \u003cimg src=\"https://img.shields.io/npm/v/@calyptia/fluent-bit-config-parser\" alt=\"npm version\" /\u003e\n    \u003c/a\u003e \n    \u003ca href=\"https://github.com/calyptia/fluent-bit-config-parser/actions/workflows/linting.yml\"\u003e\n      \u003cimg src=\"https://github.com/calyptia/fluent-bit-config-parser/actions/workflows/linting.yml/badge.svg\" alt=\"Linting\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/calyptia/fluent-bit-config-parser/actions/workflows/unit-tests.yml\"\u003e\n      \u003cimg src=\"https://github.com/calyptia/fluent-bit-config-parser/actions/workflows/unit-tests.yml/badge.svg\" alt=\"unit-tests\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/calyptia/fluent-bit-config-parser\"\u003e\n      \u003cimg src=\"https://codecov.io/gh/calyptia/fluent-bit-config-parser/branch/main/graph/badge.svg?token=48gHuQl8zV\" alt=\"codecov\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/calyptia/fluent-bit-config-parser/blob/main/LICENSE\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/license/calyptia/fluent-bit-config-parser\" alt=\"APACHE 2.0 license\" /\u003e\n    \u003c/a\u003e\n      \u003ca href=\"http://slack.fluentd.org/\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/slack-@slack.fluentd.org-green.svg?logo=slack\" alt=\"Slack\" /\u003e\n    \u003c/a\u003e\n   \n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/calyptia/fluent-bit-config-parser\"\u003e\n    \u003cimg src=\"images/logo.svg\" alt=\"Logo\" width=\"128\" height=\"128\"\u003e\n  \u003c/a\u003e\n\n\u003c/p\u003e\n\nConfiguration parser for [Fluent-bit](https://github.com/fluent/fluent-bit)\n\n## Table of Contents 🦫\n\n- [Getting Started](#getting-started)\n  - [How to import](#how-to-import)\n  - [Use Cases](#use-cases)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Getting Started\n\nfluent-bit configuration parser will allow you to validate some aspects of fluent-bit configuration.\n\nfor more information about fluent-bit configuration you can visit [fluent-bit website](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/configuration-file).\n\n### How to import\n\nYou can import the parser as follows:\n\n```typescript\nimport { FluentBitSchema } from '@calyptia/fluent-bit-config-parser';\n```\n\nThis library offers a couple of methods:\n\n`schema`: it will return the parsed configuration as a fluent-bit schema.\n\n`toString()`: it will return the parsed schema, back to a string\n\n`source`: it will return the config as it was provided.\n\n`FluentBitSchema.isFluentBitConfiguration`: A static method, to validate if the configuration is fluentBit. It's important to notice, that this method, will not confirm if the provided config is valid. For that please see below:\n\n## Use cases.\n\n### I have a file, but I'm not sure if is fluent-bit or Fluentd:\n\n```typescript\nimport fs from 'fs';\n\nimport { FluentBitSchema } from '@calyptia/fluent-bit-config-parser';\n\nconst filePath = '/path/to/file.conf';\nconst file = fs.readFileSync(filePath, { encoding: 'utf-8' });\n\nconsole.log(FluentBitSchema.isFluentBitConfiguration(file)); // =\u003e true/false\n```\n\n### I want to confirm if my `fluent-bit` configuration is valid:\n\n```typescript\nimport fs from 'fs';\n\nimport { FluentBitSchema } from '@calyptia/fluent-bit-config-parser';\n\nconst filePath = '/path/to/file.conf';\nconst file = fs.readFileSync(filePath, { encoding: 'utf-8' });\n\ntry {\n  const config = new FluentBitSchema(file);\n  console.log('yay! my configuration is valid');\n} catch (e) {\n  console.log(e.message); // this message will provide some insight int what went wrong.\n}\n```\n\n### I would like to re-format my configuration.\n\n```typescript\nimport fs from 'fs';\n\nimport { FluentBitSchema } from '@calyptia/fluent-bit-config-parser';\n\nconst filePath = '/path/to/file.conf';\n\nconst file = fs.readFileSync(filePath, { encoding: 'utf-8' });\n\nconst config = new FluentBitSchema(file, filePath);\n\nconsole.log(config.toString());\n```\n\n### Options\n\nFluentBitSchema can handle directives such as @SET and @INCLUDE. That's why the second argument is a `filePath`. Sometimes the configuration we create has full paths. These paths will most likely change when placing them in a repository. If that's your case, you can set `ignoreFullPaths: true` and the parser will ignore @INCLUDES containing full paths. One handy example of this could be:\n\n```typescript\nimport fs from 'fs';\n\nimport { FluentBitSchema } from '@calyptia/fluent-bit-config-parser';\n\nconst filePath = '/path/to/file.conf';\n\nconst rawConfig = `\n@INCLUDE /this/is/a/full/path/that/does/not/exist/in/my/repo/config.conf\n\n[INPUT]\n  name dummy\n`;\n\nconst file = fs.readFileSync(filePath, { encoding: 'utf-8' });\n\nconst config = new FluentBitSchema(file, filePath, { ignoreFullPaths: true });\n\nconsole.log(config.toString()); // will not contain the @INCLUDE directive call.\n```\n\n\u003c!-- CONTRIBUTING --\u003e\n\n## Contributing\n\nContributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated **greatly appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\u003c!-- LICENSE --\u003e\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchronosphereio%2Fcalyptia-fluent-bit-config-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchronosphereio%2Fcalyptia-fluent-bit-config-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchronosphereio%2Fcalyptia-fluent-bit-config-parser/lists"}