using elasticsearch-logstash puppet module

I have a working puppet master/client setup on two vms. I need to use elasticsearch-logstash puppet module to ensure that the puppet client restarts logstash once a change is detected in logstash.conf file in puppet master.

I have added the following in the puppet master's site.pp and I am sure puppet agent is loading the module.

node 'puppetclient.localdomain' {
include logstash
}

I think I've to use restart_on_change => true setting but I'm not sure where. Is it in the init.pp file in logstash module? I have specified the input conf file location in logstash/manifests/configfile.pp which looks like

I'm using logstash as a service on ubuntu vm. Ideally the scenario should be, once I manually change the conf file on puppetmaster vm, the client should get notified and restart logstash. How do I achieve that? My logstash conf file looks like

1 Answer

To your second question, by default the Puppet Agent will request a new catalog (which is a compiled manifest for that node) every 30 minutes. If you need it more immediately than every 30 minutes, you could change the wait time, you could look at using MCollective or Ansible to call the puppet run after a new version of your code is deployed, or you could look into masterless puppet, i.e. push the code directly to your logstash node, have no puppet master at all, and apply it using puppet apply.