I am very new to ELK stack. I have setup a stack using two Windows Server 2012 R2 VM machines, one is for Logstash and other for Kibana and Elastic search. Initially, I was thinking to use nxlog for logs forwarding but I came to know that I may use Windows events as well using group policy.
Can anyone help me in this regard? Please refer me to step by step guide or if anyone has an experience in it, let me know.
Why I don't want to use logstash-forwarder because then I will have to install Java on all of our Servers which I don't want obviously.
Initially, I was thinking to use nxlog for logs forwarding but I came to know that I may use Windows events as well using group policy.
My Windows-fu isn't strong enough to fully comprehend what you've written, but AFAIK you can pull event logs from a remote machine, in which case you shouldn't have to be dependent on running a log shipping agent on each Windows machine. However, Logstash's eventlog input plugin doesn't seem to support this.
Why I don't want to use logstash-forwarder because then I will have to install Java on all of our Servers which I don't want obviously.
Logstash-forwarder does not have a Java dependency, but Logstash proper does. If you don't want a JVM dependency NxLog seems like a good choice.
Thanks for your reply. As I am a newbie, this is a news to me that I can pull logs from Windows machine, that's awesome. Then why people use log shipping agents on their computer, I am just curious?
So, could you please refer me to few examples of conf files where users have pulled the logs out of Windows machines. I really need to see the examples of conf files.
If I want to ship different kind of logs to logstash, i.e. Windows Event and IIS. Should I mention two different IP addresses and ports in input section of logstash.conf. For example:
input {
tcp {
host => "127.0.0.1"
port => 3514
}
tcp {
type => "eventlog"
host => "10.1.1.2"
port => 3515
format => 'json'
}
}
Why different IP addresses? Normally you don't set the host option for inputs at all.
If you need to use different codecs or set different types you should probably listen on different ports. However, you can also change the type based on the contents of the message. So in the end it depends. What's going to send data on those TCP ports?
Since you're using to_json() in your Nxlog config I'd expect you to want to use the json codec in your Logstash input configuration. But why not try it out? You'll see what codec changes (if any) need to be done.
(Hint: If you format config files as code they'll be sanely rendered and not like above.)
Yeah but that is only for NXLOG internal logs which I didn't configure in logstash yet because currently I am interested in Windows Events only; therefore, I have used module im_msvistalog in nxlog.conf.
By the way, which codec is recommended for Windows Events?
By the way, which codec is recommended for Windows Events?
This question doesn't make sense. Nxlog will read events regardless of source and turn them into its own internal key/value format, which can be rendered as plain text, JSON, or something else when e.g. sent over the network or written to a file. Nxlog's output codec should match Logstash's input codec, that's all.
Thank you for your clarification. I got your point. Now, I am going to change the logging solution design little bit.
All the Windows Servers will be subscribed to Logstash server that is Windows based too.
I will install the nxlog on Logstash server that will rendered the local Windows events whereas local Windows events are being shipped from other servers via Windows default event subscription method.
The solution will be look like this (Windows Event Collector will serve as Logstash and nxlog):
What do you say about this solution? Any suggestion?
No, I will not pull logs from remote machines. U didn't get my point, Logstash is Windows based server which will act as events collector from other Windows machines. Then, I will install nxlog on Logstash server which will render the local logs.Remember, local logs are being pulled or pushed by other source Windows machines; therefore, nxlog doesn't need to pull logs from remote machines, Windows default event subscriber/publisher model will do instead.
could you please share link where I can download Logstash forwarder for Windows?
is there any Document , how to install in Windows?
is Logstash forwarder is works with WIndows server 2008R2?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.