{"id":17664433,"url":"https://github.com/tilfin/fluent-plugin-bunyan-to-google-cloud-logging","last_synced_at":"2025-03-30T12:16:51.743Z","repository":{"id":56846868,"uuid":"142647634","full_name":"tilfin/fluent-plugin-bunyan-to-google-cloud-logging","owner":"tilfin","description":"Fluentd plugin to parse bunyan format logs and to transfer Google Cloud Logging.","archived":false,"fork":false,"pushed_at":"2018-10-29T15:11:59.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-11T11:53:19.419Z","etag":null,"topics":["bunyan","fluentd-plugin","google-cloud-logging","stackdriver-logs"],"latest_commit_sha":null,"homepage":"","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/tilfin.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}},"created_at":"2018-07-28T04:47:10.000Z","updated_at":"2018-10-29T15:12:01.000Z","dependencies_parsed_at":"2022-09-09T01:00:51.793Z","dependency_job_id":null,"html_url":"https://github.com/tilfin/fluent-plugin-bunyan-to-google-cloud-logging","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilfin%2Ffluent-plugin-bunyan-to-google-cloud-logging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilfin%2Ffluent-plugin-bunyan-to-google-cloud-logging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilfin%2Ffluent-plugin-bunyan-to-google-cloud-logging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilfin%2Ffluent-plugin-bunyan-to-google-cloud-logging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tilfin","download_url":"https://codeload.github.com/tilfin/fluent-plugin-bunyan-to-google-cloud-logging/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246314150,"owners_count":20757463,"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":["bunyan","fluentd-plugin","google-cloud-logging","stackdriver-logs"],"created_at":"2024-10-23T20:05:25.130Z","updated_at":"2025-03-30T12:16:51.711Z","avatar_url":"https://github.com/tilfin.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fluent-plugin-bunyan-to-google-cloud-logging\n\n[![Gem Version](https://badge.fury.io/rb/fluent-plugin-bunyan-to-google-cloud-logging.svg)](https://badge.fury.io/rb/fluent-plugin-bunyan-to-google-cloud-logging)\n\n[Fluentd](https://www.fluentd.org/) plugin to parse [bunyan](https://www.npmjs.com/package/bunyan) format logs and to transfer Google Cloud Logging.\n\n## Installation\n\n### RubyGems\n\n```\n$ gem install fluent-plugin-bunyan-to-google-cloud-logging\n```\n\n### Bundler\n\nAdd following line to your Gemfile:\n\n```ruby\ngem \"fluent-plugin-bunyan-to-google-cloud-logging\"\n```\n\nAnd then execute:\n\n```\n$ bundle\n```\n\n## Configuration\n\n### Example 1. Tailing a log file and transfering to Google Cloud Logging\n\n```\n\u003csource\u003e\n  @type tail\n  path /tmp/myapp.log\n  pos_file /tmp/myapp.log.pos\n  tag myapp.trace\n  \u003cparse\u003e\n    @type json\n    time_key time\n    time_format %FT%T.%L%z\n  \u003c/parse\u003e\n\u003c/source\u003e\n\n\u003cmatch **\u003e\n  @type bunyan_to_google_cloud_logging\n  project_id  'my-project-211117'\n  keyfile /etc/td-agent/secret/keyfile.json\n\u003c/match\u003e\n```\n\n### Example 2. Receiving docker container logs and transfering to Google Cloud Logging\n\n#### /etc/td-agent/td-agent.conf\n\n```\n\u003csource\u003e\n  @type forward\n\u003c/source\u003e\n\n\u003cfilter docker.**\u003e\n  @type parser\n  format json\n  key_name log\n  time_key time\n  time_format %FT%T.%L%z\n  reserve_data yes\n\u003c/filter\u003e\n\n\u003cfilter docker.**\u003e\n  @type record_transformer\n  remove_keys log\n  \u003crecord\u003e\n    time ${time}\n    app_tag ${tag_parts[1]}\n  \u003c/record\u003e\n\u003c/filter\u003e\n\n\u003cmatch docker.**\u003e\n  @type bunyan_to_google_cloud_logging\n  project_id  'high-office-001'\n  keyfile /etc/td-agent/secret/gcp-key.json\n\u003c/match\u003e\n\n\u003clabel @ERROR\u003e\n  \u003cmatch **\u003e\n    @type bunyan_to_google_cloud_logging\n    project_id  'high-office-001'\n    keyfile /etc/td-agent/secret/gcp-key.json\n  \u003c/match\u003e\n\u003c/label\u003e\n```\n\n#### docker-compose.yml \n\n```\nversion: '3'\nservices:\n  yourwebapp:\n    image: registry.example.com/yourwebapp\n    logging:\n      driver: fluentd\n      options:\n        fluentd-address: \"localhost:24224\"\n        tag: \"docker.webapp\"\n    environment:\n      NODE_ENV: production\n    ports:\n      - 8080:8080\n```\n\n## Fluent::Plugin::BunyanToGoogleCloudLoggingOutput\n\n### project_id (string) (required)\n\nyour Project ID on Google Cloud Platform\n\n### keyfile (string) (required)\n\nSpecify the path of key json file\nhttps://cloud.google.com/iam/docs/creating-managing-service-account-keys\n\n## Copyright\n\n* Copyright(c) 2018- Toshimitsu Takahashi\n* License\n  * Apache License, Version 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilfin%2Ffluent-plugin-bunyan-to-google-cloud-logging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftilfin%2Ffluent-plugin-bunyan-to-google-cloud-logging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilfin%2Ffluent-plugin-bunyan-to-google-cloud-logging/lists"}