{"id":16643458,"url":"https://github.com/sonots/fluentd-server","last_synced_at":"2025-03-21T15:32:35.228Z","repository":{"id":16842562,"uuid":"19602293","full_name":"sonots/fluentd-server","owner":"sonots","description":"Fluentd config distribution server","archived":false,"fork":false,"pushed_at":"2014-06-08T10:15:09.000Z","size":1386,"stargazers_count":21,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-14T23:14:23.946Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sonots.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-09T07:01:06.000Z","updated_at":"2020-06-18T18:28:35.000Z","dependencies_parsed_at":"2022-08-04T11:45:24.227Z","dependency_job_id":null,"html_url":"https://github.com/sonots/fluentd-server","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonots%2Ffluentd-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonots%2Ffluentd-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonots%2Ffluentd-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonots%2Ffluentd-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonots","download_url":"https://codeload.github.com/sonots/fluentd-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244822743,"owners_count":20516158,"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":"2024-10-12T08:08:38.181Z","updated_at":"2025-03-21T15:32:34.891Z","avatar_url":"https://github.com/sonots.png","language":"Ruby","readme":"# Fluentd Server\n\n[![Build Status](https://secure.travis-ci.org/sonots/fluentd-server.png?branch=master)](http://travis-ci.org/sonots/fluentd-server)\n[![Coverage Status](https://coveralls.io/repos/sonots/fluentd-server/badge.png?branch=master)](https://coveralls.io/r/sonots/fluentd-server?branch=master)\n\nA Fluentd config distribution server\n\nDemo: [http://fluentd-server.herokuapp.com](http://fluentd-server.herokuapp.com)\n\n## What You Can Do\n\nWith Fluentd Server, you can manage fluentd configuration files centrally with `erb`. \n\nFor example, you may create a config post whose name is `worker` as:\n\n```\n\u003csource\u003e\n  type forward\n  port \u003c%= port %\u003e\n\u003c/source\u003e\n\n\u003cmatch **\u003e\n  type stdout\n\u003c/match\u003e\n```\n\nThen you can download the config via an API whose uri is like `/api/worker?port=24224` where its query parameters are replaced with variables in the erb. \nThe downloaded contents should become as follows:\n\n```\n\u003csource\u003e\n  type forward\n  port 24224\n\u003c/source\u003e\n\n\u003cmatch **\u003e\n  type stdout\n\u003c/match\u003e\n```\n\n## How to Use\n\nThe `include` directive of fluentd config supports `http`, so write just one line on your fluentd.conf as:\n\n```\n# /etc/fluentd.conf\ninclude http://fqdn.to.fluentd-server/api/:name?port=24224\n```\n\nso that it will download the real configuration from the Fluentd Server where :name is the name of your post. \n\n## Installation\n\nPrerequisites\n\n* SQLite\n* Ruby 2.0 or later\n\n### From Gem package\n\nEasy steps on installation with gem and SQLite.\n\n```bash\n$ gem install fluentd-server\n$ gem install sqlite3\n$ fluentd-server new\n$ cd fluentd-server\n$ fluentd-server init # creates database scheme on SQLite\n$ fluentd-server start\n```\n\nThen see `http://localhost:5126/`.\n\n### From Git repository\n\nInstall from git repository. \n\n```bash\n$ git clone https://github.com/sonots/fluentd-server.git\n$ cd fluentd-server\n$ bundle\n$ bundle exec fluentd-server init # creates database scheme on SQLite\n$ bundle exec fluentd-server start\n```\n\nThen see `http://localhost:5126/`. \n\n## Configuration\n\nTo configure fluentd-server, edit the `.env` file in the project root directory.\n\nThe default configuration is as follows:\n\n```\nPORT=5126\nHOST=0.0.0.0\n# DATABASE_URL=sqlite3:data/fluentd_server.db\n# JOB_DIR=jobs\n# LOG_PATH=STDOUT\n# LOG_LEVEL=debug\n# LOG_SHIFT_AGE=0\n# LOG_SHIFT_SIZE=1048576\n```\n\n## HTTP API\n\nSee [API.md](API.md).\n\n### Use Fluentd Server from Command Line\n\nFor the case you want to edit Fluentd configuration files from your favorite editors rather than from the Web UI, `FILE STORAGE` feature is available.\nWith this feature, you should also be able to manage your configuration files with git (or any VCS).\n\nTo use this feature, enable `FILE_STORAGE` in `.env` file as:\n\n```\nFILE_STORAGE=true\nDATA_DIR=data\nSYNC_INTERVAL=60\n```\n\nwhere the `DATA_DIR` is the location to place your configuration files locally, and the `SYNC_INTERVAL` is the interval where a synchronization worker works.\n\nPlace your `erb` files in the `DATA_DIR` directory, and please execute `sync` command to synchronize the file existence information with DB\nwhen you newly add or remove the configuration files.\n\n```\n$ fluentd-server sync\n```\n\nOr, you may just wait `SYNC_INTERVAL` senconds until a synchronization worker automatically synchronizes the information.\nPlease note that modifying the file content does not require to synchronize because the content is read from the local file directly.\n\nNOTE: Enabling this feature disables to edit the Fluentd configuration from the Web UI.\n\n### CLI (Command Line Interface)\n\nHere is a full list of fluentd-server commands.\n\n```bash\n$ fluentd-server help\nCommands:\n  fluentd-server help [COMMAND]        # Describe available commands or one specific command\n  fluentd-server init                  # Creates database schema\n  fluentd-server job-clean             # Clean fluentd_server delayed_job queue\n  fluentd-server job-worker            # Sartup fluentd_server job worker\n  fluentd-server migrate               # Migrate database schema\n  fluentd-server new                   # Creates fluentd-server resource directory\n  fluentd-server start                 # Sartup fluentd_server\n  fluentd-server sync                  # Synchronize local file storage with db immediately\n  fluentd-server sync-worker           # Sartup fluentd_server sync worker\n  fluentd-server td-agent-condrestart  # Run `/etc/init.d/td-agent condrestart` via serf event\n  fluentd-server td-agent-configtest   # Run `/etc/init.d/td-agent configtest` via serf query\n  fluentd-server td-agent-reload       # Run `/etc/init.d/td-agent reload` via serf event\n  fluentd-server td-agent-restart      # Run `/etc/init.d/td-agent restart` via serf event\n  fluentd-server td-agent-start        # Run `/etc/init.d/td-agent start` via serf event\n  fluentd-server td-agent-status       # Run `/etc/init.d/td-agent status` via serf query\n  fluentd-server td-agent-stop         # Run `/etc/init.d/td-agent stop` via serf event\n```\n\n## ToDo\n\n* Automatic deployment (restart) support like the one of chef-server\n\n  * Need a notification function for when configtest or restart failed\n  * Pipe the resulted json to a command (I may prepare email.rb as an example).\n\n## ChangeLog\n\nSee [CHANGELOG.md](CHANGELOG.md) for details.\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new [Pull Request](../../pull/new/master)\n\n## Copyright\n\nCopyright (c) 2014 Naotoshi Seo. See [LICENSE](LICENSE) for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonots%2Ffluentd-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonots%2Ffluentd-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonots%2Ffluentd-server/lists"}