{"id":19096617,"url":"https://github.com/sapcc/fluent-plugin-mysql-enrich","last_synced_at":"2026-06-04T16:31:54.554Z","repository":{"id":41954515,"uuid":"311611793","full_name":"sapcc/fluent-plugin-mysql-enrich","owner":"sapcc","description":"Fluentd filter plugin to enrich a record with data fetched from a MySQL/MariaDB database.","archived":false,"fork":false,"pushed_at":"2023-12-15T17:30:27.000Z","size":12,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":52,"default_branch":"master","last_synced_at":"2025-02-19T18:47:22.462Z","etag":null,"topics":["fluentd-fil","fluentd-plugin"],"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/sapcc.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-11-10T09:42:27.000Z","updated_at":"2024-12-11T11:08:28.000Z","dependencies_parsed_at":"2024-11-09T03:37:19.726Z","dependency_job_id":"4650c5f0-e0a9-4728-9b00-05f15265abb1","html_url":"https://github.com/sapcc/fluent-plugin-mysql-enrich","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Ffluent-plugin-mysql-enrich","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Ffluent-plugin-mysql-enrich/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Ffluent-plugin-mysql-enrich/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Ffluent-plugin-mysql-enrich/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sapcc","download_url":"https://codeload.github.com/sapcc/fluent-plugin-mysql-enrich/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240149812,"owners_count":19755752,"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":["fluentd-fil","fluentd-plugin"],"created_at":"2024-11-09T03:37:15.909Z","updated_at":"2026-05-26T20:30:17.789Z","avatar_url":"https://github.com/sapcc.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fluent-plugin-mysql_enrich\n\nA Fluent filter plugin to enrich a record with one or more tags.\nThe data for the enrichment can be selected from a MySQL/MariaDB and is cached.\nThe values in the column 'sql_key' of the database and the value in the record 'record_key' must correspond to each other.\nThese are used to store the rows in the cache and look them up for the enrichment.\nThe list of columns must correspond to the list of columns that the query returns. These specify which values are used to enrich the record.\nEach column will be a new field in the record.\n\n## Requirements\n\nFluentd \u003e= v0.12\n\n## Install\n\n```shell\ngem install fluent-plugin-mysql_enrich\n```\n\n## Configuration Example\n\n```conf\n\u003cfilter tag.dummy.*\u003e\n  type mysql_enrich\n  host db.localhost\n  port 3306\n  database mydb\n  username user\n  password password123\n  sql select * from foo;\n  sql_key abc\n  record_key remote_addr\n  columns project_id, port_id\n  refresh_interval 60\n  read_timeout 60\n\u003c/filter\u003e\n```\n\n### sample\n\nrecord before filter\n\n```\n{\n  \"remote_addr\": 10.40.36.36\n}\n```\n\nrecord after filter\n\n```\n{\n    \"remote_addr\": 10.40.36.36,\n    \"project_id\": myproject-id-1234,\n    \"port_id\": 123123213123\n}\n```\n\n\n## Parameters\n\n* host (required)\n\n  MariaDB host or ip\n\n* port\n\n  MariaDB port. Default is 3306 which is the MySQL default port.\n\n* database (required)\n\n  MariaDB database name\n\n* username (required)\n\n  MariaDB login user name\n\n* password\n\n  MariaDB login password. Default is empty string.\n\n* sql (required)\n\n  The sql statement that is executed to fill the cache.\n\n* sql_key (required)\n\n  The key field from the sql table that is used as the key in the cache. This must correspond to the record key. The record key is later used to do the lookups in the cache.\n\n* record_key (required)\n\n  The field from the record that is used for the lookups in the local cache. This must correspond to the sql_key.\n\n* columns (required)\n\n  The array of column names that are taken from the lookup result to enrich the record.\n\n* refresh_interval\n\n  The interval in seconds in which the local cache is refreshed. Default are 60 seconds.\n\n* read_timeout\n\n  Set read timeout in seconds for MySQL Connection, defaults to 60s\n\n## Copyright\n\nCopyright (c) 2020 SAP SE. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapcc%2Ffluent-plugin-mysql-enrich","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsapcc%2Ffluent-plugin-mysql-enrich","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapcc%2Ffluent-plugin-mysql-enrich/lists"}