$30 off During Our Annual Pro Sale. View Details »

Zentrales Log-Management mit Graylog (german)

Bernd Ahlers
September 18, 2015
500

Zentrales Log-Management mit Graylog (german)

Introduction to Graylog as central log management system. (in german) 13. Kieler Open Source und Linux Tage 2015

Bernd Ahlers

September 18, 2015
Tweet

Transcript

  1. Bernd Ahlers – Graylog, Inc. [email protected]
    Zentrales Log-Management mit
    Bernd Ahlers - Graylog, Inc.

    View Slide

  2. Bernd Ahlers – Graylog, Inc. [email protected]

    Bernd Ahlers

    Entwickler bei Graylog, Inc. in Hamburg

    [email protected]

    twitter.com/berndahlers

    github.com/bernd

    View Slide

  3. Bernd Ahlers – Graylog, Inc. [email protected]
    Was ist Log-Management?

    Log-Daten aus allen Anwendungen und von
    allen Maschinen zentral sammeln und
    auswerten

    Archivierung von Log-Daten

    View Slide

  4. Bernd Ahlers – Graylog, Inc. [email protected]
    Warum Log-Management?

    Schneller Zugriff auf die Logs aller Maschinen

    Volltext Suche über alle Logs

    View Slide

  5. Bernd Ahlers – Graylog, Inc. [email protected]
    Warum Log-Management?

    Schnellere Analyse von Problemen im
    Produktionsbetrieb

    Bessere Problemanalyse während der
    Entwicklung

    View Slide

  6. Bernd Ahlers – Graylog, Inc. [email protected]
    Warum Log-Management?

    Erstellen strukturierter Logs aus einfachen Text
    Daten

    Konsolidierung von Daten aus verschiedenen
    Systemen

    Automatisches Monitoring der Log-Daten

    View Slide

  7. Bernd Ahlers – Graylog, Inc. [email protected]
    SAAS Produkte

    Pro
    – Einfacher Start
    – Kein Aufwand für Betrieb & Wartung

    Contra
    – Probleme bei größerem Daten Volumen
    – Daten nicht unter Kontrolle

    View Slide

  8. Bernd Ahlers – Graylog, Inc. [email protected]
    SAAS Produkte

    View Slide

  9. Bernd Ahlers – Graylog, Inc. [email protected]
    On-Premise Produkte

    Pro
    – Daten unter Kontrolle
    – Möglichkeit sehr viele Daten zu senden und zu
    speichern

    Contra
    – Betrieb & Wartung müssen selbst durchgeführt
    werden
    – Hohe „Startkosten“

    View Slide

  10. Bernd Ahlers – Graylog, Inc. [email protected]
    On-Premise Produkte

    View Slide

  11. Bernd Ahlers – Graylog, Inc. [email protected]
    Open Source Produkte

    View Slide

  12. Bernd Ahlers – Graylog, Inc. [email protected]
    Open Source Log Management
    http://www.graylog.org/
    http://docs.graylog.org/

    View Slide

  13. Bernd Ahlers – Graylog, Inc. [email protected]
    Geschichte

    Gestartet von Lennart Koopmann in 2010
    (damals Graylog2)

    TORCH GmbH in Hamburg ende 2012 als
    Firma hinter Graylog gegründet

    Neuentwicklung als Version 0.20 im Februar
    2014 fertiggestellt

    View Slide

  14. Bernd Ahlers – Graylog, Inc. [email protected]
    Geschichte

    Graylog, Inc. im Januar 2015 in den USA
    gegründet (Entwicklung bleibt in Hamburg)

    Umbenennung von Graylog2 zu Graylog

    Graylog Version 1.0 im Februar 2015

    View Slide

  15. Bernd Ahlers – Graylog, Inc. [email protected]

    View Slide

  16. Bernd Ahlers – Graylog, Inc. [email protected]

    View Slide

  17. Bernd Ahlers – Graylog, Inc. [email protected]

    View Slide

  18. Bernd Ahlers – Graylog, Inc. [email protected]
    Graylog Collector

    Läuft auf Servern und kann lokale Log-Dateien
    lesen und an Graylog schicken

    Windows Eventlog

    Linux / Windows / Mac OS X / AIX

    View Slide

  19. Bernd Ahlers – Graylog, Inc. [email protected]
    <3

    View Slide

  20. Bernd Ahlers – Graylog, Inc. [email protected]
    Docker + Graylog

    Docker 1.8 hat nativen GELF Treiber für Logs

    Sendet alle Container Log-Daten an Graylog

    View Slide

  21. Bernd Ahlers – Graylog, Inc. [email protected]
    Download

    View Slide

  22. Bernd Ahlers – Graylog, Inc. [email protected]
    Installation

    Betriebssystem Pakete
    – Debian / Ubuntu (deb)
    – RedHat / CentOS (RPM)

    Virtuelle Maschinen (OVA / Vagrant)

    Config management (Chef / Puppet / Ansible)

    View Slide

  23. Bernd Ahlers – Graylog, Inc. [email protected]
    Log-Daten an Graylog senden

    Syslog
    – TCP, TCP+TLS, UDP, AMQP, Kafka

    GELF
    – TCP, TCP+TLS, UDP, HTTP, AMQP, Kafka

    Raw / Plain Text
    – TCP, TCP+TLS, UDP, AMQP, Kafka

    Collector
    – TCP, TCP+TLS

    View Slide

  24. Bernd Ahlers – Graylog, Inc. [email protected]
    Syslog

    Beispiel Rsyslog
    # RFC5424 Template
    $template GRAYLOGRFC5424,"<%PRI%>%PROTOCOL-VERSION% %TIMESTAMP:::date-
    rfc3339% %HOSTNAME% %APP-NAME% %PROCID% %MSGID% %STRUCTURED-DATA% %msg
    %\n"
    # Graylog Server
    *.* @graylog.example.org:5140;GRAYLOGRFC5424

    View Slide

  25. Bernd Ahlers – Graylog, Inc. [email protected]
    GELF

    Graylog Extended Log Format

    JSON basiertes Format zum senden von
    strukturierten Daten

    Logstash, fluentd, nxlog, Docker, ...

    View Slide

  26. Bernd Ahlers – Graylog, Inc. [email protected]
    GELF

    Diverse libraries um Logs direkt aus
    Anwendungen zu verschicken

    z.B. Log4j2


    port="12201" hostName="appserver01.example.com"
    additionalFields="foo=bar"/>







    View Slide

  27. Bernd Ahlers – Graylog, Inc. [email protected]
    Raw / Plain Text

    Rohe Textdaten
    $ tail -f /var/log/logfile.log | nc graylog.example.com 5555

    View Slide

  28. Bernd Ahlers – Graylog, Inc. [email protected]
    Graylog Konfiguration

    Minimale Konfiguration in zwei Dateien

    /etc/graylog/server/server.conf

    /etc/graylog/web/web.conf

    View Slide

  29. Bernd Ahlers – Graylog, Inc. [email protected]

    View Slide

  30. Bernd Ahlers – Graylog, Inc. [email protected]
    Daten Strukturieren

    Aus text strings strukturierte Daten erzeugen
    mit Extractors

    Fertige Extractors als Content Packs im
    Marketplace verfügbar

    View Slide

  31. Bernd Ahlers – Graylog, Inc. [email protected]

    View Slide

  32. Bernd Ahlers – Graylog, Inc. [email protected]
    Suchen & Analysieren

    View Slide

  33. Bernd Ahlers – Graylog, Inc. [email protected]

    View Slide

  34. Bernd Ahlers – Graylog, Inc. [email protected]

    View Slide

  35. Bernd Ahlers – Graylog, Inc. [email protected]

    View Slide

  36. Bernd Ahlers – Graylog, Inc. [email protected]

    View Slide

  37. Bernd Ahlers – Graylog, Inc. [email protected]

    View Slide

  38. Bernd Ahlers – Graylog, Inc. [email protected]
    Sources

    Zeigt eine Übersicht aller Quellen die Log-
    Daten an Graylog schicken

    View Slide

  39. Bernd Ahlers – Graylog, Inc. [email protected]

    View Slide

  40. Bernd Ahlers – Graylog, Inc. [email protected]
    Streams

    Eingehende Nachrichten können so gruppiert
    werden

    Können benutzt werden um Berechtigungen für
    Benutzer zu vergeben

    Stream Alerts können Benachrichtigungen
    verschicken

    View Slide

  41. Bernd Ahlers – Graylog, Inc. [email protected]

    View Slide

  42. Bernd Ahlers – Graylog, Inc. [email protected]

    View Slide

  43. Bernd Ahlers – Graylog, Inc. [email protected]
    Dashboards

    Widgets können auf Dashboards gruppiert
    werden

    Nützlich um wichtige Metriken und
    Informationen auf einem Blick anzuzeigen

    View Slide

  44. Bernd Ahlers – Graylog, Inc. [email protected]

    View Slide

  45. Bernd Ahlers – Graylog, Inc. [email protected]
    Benutzer & Rollen

    Berechtigungen auf Streams und Dashboards

    LDAP/ActiveDirectory wird für Benutzer und
    Rollen unterstützt

    View Slide

  46. Bernd Ahlers – Graylog, Inc. [email protected]

    View Slide

  47. Bernd Ahlers – Graylog, Inc. [email protected]
    System Status

    Es gibt diverse System-Seiten auf denen der
    Status der verschiedenen Komponenten
    angezeigt wird

    View Slide

  48. Bernd Ahlers – Graylog, Inc. [email protected]

    View Slide

  49. Bernd Ahlers – Graylog, Inc. [email protected]

    View Slide

  50. Bernd Ahlers – Graylog, Inc. [email protected]

    View Slide

  51. Bernd Ahlers – Graylog, Inc. [email protected]
    Danke!
    Danke für eure Aufmerksamkeit!

    View Slide

  52. Bernd Ahlers – Graylog, Inc. [email protected]
    Fragen?
    [email protected]
    @berndahlers
    http://www.graylog.org/
    http://docs.graylog.org/

    View Slide