How to tell, whether my Logstash instance ready?


(Pradeepfn) #1

I want to determine whether my Logstash instance is ready for input data processing. In a manual installation, i look at the start-up logs and figure it out. Now i want to do the same programatically, for an orchestration scenario.

How to programatically determine whether my newly spawned logstash instance is ready for input message processing. (Based on the input filter config, the Logstash start-up time varies significantly )

Thanks in advance..


(Magnus Bäck) #2

There's no API or similar for this, but you could set up a simple udp och tcp input that you could send a message to and route those messages to something that's convenient for you to monitor. Try to send a message once a second or so and when the message gets through you know everything is up.


(Joe Lawson) #3

You could try using the heartbeat plugin. For instance if you are using AWS Cloudformation have the heartbeat plugin hit the success url and then you would know it started.


(Joe Lawson) #4

More info, for autoscaling use a creation policy: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-creationpolicy.html

a wait condition:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-waitcondition.html

and a wait condition handle:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-waitconditionhandle.html

The handle will have a url as shown here http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-waitcondition.html

and just use this output: https://www.elastic.co/guide/en/logstash/current/plugins-outputs-http.html


(system) #5