Skip to content

Instantly share code, notes, and snippets.

@juanje
Last active April 10, 2017 07:27
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juanje/4818824 to your computer and use it in GitHub Desktop.
Save juanje/4818824 to your computer and use it in GitHub Desktop.
Simplified Vagrant config for setting up a logstash server with Chef solo
cookbook 'apt'
cookbook 'monit'
cookbook 'logstash', git: 'git://github.com/lusis/chef-logstash.git'
cat /var/log/syslog | nc 33.33.33.10 3333
echo "Check your browser at http://33.33.33.10"
# The semi-official Chef cookbook and a more complete Vagrantfile are at:
# https://github.com/lusis/chef-logstash
require 'berkshelf/vagrant'
Vagrant::Config.run do |config|
config.vm.box = "opscode-ubuntu-12.04"
config.vm.box_url = "https://opscode-vm.s3.amazonaws.com/vagrant/boxes/opscode-ubuntu-12.04.box"
config.vm.customize do |vm|
vm.name = 'logstash'
vm.memory_size = 1024
end
config.vm.network :hostonly, '33.33.33.10'
config.vm.provision :chef_solo do |chef|
chef.run_list = %w[
apt
java
monit
git
php::module_curl
logstash::server
logstash::kibana
]
chef.json = {
logstash: {
server: {
xms: '128m',
xmx: '128m',
enable_embedded_es: true,
install_rabbitmq: false,
ipv4_only: true,
inputs: [
tcp: {
type: "linux-syslog",
format: "plain",
port: "3333"
}
],
},
kibana: {
language: 'php'
}
}
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment