{"id":19387652,"url":"https://github.com/haraka/haraka-plugin-elasticsearch","last_synced_at":"2025-07-27T16:09:20.580Z","repository":{"id":22775222,"uuid":"97287066","full_name":"haraka/haraka-plugin-elasticsearch","owner":"haraka","description":"Ship Haraka log info directly to Elasticsearch","archived":false,"fork":false,"pushed_at":"2025-05-26T13:09:51.000Z","size":113,"stargazers_count":5,"open_issues_count":1,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-05T21:48:12.322Z","etag":null,"topics":["elasticsearch","haraka","haraka-plugin","log-shipper","logging","logs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/haraka-plugin-elasticsearch","language":"JavaScript","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/haraka.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2017-07-15T02:30:05.000Z","updated_at":"2025-03-14T13:40:37.000Z","dependencies_parsed_at":"2024-10-09T13:01:14.130Z","dependency_job_id":"c6af21e2-6d94-44dc-aea9-656f672211cc","html_url":"https://github.com/haraka/haraka-plugin-elasticsearch","commit_stats":{"total_commits":72,"total_committers":6,"mean_commits":12.0,"dds":0.08333333333333337,"last_synced_commit":"4bd10147d8fbdcf648623c6cee231e99e4d49d2a"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/haraka/haraka-plugin-elasticsearch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haraka%2Fharaka-plugin-elasticsearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haraka%2Fharaka-plugin-elasticsearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haraka%2Fharaka-plugin-elasticsearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haraka%2Fharaka-plugin-elasticsearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haraka","download_url":"https://codeload.github.com/haraka/haraka-plugin-elasticsearch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haraka%2Fharaka-plugin-elasticsearch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267384062,"owners_count":24078574,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","haraka","haraka-plugin","log-shipper","logging","logs"],"created_at":"2024-11-10T10:10:03.522Z","updated_at":"2025-07-27T16:09:20.554Z","avatar_url":"https://github.com/haraka.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status][ci-img]][ci-url]\n[![Code Climate][clim-img]][clim-url]\n\n# haraka-plugin-elasticsearch\n\nShip Haraka log info directly to Elasticsearch\n\n## INSTALL\n\n```sh\ncd /path/to/local/haraka\nnpm install haraka-plugin-elasticsearch\necho \"elasticsearch\" \u003e\u003e config/plugins\nservice haraka restart\n```\n\n### Configuration\n\nIf the default configuration is not sufficient, copy the config file from the distribution into your haraka config dir and then modify it:\n\n```sh\ncp node_modules/haraka-plugin-elasticsearch/config/elasticsearch.ini\nconfig/elasticsearch.ini\n$EDITOR config/elasticsearch.ini\n```\n\n### Logging\n\nUnless errors are encountered, no logs are emitted.\n\n### Errors\n\nThe elasticsearch module has very robust error handling built in. If there's a\nconnection issue, errors such as these will be emitted when Haraka starts\nup:\n\n- Elasticsearch cluster is down!\n- No Living connections\n\nHowever, ES will continue attempting to connect and when the ES server(s) are\navailable, logging will begin. If errors are encountered trying to save data\nto ES, they look like this:\n\n- No Living connections\n- Request Timeout after 30000ms\n\nThey normally fix themselves when ES resumes working properly.\n\n## Configuration\n\n- host - an IP or hostname of the ES server to connect to\n\n  host=127.0.0.2\n\n- pluginObject\n\nBy default, all plugin results are presented as `$plugin_name: { ... }`, at\nthe top level. If you prefer that all plugin results be nested inside an\nobject `$obj: { $plugin_name: { ...}`, set pluginObject to that object's key name\n\n    pluginObject=plugin\n\n- [ignore_hosts]\n\nA config file section for hosts whose results should not be stored in\nES. HAproxy servers, Nagios, and other hosts who monitor Haraka can be listed\nhere. The format for entries is host.name=true\n\n- [index]\n\n  transaction=smtp-transaction\n  connection=smtp-connection\n\nTransactions include all the connection information and are \"the good stuff.\"\nWhen a connection has transactions, the connection is not saved separately.\nThe distinction is that a connection is stored only when it has zero\ntransactions. The connections index tends to be mostly noise (monitoring,\nblocked connections, bruteforce auth attempts, etc.). To collapse them into\nthe same index, set the value for both identically.\n\n## Index Templates\n\n### Composable Index Templates\n\nComposable templates are the modern (circa 2025) method of creating index templates. In the file ./test/template.js, there are unit tests with working JS code that install the component templates as well as the index template that uses them. If you're standing up a new ES cluster, copy/pasting that into a .js file will get you bootstrapped fairly quickly.\n\n### Legacy Index Template\n\nCreating an index template will apply the template(s) to any future indexes that\nmatch the pattern/name in the template setting. This is how to manually apply\nan index map template from the sample file in this package:\n\n```sh\ncurl -X PUT 'http://localhost:9200/_template/haraka_results' \\\n     -H 'Content-Type: application/json' -d @templates/index/v8.json\n```\n\n\u003c!-- leave these buried at the bottom of the document --\u003e\n\n[ci-img]: https://github.com/haraka/haraka-plugin-elasticsearch/actions/workflows/ci.yml/badge.svg\n[ci-url]: https://github.com/haraka/haraka-plugin-elasticsearch/actions/workflows/ci.yml\n[clim-img]: https://codeclimate.com/github/haraka/haraka-plugin-elasticsearch/badges/gpa.svg\n[clim-url]: https://codeclimate.com/github/haraka/haraka-plugin-elasticsearch\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharaka%2Fharaka-plugin-elasticsearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharaka%2Fharaka-plugin-elasticsearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharaka%2Fharaka-plugin-elasticsearch/lists"}