{"id":28070048,"url":"https://github.com/rpcpool/fluent-plugin-triton","last_synced_at":"2025-05-12T19:35:58.433Z","repository":{"id":266867361,"uuid":"899104584","full_name":"rpcpool/fluent-plugin-triton","owner":"rpcpool","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-21T17:59:10.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-21T18:45:31.811Z","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/rpcpool.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-12-05T16:20:01.000Z","updated_at":"2025-04-21T17:58:49.000Z","dependencies_parsed_at":"2024-12-06T16:43:33.292Z","dependency_job_id":"582cfde6-2f7a-4b32-a84f-7a49243050a0","html_url":"https://github.com/rpcpool/fluent-plugin-triton","commit_stats":null,"previous_names":["rpcpool/fluent-plugin-triton"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpcpool%2Ffluent-plugin-triton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpcpool%2Ffluent-plugin-triton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpcpool%2Ffluent-plugin-triton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpcpool%2Ffluent-plugin-triton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rpcpool","download_url":"https://codeload.github.com/rpcpool/fluent-plugin-triton/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253808714,"owners_count":21967586,"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-05-12T19:35:57.688Z","updated_at":"2025-05-12T19:35:58.422Z","avatar_url":"https://github.com/rpcpool.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fluent::Plugin::Triton\n\nWelcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/fluent/plugin/triton`. To experiment with that code, run `bin/console` for an interactive prompt.\n\nThis gem contains Custom Fluentd plugins used at Triton One.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'fluent-plugin-triton'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install fluent-plugin-triton\n\n## Usage\n\n### Nomad filter plugin\n\nThis filter plugin allow you to add tags nomad related records from logs emitted by nomad client.\n\nHere is an example how to write a `fluent.conf` file to add useful nomad tag:\n\n```xml\n\u003csource\u003e\n  @type tail\n  path '/var/lib/nomad/alloc/**/**/alloc/logs/*.stdout.*'\n  pos_file /var/log/td-agent/tmp/access.log.pos\n  \u003cparse\u003e\n    @type json\n  \u003c/parse\u003e\n  path_key tailed_path\n  tag nomad.log\n\u003c/source\u003e\n\n\u003cfilter nomad.log\u003e\n  @type record_transformer\n  enable_ruby\n  \u003crecord\u003e\n    alloc_id ${record['tailed_path'].split('alloc/')[1].split('/')[0]}\n  \u003c/record\u003e\n\u003c/filter\u003e\n\n\u003cfilter nomad.log\u003e\n  @type nomad\n  alloc_id_field alloc_id\n  nomad_addr \u003cNOMAD_ADDR\u003e\n  nomad_token \u003cNOMAD_TOKEN\u003e\n\u003c/filter\u003e\n```\nThe first `nomad.log` source tail all allocation folder generated by nomad-client.\nFor each record we add the provenance \"tailed_path\" to it so we can extract it's allocation id.\n\nThe first `nomad.log` filter extract the `alloc_id` used to query allocation information such as job, node, task group, namespace, etc.\n\nThe second `nomad.log` filter descripe what field contains the `alloc_id` using `alloc_id_field` and you can provide\n`nomad_addr` and `nomad_token` as connection information.\n\nThe last two parameters are optional if `fluentd`'s environment variable contains `NOMAD_TOKEN` and `NOMAD_ADDR`.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/fluent-plugin-triton.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpcpool%2Ffluent-plugin-triton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frpcpool%2Ffluent-plugin-triton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpcpool%2Ffluent-plugin-triton/lists"}