Until recently, sending logs to Graylog without using Syslog or any third party program was a bit cumbersome. This has changed since version 1.1. Graylog now has its own log collector which is tightly integrated with the Graylog server and web interface to simplify the management of log shippers.
The Graylog collector runs on several operating systems including Linux, Windows, Mac OS and AIX. It makes it easy to send data like Apache access logs or Windows event logs to Graylog without the need of any third party tools.
In this talk I will introduce the Graylog collector and show how to install and configure it on Linux and Windows. I will also show how to extract structured data from those logs and an example integration with the Icinga monitoring system to alert on critical events.
Injustice - Developers Among Us (SciFiDevCon 2024)
OSMC 2015: Monitoring Linux and Windows Logs with the Graylog Collector byBernd Ahlers
1. Bernd Ahlers – Graylog, Inc. bernd@graylog.com
Monitoring Linux and Windows Logs
with Graylog Collector
Bernd Ahlers
Graylog, Inc.
2. Bernd Ahlers – Graylog, Inc. bernd@graylog.com
Structured Logging & Introduction to
Graylog Collector
Bernd Ahlers
Graylog, Inc.
3. Bernd Ahlers – Graylog, Inc. bernd@graylog.com
Introduction: Graylog
● Open source log management platform
● Collect, index and analyze structured and
unstructured log data
● Alerts based on log data
● Extensible via custom plugins
12. Bernd Ahlers – Graylog, Inc. bernd@graylog.com
More about Graylog
● www.graylog.org
● marketplace.graylog.org
● docs.graylog.org
● github.com/Graylog2
13. Bernd Ahlers – Graylog, Inc. bernd@graylog.com
Why are we writing logs?
● Getting insight & collecting business metrics
● Debugging problems
● Building an audit trail
● Monitoring
14. Bernd Ahlers – Graylog, Inc. bernd@graylog.com
How do we access our logs?
● Applications write to local files
● SSH into machines
● tail, grep, awk
● If lucky: central log management
15. Bernd Ahlers – Graylog, Inc. bernd@graylog.com
What do they look like?
● Syslog RFC 3164 (BSD)
● Syslog RFC 5424
34. Bernd Ahlers – Graylog, Inc. bernd@graylog.com
How we try to improve the ecosystem
● Icinga2 GELF output for events
● Docker GELF logging driver (since Docker 1.8)
● apache-mod_log_gelf (beta)
● log4j2-gelf
● gelfclient Java library
● svloggelfd (log forwarding for runit)
35. Bernd Ahlers – Graylog, Inc. bernd@graylog.com
We at Graylog <3 structured data
and you should too!
36. Bernd Ahlers – Graylog, Inc. bernd@graylog.com
Introduction: Graylog Collector
● Reads local log files and ships them to Graylog
● Windows EventLog support (limited for now)
● Transport encryption via TLS
● Runs on Linux, Windows, Mac OS X and AIX
37. Bernd Ahlers – Graylog, Inc. bernd@graylog.com
Why another Collector?
● There are lots of others: nxlog, fluentd, heka,
filebeat, rsyslog, syslog-ng
● We want integration and centralized
management of collectors in Graylog
39. Bernd Ahlers – Graylog, Inc. bernd@graylog.com
Collector Installation
● OS packages for Linux distributions
● Manual installation on Windows via ZIP file
(MSI upcoming)
Runs as Windows service
40. Bernd Ahlers – Graylog, Inc. bernd@graylog.com
Collector Configuration
server-url = "http://your-graylog-server:12900"
inputs {
windows-application-log {
type = "windows-eventlog"
source-name = "Application"
}
}
outputs {
gelf-tcp {
type = "gelf"
host = "your-graylog-server"
port = 12201
}
}
41. Bernd Ahlers – Graylog, Inc. bernd@graylog.com
Collector: Current State
● Windows EventLog support needs update to
support new Windows APIs
● File reading needs improvement
● Centralized management needs to be
implemented
● :-(
42. Bernd Ahlers – Graylog, Inc. bernd@graylog.com
Tomorrow: Hackathon
43. Bernd Ahlers – Graylog, Inc. bernd@graylog.com
Thank you!
Thank you for your time!
44. Bernd Ahlers – Graylog, Inc. bernd@graylog.com
QA
Ask me anything!
Bernd Ahlers / Graylog, Inc.
bernd@graylog.com
@berndahlers
www.graylog.org
github.com/Graylog2