{"id":16725317,"url":"https://github.com/christiangalsterer/execbeat","last_synced_at":"2025-03-21T21:31:05.526Z","repository":{"id":57521621,"uuid":"48602935","full_name":"christiangalsterer/execbeat","owner":"christiangalsterer","description":"Elastic beat to call commands in a regular interval and send the result to Logstash, Elasticsearch","archived":false,"fork":false,"pushed_at":"2021-01-18T18:03:19.000Z","size":28057,"stargazers_count":57,"open_issues_count":17,"forks_count":29,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-18T05:12:48.037Z","etag":null,"topics":["beats","elastic-beats","elasticsearch","golang","logstash"],"latest_commit_sha":null,"homepage":"","language":"Go","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/christiangalsterer.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":"2015-12-26T07:22:10.000Z","updated_at":"2024-05-06T07:05:40.000Z","dependencies_parsed_at":"2022-09-26T18:10:33.757Z","dependency_job_id":null,"html_url":"https://github.com/christiangalsterer/execbeat","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christiangalsterer%2Fexecbeat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christiangalsterer%2Fexecbeat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christiangalsterer%2Fexecbeat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christiangalsterer%2Fexecbeat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/christiangalsterer","download_url":"https://codeload.github.com/christiangalsterer/execbeat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244874154,"owners_count":20524576,"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":["beats","elastic-beats","elasticsearch","golang","logstash"],"created_at":"2024-10-12T22:48:48.231Z","updated_at":"2025-03-21T21:31:00.511Z","avatar_url":"https://github.com/christiangalsterer.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/christiangalsterer/execbeat.svg?branch=master)](https://travis-ci.org/christiangalsterer/execbeat)\n[![codecov.io](http://codecov.io/github/christiangalsterer/execbeat/coverage.svg?branch=master)](http://codecov.io/github/christiangalsterer/execbeat?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/christiangalsterer/execbeat)](https://goreportcard.com/report/github.com/christiangalsterer/execbeat)\n[![license](https://img.shields.io/github/license/christiangalsterer/execbeat.svg)](https://github.com/christiangalsterer/execbeat)\n[![Github All Releases](https://img.shields.io/github/downloads/christiangalsterer/execbeat/total.svg)](https://github.com/christiangalsterer/execbeat)\n\n![Elastic Beats 5.6.2](https://img.shields.io/badge/Elastic%20Beats-v5.6.2-blue.svg)\n![Golang 1.9](https://img.shields.io/badge/Golang-v1.9-blue.svg)\n\n# Overview\n\nExecbeat is the [Beat](https://www.elastic.co/products/beats) used to execute any command.\nMultiple commands can be configured which are executed in a regular interval and the standard output and standard error is shipped to the configured output channel.\n\nExecbeat is inspired by the Logstash [exec](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-exec.html) input filter but doesn't require that the endpoint is reachable by Logstash as Execbeat pushes the data to Logstash or Elasticsearch.\nThis is often necessary in security restricted network setups, where Logstash is not able to reach all servers. Instead the server to be monitored itself has Execbeat installed and can send the data or a collector server has Execbeat installed which is deployed in the secured network environment and can reach all servers to be monitored.\n\nEnsure that this folder is at the following location:\n`${GOPATH}/src/github.com/christiangalsterer`\n\n## Installation\n\n### Download\nPre-compiled binaries for different operating systems are available for [download](#releases).\n\n### Installation\nInstall the package for your operation system by running the respective package manager or unzipping the package.\n\n### Configuration\nAdjust the `execbeat.yml` configuration file to your needs. You may take `execbeat.full.yml` as an example containing all possible configuration values.\n\n### Running\nIn order to start Execbeat please use the respective startup script, e.g. `/usr/bin/execbeat.sh`.\n\n### Starting Execbeat as Service\nWhere supported Execbeat can be started also using the respetive service scripts, e.g. `etc/init.d/execsbeat`.\n\n## Building and Releasing Execbeat\n\n### Requirements\n\n* [Golang](https://golang.org/dl/) 1.9\n* [Glide](https://github.com/Masterminds/glide) \u003e= 0.13.0\n\n### Build\n\nTo build the binary for execbeat run the command below. This will generate a binary\nin the same directory with the name execbeat.\n\n```\nmake clean \u0026\u0026 make\n```\n\n### Run\n\nTo run execbeat with debugging output enabled, run:\n\n```\n./execbeat -c execbeat.yml -e -d \"*\"\n```\n\n### Test\n\nTo test execbeat, run the following command:\n\n```\nmake testsuite\n```\n\nalternatively:\n```\nmake unit-tests\nmake system-tests\nmake integration-tests\nmake coverage-report\n```\n\nThe test coverage is reported in the folder `./build/coverage/`\n\n### Update\n\nEach beat has a template for the mapping in elasticsearch and a documentation for the fields\nwhich is automatically generated based on `etc/fields.yml`.\nTo generate etc/execbeat.template.json and etc/execbeat.asciidoc\n\n```\nmake update\n```\n\n\n### Cleanup\n\nTo clean execbeat source code, run the following commands:\n\n```\nmake check\nmake simplify\n```\n\nTo clean up the build directory and generated artifacts, run:\n\n```\nmake clean\n```\n\n### Clone\n\nTo clone execbeat from the git repository, run the following commands:\n\n```\nmkdir -p ${GOPATH}/github.com/christiangalsterer\ncd ${GOPATH}/github.com/christiangalsterer\ngit clone https://github.com/christiangalsterer/execbeat\n```\n\nFor further development, check out the [beat developer guide](https://www.elastic.co/guide/en/beats/libbeat/current/new-beat.html).\n\n## Packaging\n\nThe beat frameworks provides tools to crosscompile and package your beat for different platforms. This requires [docker](https://www.docker.com/) and vendoring as described above. To build packages of your beat, run the following command:\n\n```\nmake package\n```\n\nThis will fetch and create all images required for the build process. The complete process to finish can take several minutes.\n\n# Releases\n\n## 3.3.0 (2017-10-06) [Download](https://github.com/christiangalsterer/execbeat/releases/tag/3.3.0)\n[![Github Releases (by Release)](https://img.shields.io/github/downloads/christiangalsterer/execbeat/3.3.0/total.svg)](https://github.com/christiangalsterer/execneat/releases/tag/3.3.0)\n\nFeature and Bugfix release containing the following changes:\n* Update to beats v5.6.2\n\n## 3.2.0 (2017-06-05) [Download](https://github.com/christiangalsterer/execbeat/releases/tag/3.2.0)\n[![Github Releases (by Release)](https://img.shields.io/github/downloads/christiangalsterer/execbeat/3.2.0/total.svg)](https://github.com/christiangalsterer/execneat/releases/tag/3.2.0)\n\nFeature and bugfix release containing the following changes:\n* Fix: [Use exit code 127 when command to execute is not found](https://github.com/christiangalsterer/execbeat/issues/15)\n\n## 3.1.1 (2017-02-24) [Download](https://github.com/christiangalsterer/execbeat/releases/tag/3.1.1)\n[![Github Releases (by Release)](https://img.shields.io/github/downloads/christiangalsterer/execbeat/3.1.1/total.svg)](https://g0thub.com/christiangalsterer/execneat/releases/tag/3.1.1)\n\nBugfix release containing the following changes:\n* [Set correct version in package names and package metadata](https://github.com/christiangalsterer/execbeat/issues/10)\n\n## 3.1.0 (2017-02-23) [Download](https://github.com/christiangalsterer/execbeat/releases/tag/3.1.0)\n[![Github Releases (by Release)](https://img.shields.io/github/downloads/christiangalsterer/execbeat/3.1.0/total.svg)](https://github.com/christiangalsterer/execneat/releases/tag/3.1.0)\n\nFeature and bugfix release containing the following changes:\n* The exit code of the command executed is now exported in field `exitCode`.\n* Fix: Examples were not fully updated with configuration changes introduced in 3.0.0.\n\n## 3.0.1 (2017-02-21) [Download](https://github.com/christiangalsterer/execbeat/releases/tag/3.0.1)\n[![Github Releases (by Release)](https://img.shields.io/github/downloads/christiangalsterer/execbeat/3.0.1/total.svg)](https://github.com/christiangalsterer/execneat/releases/tag/3.0.1)\n\nBugfix release containing the following changes:\n* [Multiple arguments are not properly passed](https://github.com/christiangalsterer/execbeat/issues/7)\n\n## 3.0.0 (2017-02-19) [Download](https://github.com/christiangalsterer/execbeat/releases/tag/3.0.0)\n[![Github Releases (by Release)](https://img.shields.io/github/downloads/christiangalsterer/execbeat/3.0.0/total.svg)](https://github.com/christiangalsterer/execneat/releases/tag/3.0.0)\n\nFeature and bugfix release containing the following **breaking** changes:\n* Renamed configuration parameter `execs` to `commands`. Please update your configuration accordingly.\n* Renamed configuration parameter `cron` to `schedule`. Please update your configuration accordingly.\n* Update to beats v5.2.1\n* Fix: [Default schedule not working](https://github.com/christiangalsterer/execbeat/issues/6)\n\n## 2.2.0 (2017-02-04) [Download](https://github.com/christiangalsterer/execbeat/releases/tag/2.2.0)\n[![Github Releases (by Release)](https://img.shields.io/github/downloads/christiangalsterer/execbeat/2.2.0/total.svg)](https://github.com/christiangalsterer/execneat/releases/tag/2.2.0)\n\nFeature release containing the following changes:\n* Update to beats v5.2.0\n\n## 2.1.1 (2017-01-14) [Download](https://github.com/christiangalsterer/execbeat/releases/tag/2.1.1)\n[![Github Releases (by Release)](https://img.shields.io/github/downloads/christiangalsterer/execbeat/2.1.1/total.svg)](https://github.com/christiangalsterer/execneat/releases/tag/2.1.1)\n\nStarting with this release pre-compiled binaries for different operating systems are available under the respective tag in the github project.\n\nBugfix release containing the following changes:\n* Move files into correct place to allow correct bulding with `make package`\n* Move files into correct place to allow correct bulding with `make update`\n* Cleanup of documentation\n* Update to beats v5.1.2\n* Update to Go 1.7.4\n\n## 2.1.0 (2016-12-23)\n\nFeature release containing the following changes:\n* Update to beats v5.1.1\n\n## 2.0.0 (2016-11-26)\n\nFeature release containing the following changes:\n* Update to beats v5.0.1\n\nPlease note that this release contains the following breaking changes introduced by beats 5.0.X, see also [Beats Changelog](https://github.com/elastic/beats/blob/v5.0.0-beta1/CHANGELOG.asciidoc)\n* SSL Configuration\n    * rename tls configurations section to ssl\n    * rename certificate_key configuration to key.\n    * replace tls.insecure with ssl.verification_mode setting.\n    * replace tls.min/max_version with ssl.supported_protocols setting requiring full protocol name\n\n## 1.1.0 (2016-07-19)\n\nFeature release containing the following changes:\n* Update to Go 1.6\n* Update to libbeat 1.2.3\n* Use [Glide](https://github.com/Masterminds/glide) for dependency management\n\n## 1.0.1 (2016-02-15)\n\nBugfix release containing the following changes:\n* Fix: [Hanging during shutdown](https://github.com/christiangalsterer/execbeat/issues/2)\n\n## 1.0.0 (2015-12-26)\n* Initial release\n\n# Configuration\n\n## Configuration Options\n\nSee [here](docs/configuration.asciidoc) for more information.\n\n## Exported Document Types\n\nThere is exactly one document type exported:\n\n- `type: execbeat` command execution information, e.g. standard output and standard error. The type can be changed by setting the document_type attribute.\n\n## Exported Fields\n\nSee [here](docs/fields.asciidoc) for a detailed description of all exported fields.\n\n### execbeat type\n\n\u003cpre\u003e\n{\n  \"_index\": \"execbeat-2015.12.26\",\n  \"_type\": \"execbeat\",\n  \"_source\": {\n    \"@timestamp\": \"2015-12-26T02:18:53.001Z\",\n    \"beat\": {\n      \"hostname\": \"mbp.box\",\n      \"name\": \"mbp.box\"\n    },\n    \"count\": 1,\n    \"fields\": {\n      \"host\": \"test\"\n    },\n    \"exec\": {\n      \"command\": \"echo\",\n      \"exitCode\": 0,\n      \"stdout\": \"Hello World\\n\"\n    },\n    \"fields\": {\n      \"host\": \"test2\"\n    },\n    \"type\": \"execbeat\"\n    },\n  \"sort\": [\n    1449314173\n  ]\n}\n\u003c/pre\u003e\n\n\n## Elasticsearch Template\n\nTo apply the Execbeat template:\n\n    curl -XPUT 'http://localhost:9200/_template/execbeat' -d@etc/execbeat.template.json\n\n# Contribution\nAll sorts of contributions are welcome. Please create a pull request and/or issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristiangalsterer%2Fexecbeat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchristiangalsterer%2Fexecbeat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristiangalsterer%2Fexecbeat/lists"}