{"id":18683255,"url":"https://github.com/antunesleo/logstash-sender","last_synced_at":"2026-05-03T05:38:39.690Z","repository":{"id":130203100,"uuid":"114935996","full_name":"antunesleo/logstash-sender","owner":"antunesleo","description":"Send your log erros to logstash and enjoy the power of ELK stack","archived":false,"fork":false,"pushed_at":"2018-01-08T12:14:04.000Z","size":21,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-18T17:11:54.501Z","etag":null,"topics":["elasticsearch","logstash","tcp","tcp-socket"],"latest_commit_sha":null,"homepage":"","language":"Python","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/antunesleo.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":"2017-12-20T22:13:15.000Z","updated_at":"2018-06-13T19:17:24.000Z","dependencies_parsed_at":"2023-05-05T18:55:00.885Z","dependency_job_id":null,"html_url":"https://github.com/antunesleo/logstash-sender","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/antunesleo/logstash-sender","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antunesleo%2Flogstash-sender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antunesleo%2Flogstash-sender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antunesleo%2Flogstash-sender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antunesleo%2Flogstash-sender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antunesleo","download_url":"https://codeload.github.com/antunesleo/logstash-sender/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antunesleo%2Flogstash-sender/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32559716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T03:21:47.309Z","status":"ssl_error","status_checked_at":"2026-05-03T03:21:43.884Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["elasticsearch","logstash","tcp","tcp-socket"],"created_at":"2024-11-07T10:14:09.987Z","updated_at":"2026-05-03T05:38:39.661Z","avatar_url":"https://github.com/antunesleo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Logstash Sender\n\nThis repo setup elasticsearch, kibana and logstash. The message guy file will send a example message to logtash by a socket tcp connection and logstash will process an output to elasticsearch. \n\nELK stack requires java. Oracle JDK is recommended, so:\n\n``` \n$ sudo add-apt-repository ppa:webupd8team/java\n$ sudo apt-get update\n$ sudo apt-get install oracle-java8-installer\n$ java -version\n  java version \"1.8.0_151\"\n  Java(TM) SE Runtime Environment (build 1.8.0_151-b12)\n  Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)\n```\n\nConfigure the environment variable $JAVA_HOME:\n```\n$ sudo vim /etc/environment\n```\n\nAdd this to the end of the file and save: JAVA_HOME=\"/usr/lib/jvm/java-8-oracle\"\n\n```$ echo $JAVA_HOME\n  /usr/lib/jvm/java-8-oracle\n```\n\n### Installing Elasticsearch\n\nif something got wrong, go to  official site: https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html\n\n```\n$ wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -\n$ sudo apt-get install apt-transport-https\n$ echo \"deb https://artifacts.elastic.co/packages/6.x/apt stable main\" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list\n$ sudo apt-get update \u0026\u0026 sudo apt-get install elasticsearch\n```\n\n# configurting elastisearch:\n\n```\n$ sudo vim /etc/elasticsearch/elasticsearch.yml\n```\n\nUncomment line 55, and change to: ```network.host: 0.0.0.0```\n\nUncomment line 59, and change to: ```http.port: 9200```\n\n# running elastisearch\n\n``` $ sudo systemctl start elasticsearch.service ```\n\nGo to http://localhost:9200/, you should get this:\n\n```\n{\n  \"name\" : \"WyRpAjH\",\n  \"cluster_name\" : \"elasticsearch\",\n  \"cluster_uuid\" : \"UV_urK1SRkuhU910f52CIg\",\n  \"version\" : {\n    \"number\" : \"6.1.1\",\n    \"build_hash\" : \"bd92e7f\",\n    \"build_date\" : \"2017-12-17T20:23:25.338Z\",\n    \"build_snapshot\" : false,\n    \"lucene_version\" : \"7.1.0\",\n    \"minimum_wire_compatibility_version\" : \"5.6.0\",\n    \"minimum_index_compatibility_version\" : \"5.0.0\"\n  },\n  \"tagline\" : \"You Know, for Search\"\n}\n```\n\n### Installing kibana\n\nif something got wrong, go to the official website: https://www.elastic.co/guide/en/kibana/current/deb.html\n\n```\n$ wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -\n$ sudo apt-get install apt-transport-https\n$ echo \"deb https://artifacts.elastic.co/packages/6.x/apt stable main\" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list\n$ sudo apt-get update \u0026\u0026 sudo apt-get install kibana\n```\n\n# Running kibana:\n\n```$ sudo systemctl start kibana.service```\n\nGo to http://localhost:5601, you should get home page of kibana\n\n# Installing Logstash\n\nif something got wrong, go to official website https://www.elastic.co/guide/en/logstash/current/installing-logstash.html\n```\n$ wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -\n$ sudo apt-get install apt-transport-https\n$ echo \"deb https://artifacts.elastic.co/packages/6.x/apt stable main\" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list\n$ sudo apt-get update \u0026\u0026 sudo apt-get install logstash\n```\n\n### Configuring logstash\n\nlogstash is a bridge between our applications and elasticsearch. Before running logstash, we need to configure how the input will works (how our apps will communcate with logstash, by a tcp socket, for example) and where would be the output, a instance of elasticsearch.\n\n```\n$ cd /etc/logstash/conf.d\n$ sudo vim base.conf\n```\n \nPut this on the file:\n\n```\ninput {\n        tcp {\n                port =\u003e 9201\n                codec =\u003e json\n        }\n}\noutput {\n        elasticsearch {\n                hosts =\u003e \"http://0.0.0.0:9200\"\n        }\n}\n```\n\n```$ sudo vim /etc/logstash/logstash.yml```\n\nUncomment line 190, and change to: ```http.host: 0.0.0.0```\n\nUncomment line 207, and change to: ```log.level: debug```\n\n```$ sudo systemctl start logstash.service ```\n\nNow, run the message_guy.py file, this will send a message error to logstash\n```$ python message_guy.py```\n\nIf you want to watch logstash logs in real time, open a terminal and:\n```$ tail -f /var/log/logstash/logstash-plain.log```\n\nWhen you run the message_guy.py, you sould see this at logstash-plain.log:\n```\n[2017-12-20T21:20:04,431][DEBUG][logstash.pipeline        ] filter received {\"event\"=\u003e{\"host\"=\u003e\"localhost\", \"port\"=\u003e50406, \"@metdata\"=\u003e{\"ip_address\"=\u003e\"127.0.0.1\"}, \"@tags\"=\u003e[\"test\"], \"@message\"=\u003e\"python test message\", \"@timestamp\"=\u003e2017-12-20T23:20:04.420Z, \"@version\"=\u003e\"1\"}}\n[2017-12-20T21:20:04,433][DEBUG][logstash.pipeline        ] output received {\"event\"=\u003e{\"host\"=\u003e\"localhost\", \"port\"=\u003e50406, \"@metdata\"=\u003e{\"ip_address\"=\u003e\"127.0.0.1\"}, \"@tags\"=\u003e[\"test\"], \"@message\"=\u003e\"python test message\", \"@timestamp\"=\u003e2017-12-20T23:20:04.420Z, \"@version\"=\u003e\"1\"}}\n```\n\nNow just go to kibana, go to management page and create a logstash-* index pattern. Go to discover page, you should see a beaultiful and cool error messsage! :)\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantunesleo%2Flogstash-sender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantunesleo%2Flogstash-sender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantunesleo%2Flogstash-sender/lists"}