{"id":15013920,"url":"https://github.com/voxpupuli/puppet-logstash","last_synced_at":"2025-12-18T00:02:54.836Z","repository":{"id":40462699,"uuid":"6922463","full_name":"voxpupuli/puppet-logstash","owner":"voxpupuli","description":"Puppet module to manage Logstash","archived":false,"fork":false,"pushed_at":"2025-03-19T19:09:36.000Z","size":1681,"stargazers_count":191,"open_issues_count":31,"forks_count":296,"subscribers_count":282,"default_branch":"master","last_synced_at":"2025-04-04T23:05:15.773Z","etag":null,"topics":["centos-puppet-module","debian-puppet-module","hacktoberfest","linux-puppet-module","opensuse-puppet-module","oraclelinux-puppet-module","puppet","redhat-puppet-module","scientific-puppet-module","ubuntu-puppet-module"],"latest_commit_sha":null,"homepage":"https://forge.puppet.com/elastic/logstash","language":"Ruby","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/voxpupuli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","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},"funding":{"open_collective":"vox-pupuli","github":"voxpupuli"}},"created_at":"2012-11-29T14:23:29.000Z","updated_at":"2025-03-19T14:35:54.000Z","dependencies_parsed_at":"2024-01-28T04:32:28.801Z","dependency_job_id":"97a139a3-13a5-444b-acc0-4126b948cacc","html_url":"https://github.com/voxpupuli/puppet-logstash","commit_stats":{"total_commits":690,"total_committers":73,"mean_commits":9.452054794520548,"dds":0.5333333333333333,"last_synced_commit":"bcecc3714c99fe172213d5a21c0b9130ee5bdebf"},"previous_names":["elastic/puppet-logstash","electrical/puppet-logstash"],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-logstash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-logstash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-logstash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-logstash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voxpupuli","download_url":"https://codeload.github.com/voxpupuli/puppet-logstash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248328496,"owners_count":21085325,"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":["centos-puppet-module","debian-puppet-module","hacktoberfest","linux-puppet-module","opensuse-puppet-module","oraclelinux-puppet-module","puppet","redhat-puppet-module","scientific-puppet-module","ubuntu-puppet-module"],"created_at":"2024-09-24T19:44:56.702Z","updated_at":"2025-12-11T21:38:56.260Z","avatar_url":"https://github.com/voxpupuli.png","language":"Ruby","funding_links":["https://opencollective.com/vox-pupuli","https://github.com/sponsors/voxpupuli"],"categories":[],"sub_categories":[],"readme":"# logstash\n\n[![Build Status](https://github.com/voxpupuli/puppet-logstash/workflows/CI/badge.svg)](https://github.com/voxpupuli/puppet-logstash/actions?query=workflow%3ACI)\n[![Release](https://github.com/voxpupuli/puppet-logstash/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/puppet-logstash/actions/workflows/release.yml)\n[![Puppet Forge](https://img.shields.io/puppetforge/v/puppet/logstash.svg)](https://forge.puppetlabs.com/puppet/logstash)\n[![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/puppet/logstash.svg)](https://forge.puppetlabs.com/puppet/logstash)\n[![Puppet Forge - endorsement](https://img.shields.io/puppetforge/e/puppet/logstash.svg)](https://forge.puppetlabs.com/puppet/logstash)\n[![Puppet Forge - scores](https://img.shields.io/puppetforge/f/puppet/logstash.svg)](https://forge.puppetlabs.com/puppet/logstash)\n[![puppetmodule.info docs](http://www.puppetmodule.info/images/badge.png)](http://www.puppetmodule.info/m/puppet-logstash)\n[![Apache-2 License](https://img.shields.io/github/license/voxpupuli/puppet-logstash.svg)](LICENSE)\n[![Donated by Elastic](https://img.shields.io/badge/donated%20by-Elastic-fb7047.svg)](#transfer-notice)\n\nA Puppet module for managing and configuring [Logstash](https://www.elastic.co/logstash/).\n\nVersion 7 and newer of this module are released by Vox Pupuli. They now follow semantic versioning. Previously the module was maintained by Elastic.\n\n## Requirements\n\n* The [stdlib](https://forge.puppetlabs.com/puppetlabs/stdlib) module.\n* Logstash \u003c 7.0.0 requires Java. The [puppetlabs/java](https://forge.puppetlabs.com/modules/puppetlabs/java) module is recommended\n  for installing Java.\n\nOptional:\n* The [elastic_stack](https://forge.puppetlabs.com/elastic/elastic_stack) module\n  when using automatic repository management.\n* The [apt](https://forge.puppetlabs.com/puppetlabs/apt) (\u003e= 2.0.0) module when\n  using repo management on Debian/Ubuntu.\n* The [zypprepo](https://forge.puppetlabs.com/darin/zypprepo) module when using\n  repo management on SLES/SuSE.\n\n## Quick Start\n\nThis minimum viable configuration ensures that Logstash is installed, enabled, and running:\n\n``` puppet\ninclude logstash\n\n# You must provide a valid pipeline configuration for the service to start.\nlogstash::configfile { 'my_ls_config':\n  content =\u003e template('path/to/config.file'),\n}\n```\n\n## Package and service options\n### Choosing a Logstash major version\n\nThis module uses the related \"elastic/elastic_stack\" module to manage package\nrepositories. Since there is a separate repository for each major version of\nthe Elastic stack, if you don't want the default version, it's necessary\nto select which version to configure, like this:\n``` puppet\nclass { 'elastic_stack::repo':\n  version =\u003e 6,\n}\n\ninclude logstash\n```\n\n### Choosing a Logstash minor version\n``` puppet\nclass { 'logstash':\n  version =\u003e '6.8.0',\n}\n```\n### Manual repository management\nYou may want to manage repositories manually. You can disable\nautomatic repository management like this:\n\n``` puppet\nclass { 'logstash':\n  manage_repo =\u003e false,\n}\n```\n\n### Using an explicit package source\nRather than use your distribution's repository system, you can specify an\nexplicit package to fetch and install.\n\n#### From an HTTP/HTTPS/FTP URL\n``` puppet\nclass { 'logstash':\n  package_url =\u003e 'https://artifacts.elastic.co/downloads/logstash/logstash-7.17.8-x86_64.rpm',\n}\n```\n\n#### From a 'puppet://' URL\n``` puppet\nclass { 'logstash':\n  package_url =\u003e 'puppet:///modules/my_module/logstash-7.17.8-x86_64.rpm',\n}\n```\n\n#### From a local file on the agent\n``` puppet\nclass { 'logstash':\n  package_url =\u003e 'file:///tmp/logstash-7.17.8-x86_64.rpm',\n}\n```\n\n### Allow automatic point-release upgrades\n``` puppet\nclass { 'logstash':\n  auto_upgrade =\u003e true,\n}\n```\n\n### Use a different logstash home\n``` puppet\nclass { 'logstash':\n  home_dir =\u003e '/opt/logstash',\n}\n```\n\n### Do not run as a service\n``` puppet\nclass { 'logstash':\n  status =\u003e 'disabled',\n}\n```\n\n### Disable automatic restarts\nUnder normal circumstances, changing a configuration will trigger a restart of\nthe service. This behaviour can be disabled:\n``` puppet\nclass { 'logstash':\n  restart_on_change =\u003e false,\n}\n```\n\n### Disable and remove Logstash\n``` puppet\nclass { 'logstash':\n  ensure =\u003e 'absent',\n}\n```\n\n## Logstash config files\n\n### Settings\n\nLogstash uses several files to define settings for the service and associated\nJava runtime. The settings files can be configured with class parameters.\n\n#### `logstash.yml` with flat keys\n``` puppet\nclass { 'logstash':\n  settings =\u003e {\n    'pipeline.batch.size'  =\u003e 25,\n    'pipeline.batch.delay' =\u003e 5,\n  }\n}\n```\n\n#### `logstash.yml` with nested keys\n``` puppet\nclass { 'logstash':\n  settings =\u003e {\n    'pipeline' =\u003e {\n      'batch' =\u003e {\n        'size'  =\u003e 25,\n        'delay' =\u003e 5,\n      }\n    }\n  }\n}\n```\n\n#### `jvm.options`\n``` puppet\nclass { 'logstash':\n  jvm_options =\u003e [\n    '-Xms1g',\n    '-Xmx1g',\n  ]\n}\n```\n\n#### `startup.options`\n\n``` puppet\nclass { 'logstash':\n  startup_options =\u003e {\n    'LS_NICE' =\u003e '10',\n  }\n}\n```\n\n#### `pipelines.yml`\n\n``` puppet\nclass { 'logstash':\n  pipelines =\u003e [\n    {\n      \"pipeline.id\" =\u003e \"pipeline_one\",\n      \"path.config\" =\u003e  \"/usr/local/etc/logstash/pipeline-1/one.conf\",\n    },\n    {\n      \"pipeline.id\" =\u003e \"pipeline_two\",\n      \"path.config\" =\u003e  \"/usr/local/etc/logstash/pipeline-2/two.conf\",\n    }\n  ]\n}\n```\n\nNote that specifying `pipelines` will automatically remove the default\n`path.config` setting from `logstash.yml`, since this is incompatible with\n`pipelines.yml`.\n\nEnabling centralized pipeline management with `xpack.management.enabled` will\nalso remove the default `path.config`.\n\n### Pipeline Configuration\nPipeline configuration files can be declared with the `logstash::configfile`\ntype.\n\n``` puppet\nlogstash::configfile { 'inputs':\n  content =\u003e template('path/to/input.conf.erb'),\n}\n```\nor\n``` puppet\nlogstash::configfile { 'filters':\n  source =\u003e 'puppet:///path/to/filter.conf',\n}\n```\n\nFor simple cases, it's possible to provide your Logstash config as an\ninline string:\n\n``` puppet\nlogstash::configfile { 'basic_ls_config':\n  content =\u003e 'input { heartbeat {} } output { null {} }',\n}\n```\n\nYou can also specify the exact path for the config file, which is\nparticularly useful with multiple pipelines:\n\n``` puppet\nlogstash::configfile { 'config_for_pipeline_two':\n  content =\u003e 'input { heartbeat {} } output { null {} }',\n  path    =\u003e '/usr/local/etc/logstash/pipeline-2/two.conf',\n}\n```\n\nIf you want to use Hiera to specify your configs, include the following\ncreate_resources call in your manifest:\n\n``` puppet\ncreate_resources('logstash::configfile', hiera('my_logstash_configs'))\n```\n...and then create a data structure like this in Hiera:\n``` yaml\n---\nmy_logstash_configs:\n  nginx:\n    template: site_logstash/nginx.conf.erb\n  syslog:\n    template: site_logstash/syslog.conf.erb\n```\n\nIn this example, templates for the config files are stored in the custom,\nsite-specific module \"`site_logstash`\".\n\n### Patterns\nMany plugins (notably [Grok](http://logstash.net/docs/latest/filters/grok)) use *patterns*. While many are included in Logstash already, additional site-specific patterns can be managed as well.\n\n``` puppet\nlogstash::patternfile { 'extra_patterns':\n  source =\u003e 'puppet:///path/to/extra_pattern',\n}\n```\n\nBy default the resulting filename of the pattern will match that of the source. This can be over-ridden:\n``` puppet\nlogstash::patternfile { 'extra_patterns_firewall':\n  source   =\u003e 'puppet:///path/to/extra_patterns_firewall_v1',\n  filename =\u003e 'extra_patterns_firewall',\n}\n```\n\n**IMPORTANT NOTE**: Using logstash::patternfile places new patterns in the correct directory, however, it does NOT cause the path to be included automatically for filters (example: grok filter). You will still need to include this path (by default, /etc/logstash/patterns/) explicitly in your configurations.\n\nExample: If using 'grok' in one of your configurations, you must include the pattern path in each filter like this:\n\n```\n# Note: this example is Logstash configuration, not a Puppet resource.\n# Logstash and Puppet look very similar!\ngrok {\n  patterns_dir =\u003e \"/etc/logstash/patterns/\"\n  ...\n}\n```\n\n## Plugin management\n\n### Installing by name (from RubyGems.org)\n``` puppet\nlogstash::plugin { 'logstash-input-beats': }\n```\n\n### Installing from a local Gem\n``` puppet\nlogstash::plugin { 'logstash-input-custom':\n  source =\u003e '/tmp/logstash-input-custom-0.1.0.gem',\n}\n```\n\n### Installing from a 'puppet://' URL\n``` puppet\nlogstash::plugin { 'logstash-filter-custom':\n  source =\u003e 'puppet:///modules/my_ls_module/logstash-filter-custom-0.1.0.gem',\n}\n```\n\n### Installing from an 'http(s)://' URL\n``` puppet\nlogstash::plugin { 'x-pack':\n  source =\u003e 'https://artifacts.elastic.co/downloads/packs/x-pack/x-pack-5.3.0.zip',\n}\n```\n\n### Controling the environment for the `logstash-plugin` command\n``` puppet\nlogstash::plugin { 'logstash-input-websocket':\n  environment =\u003e 'LS_JAVA_OPTS=-Xms1g -Xmx1g',\n}\n```\n\n## Transfer Notice\n\nThis module was originally authored by [Elastic](https://www.elastic.co).\nThe maintainer preferred that Vox Pupuli take ownership of the module for future improvement and maintenance.\nExisting pull requests and issues were transferred over, please fork and continue to contribute here instead of Elastic.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-logstash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoxpupuli%2Fpuppet-logstash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-logstash/lists"}