{"id":22574433,"url":"https://github.com/logicmonitor/lm-logs-fluentbit","last_synced_at":"2025-03-28T15:24:26.429Z","repository":{"id":266418056,"uuid":"861846207","full_name":"logicmonitor/lm-logs-fluentbit","owner":"logicmonitor","description":"IT-54626","archived":false,"fork":false,"pushed_at":"2025-03-24T07:57:31.000Z","size":141907,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-24T08:32:53.007Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/logicmonitor.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-23T15:55:15.000Z","updated_at":"2025-01-15T05:50:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"ad89a26e-2ce3-4d3e-b514-a0c93d13dce3","html_url":"https://github.com/logicmonitor/lm-logs-fluentbit","commit_stats":null,"previous_names":["logicmonitor/lm-logs-fluentbit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logicmonitor%2Flm-logs-fluentbit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logicmonitor%2Flm-logs-fluentbit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logicmonitor%2Flm-logs-fluentbit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logicmonitor%2Flm-logs-fluentbit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/logicmonitor","download_url":"https://codeload.github.com/logicmonitor/lm-logs-fluentbit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246050789,"owners_count":20715714,"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-12-08T03:06:09.019Z","updated_at":"2025-03-28T15:24:26.409Z","avatar_url":"https://github.com/logicmonitor.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# lm-logs-fluentbit\nThis output plugin sends Fluentbit records to the configured LogicMonitor account.\n\n## Prerequisites\n\nInstall the plugin:\n* Install the Fluentbit plugin:       `curl https://raw.githubusercontent.com/fluent/fluent-bit/master/install.sh | sh`\n\n## Configure the output plugin\n\nCreate a custom `fluent-bit.conf` or edit the existing one to specify which logs should be forwarded to LogicMonitor.\n\n```\n# Match events tagged with \"lm.**\" and\n# send them to LogicMonitor\n[SERVICE]\n    Flush        5\n\n[INPUT]\n    Name        \u003cname\u003e\n    Path        \u003cfilename\u003e\n\n[OUTPUT]\n    Name \u003cname\u003e\n    lmCompanyName  \u003ccompany_name_with_domain\u003e\n    Match *\n    Workers 1\n    accessKey \u003caccess_key\u003e\n    accessID \u003caccess_ID\u003e\n    bearerToken Bearer \u003cbearer_token\u003e\n    resourceMapping {\"\u003cevent_key\u003e\": \"\u003clm_property\u003e\"}\n    includeMetadata \u003cboolean_value\u003e\n    lmDebug \u003cboolean_value\u003e\n```\n\nFor more configuration examples, please refer to the examples folder, or see the [Fluentbit configuration documentation](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/classic-mode/configuration-file)\n\n### Request example\n\nSending:\n\n`curl -X POST -d 'json={\"message\":\"hello LogicMonitor from fluentbit\", \"event_key\":\"lm_property_value\"}' http://localhost:8888/lm.test`\n\nProduces this event:\n```\n{\n    \"message\": \"hello LogicMonitor from fluentbit\"\n}\n```\n\n**Note:** Make sure that logs have a message field. Requests sent without a message will not be accepted. \n\n\n### Resource mapping examples\n\n- `{\"message\":\"Hey!!\", \"event_key\":\"lm_property_value\"}` with mapping `{\"event_key\": \"lm_property\"}`\n- `{\"message\":\"Hey!!\", \"_lm.resourceId\": { \"lm_property_name\" : \"lm_property_value\" } }`  this will override resource mapping.\n\n## LogicMonitor properties\n\n| Property          | Description                                                                                                                                                                                            |\n|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `Name`            | Name of the input plugin.                                                                                                                                                                              |\n| `lmCompanyName`   | LogicMonitor account name with domain. For example, test.logicmonitor.com .                                                                                                                            |\n| `Match`           | A pattern to match against the tags of incoming records. For example, * will match everything.                                                                                                         |\n| `Workers`         | Number of workers to operate.                                                                                                                                                                          |\n| `accessID`        | LM API Token access ID. If not provided, omit setting the key entirely.                                                                                                                                |\n| `accessKey`       | LM API Token access key. If not provided, omit setting the key entirely.                                                                                                                               |\n| `bearerToken`     | LM API Bearer Token. Either specify `access_id` and `access_key` both or `bearer_token`. If all specified, LMv1 token(`access_id` and `access_key`) will be used for authentication with Logicmonitor. |\n| `resourceMapping` | The mapping that defines the source of the log event to the LM resource. In this case, the `\u003cevent_key\u003e` in the incoming event is mapped to the value of `\u003clm_property\u003e`.                              |\n| `includeMetadata` | When `true`, appends additional metadata to the log. default `false`.                                                                                                                                  |\n| `lmDebug`         | When `true`, logs more information to the fluent-bit console.                                                                                                                                          |\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogicmonitor%2Flm-logs-fluentbit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flogicmonitor%2Flm-logs-fluentbit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogicmonitor%2Flm-logs-fluentbit/lists"}