{"id":18937682,"url":"https://github.com/logflare/logflare_agent","last_synced_at":"2025-04-15T18:32:25.685Z","repository":{"id":48289908,"uuid":"165118803","full_name":"Logflare/logflare_agent","owner":"Logflare","description":"Watch a file and send new lines to Logflare.","archived":false,"fork":false,"pushed_at":"2023-02-07T16:57:07.000Z","size":54,"stargazers_count":25,"open_issues_count":7,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T15:50:34.605Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Logflare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-10T19:30:58.000Z","updated_at":"2025-01-17T10:35:49.000Z","dependencies_parsed_at":"2023-02-19T20:15:29.447Z","dependency_job_id":null,"html_url":"https://github.com/Logflare/logflare_agent","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/Logflare%2Flogflare_agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Logflare%2Flogflare_agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Logflare%2Flogflare_agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Logflare%2Flogflare_agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Logflare","download_url":"https://codeload.github.com/Logflare/logflare_agent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249129310,"owners_count":21217329,"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-11-08T12:12:05.511Z","updated_at":"2025-04-15T18:32:20.676Z","avatar_url":"https://github.com/Logflare.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Logflare Agent\n\n## About\n\nThis Elixir app watches a file and sends new lines to Logflare via the API.\n\n## Usage\n\nTo install stand alone:\n\n  * Install Erlang\n  * Install Elixir\n  * `git clone https://github.com/Logflare/logflare-agent.git`\n  * `mix deps.get`\n\nConfigure it.\n\n`mix release`\n\n`_build/dev/rel/logflare_agent/bin/logflare_agent start`\n\nOptionally to start the agent at bootup:\n\n`crontab -e`\n\nAdd this line to your crontab and save:\n\n`@reboot /FULL_PATH_TO_INSTALL/_build/dev/rel/logflare_agent/bin/logflare_agent start`\n\n## Configure\n\nChange the file to watch and the source key in `./config/config.exs`\n\n```elixir\nconfig :logflare_agent,\n  sources: [\n    %{\n      path: \"/home/logflare/app_release/logflare/var/log/erlang.log.1\",\n      source: \"SOURCE_ID\"\n    },\n    %{\n      path: \"/home/logflare/app_release/logflare/var/log/erlang.log.2\",\n      source: \"SOURCE_ID\"\n    },\n    %{\n      path: \"/home/logflare/app_release/logflare/var/log/erlang.log.3\",\n      source: \"SOURCE_ID\"\n    },\n    %{\n      path: \"/home/logflare/app_release/logflare/var/log/erlang.log.4\",\n      source: \"SOURCE_ID\"\n    },\n    %{\n      path: \"/home/logflare/app_release/logflare/var/log/erlang.log.5\",\n      source: \"SOURCE_ID\"\n    }\n  ],\n  url: \"https://api.logflare.app\",\n  api_key: \"YOUR_API_KEY\"\n```\n\nYour `source`s can be different with each file. This example is useful when watching Erlang log files.\n\n## Installation with Hex\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `logflare_agent` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:logflare_agent, \"~\u003e 0.6.2\"}\n  ]\nend\n```\n\nDocumentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\nand published on [HexDocs](https://hexdocs.pm). Once published, the docs can\nbe found at [https://hexdocs.pm/logflare_agent](https://hexdocs.pm/logflare_agent).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogflare%2Flogflare_agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flogflare%2Flogflare_agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogflare%2Flogflare_agent/lists"}