No commit activity in last 3 years
No release in over 3 years
If Logstash is launched as a sub-process, this plugin can be used to exit Logstash when the parent process exits. The parent process should launch the Logstash sub-process using Inherit on Stdin, this way when the parent process exits, the Stdin is broken which is detected by this plugin which exits Logstash
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

This plugin will be useful when Logstash is launched via another Process (Agent). The Agent can connect to a central repository like (etcd) to get the Logstash config file. The advantage of having an Agent download the config file from a central repository is to have the updates to the config file (like Kafka brokers for example) propagated to all Logstash instances. The Agent can be managed by a supervisorctl or an inittab.

Agent would be started on the box which connects to the central config system to get the config file for Logstash and launches Logstash as a sub-process. The agent can be notified of changes from the config system which can kill Logstash and restart Logstash again. When an Agent quits for whatever reason, Logstash sub-process can be killed by using this Input plugin.


input {
  shutdown_on_broken_stdin {
    type => "DROP"
  }
  
  kafka {
    topic_id => "test"
    zk_connect => "localhost:2181"
  }
}

filter {
  if [type] == "DROP" {
    drop {
      # Drop the messages coming on "Stdin"
    }
  }
}

output {
  stdout {
    codec => rubydebug
  }
}