Quantcast
Channel: I'm Colin » logstash
Viewing all articles
Browse latest Browse all 2

Deploying Logstash with Puppet

$
0
0

As an extension to my last post, here's an initial recipe for deploying Logstash over Puppet. You can grab my gist for the init script here https://gist.github.com/2620449

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
class logstash {
  file {"/opt/logstash-1.1.0-monolithic.jar":
    source => "puppet:///modules/logstash/logstash-1.1.0-monolithic.jar",
    ensure => present
  }
 
  file {"/etc/init.d/logstash":
    source => "puppet:///modules/logstash/logstash",
    ensure => present,
    mode => 0755,
    owner => root,
    group => root
  }
 
  file {"/etc/logstash.conf":
    source => "puppet:///modules/logstash/logstash.conf",
    ensure => present,
    replace => false
  }
 
  service {"logstash":
    ensure => running,
    subscribe => File["/etc/logstash.conf"],
    require => [
      File["/etc/init.d/logstash"],
      File["/etc/logstash.conf"],
      File["/opt/logstash-1.1.0-monolithic.jar"]
    ]
  }
}

 

You probably need different logging configurations per application, in which case the best thing to do is to move the config definition per application, or modify it where needed which is why replace is set to false so the file will only be created by Puppet once.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images