<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://wiki.ixheim.de/index.php?action=history&amp;feed=atom&amp;title=Wazuh_Logging_Cheat-Sheet</id>
	<title>Wazuh Logging Cheat-Sheet - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ixheim.de/index.php?action=history&amp;feed=atom&amp;title=Wazuh_Logging_Cheat-Sheet"/>
	<link rel="alternate" type="text/html" href="https://wiki.ixheim.de/index.php?title=Wazuh_Logging_Cheat-Sheet&amp;action=history"/>
	<updated>2026-11-11T14:09:24Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in Xinux Wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.ixheim.de/index.php?title=Wazuh_Logging_Cheat-Sheet&amp;diff=73358&amp;oldid=prev</id>
		<title>Thomas.will: Die Seite wurde neu angelegt: „=Wazuh Logging — Cheat Sheet= Wo was liegt und womit man nachsieht, wenn im Dashboard nichts ankommt.  Jeder Abschnitt ist einer Maschine zugeordnet: * &#039;&#039;&#039;[A…“</title>
		<link rel="alternate" type="text/html" href="https://wiki.ixheim.de/index.php?title=Wazuh_Logging_Cheat-Sheet&amp;diff=73358&amp;oldid=prev"/>
		<updated>2026-09-09T10:10:21Z</updated>

		<summary type="html">&lt;p&gt;Die Seite wurde neu angelegt: „=Wazuh Logging — Cheat Sheet= Wo was liegt und womit man nachsieht, wenn im Dashboard nichts ankommt.  Jeder Abschnitt ist einer Maschine zugeordnet: * &amp;#039;&amp;#039;&amp;#039;[A…“&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Wazuh Logging — Cheat Sheet=&lt;br /&gt;
Wo was liegt und womit man nachsieht, wenn im Dashboard nichts ankommt.&lt;br /&gt;
&lt;br /&gt;
Jeder Abschnitt ist einer Maschine zugeordnet:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;[A]&amp;#039;&amp;#039;&amp;#039; = auf dem Agenten (z.B. www, waf)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;[M]&amp;#039;&amp;#039;&amp;#039; = auf dem Manager (wazuh.dkbi.com)&lt;br /&gt;
&lt;br /&gt;
== Wo liegt was ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Datei !! Maschine !! Inhalt&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;/var/ossec/logs/ossec.log&amp;#039;&amp;#039; || A + M || Betriebsmeldungen der Dienste. Der einzige Log auf der Agent-Seite&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;/var/ossec/logs/alerts/alerts.json&amp;#039;&amp;#039; || M || Alles, was eine Regel getroffen hat&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;/var/ossec/logs/alerts/alerts.log&amp;#039;&amp;#039; || M || Dasselbe im Klartext&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;/var/ossec/logs/archives/archives.json&amp;#039;&amp;#039; || M || &amp;#039;&amp;#039;&amp;#039;Alles&amp;#039;&amp;#039;&amp;#039;, auch ohne Regeltreffer — nur bei aktivem &amp;#039;&amp;#039;logall_json&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;/var/ossec/logs/active-responses.log&amp;#039;&amp;#039; || A || Ausgeführte Active Responses&lt;br /&gt;
|}&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Merksatz:&amp;#039;&amp;#039;&amp;#039; Der Agent liest und sendet, er führt keine Buchhaltung. Was gesendet wurde, sieht man nur auf dem Manager.&lt;br /&gt;
&lt;br /&gt;
== [A] Agent — was wird eingelesen ==&lt;br /&gt;
;Welche Dateien überwacht der Logcollector?&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
grep &amp;quot;Analyzing file&amp;quot; /var/ossec/logs/ossec.log&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
;Konfiguration testen, bevor neu gestartet wird&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/var/ossec/bin/wazuh-logcollector -t&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
;Jede gelesene Zeile sehen — in &amp;#039;&amp;#039;/var/ossec/etc/local_internal_options.conf&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
logcollector.debug=2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl restart wazuh-agent&lt;br /&gt;
tail -f /var/ossec/logs/ossec.log&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Danach wieder auf &amp;#039;&amp;#039;0&amp;#039;&amp;#039; setzen.&lt;br /&gt;
;Verbindung zum Manager&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
grep -E &amp;quot;Connected to the server|Unable to connect&amp;quot; /var/ossec/logs/ossec.log | tail -5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [M] Manager — was kommt an ==&lt;br /&gt;
;Agentenliste mit Status&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/var/ossec/bin/agent_control -l&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
;Lauscht der Manager?&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ss -lnup | grep 1514&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
;Dienste&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/var/ossec/bin/wazuh-control status&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
;Konfiguration prüfen, ohne neu zu starten&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/var/ossec/bin/wazuh-analysisd -t&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [M] Live mitlesen ==&lt;br /&gt;
;Alerts&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
tail -f /var/ossec/logs/alerts/alerts.json | jq -c &amp;#039;[.agent.name, .rule.id, .rule.description]&amp;#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
;Alles, auch ohne Treffer — vorher in &amp;#039;&amp;#039;/var/ossec/etc/ossec.conf&amp;#039;&amp;#039; im &amp;#039;&amp;#039;&amp;lt;global&amp;gt;&amp;#039;&amp;#039;-Block&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;logall_json&amp;gt;yes&amp;lt;/logall_json&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl restart wazuh-manager&lt;br /&gt;
tail -f /var/ossec/logs/archives/archives.json | jq -c &amp;#039;[.agent.name, .decoder.name, .rule.id // &amp;quot;-&amp;quot;, .full_log]&amp;#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Achtung:&amp;#039;&amp;#039;&amp;#039; Archives werden nicht rotiert. Nach der Übung wieder auf &amp;#039;&amp;#039;no&amp;#039;&amp;#039;.&lt;br /&gt;
;Nach einem Agenten filtern&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
tail -f /var/ossec/logs/archives/archives.json | jq -c &amp;#039;select(.agent.name==&amp;quot;www&amp;quot;) | .full_log&amp;#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [M] Regeln und Decoder testen ==&lt;br /&gt;
;Interaktiv — Logzeile reinpasten, Ergebnis sofort&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/var/ossec/bin/wazuh-logtest&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Phase 1: Vordekodierung (Zeitstempel, Hostname)&lt;br /&gt;
* Phase 2: Decoder und extrahierte Felder&lt;br /&gt;
* Phase 3: Regel-ID und Level — bleibt leer, wenn keine Regel greift&lt;br /&gt;
;Aus einer Datei heraus&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
tail -1 /var/log/coraza/audit.log | /var/ossec/bin/wazuh-logtest&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
;Regeln auf Dopplungen prüfen — doppelte IDs verhindern den Start des Managers&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
grep -rn &amp;#039;rule id=&amp;quot;1001&amp;#039; /var/ossec/etc/rules/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Typische Ursachen ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Symptom !! Prüfen auf !! Ursache&lt;br /&gt;
|-&lt;br /&gt;
| Gar nichts im ossec.log zur Datei || A || &amp;#039;&amp;#039;&amp;lt;localfile&amp;gt;&amp;#039;&amp;#039; fehlt oder Pfad falsch&lt;br /&gt;
|-&lt;br /&gt;
| HTTP wird geloggt, HTTPS nicht || A || SSL-vhost schreibt in &amp;#039;&amp;#039;ssl_access.log&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| Datei da, aber keine Zeilen || A || Angriff kam &amp;#039;&amp;#039;&amp;#039;vor&amp;#039;&amp;#039;&amp;#039; dem Agent-Neustart — nur Neues wird gelesen&lt;br /&gt;
|-&lt;br /&gt;
| In archives.json, aber kein Alert || M || Keine Regel greift. Mit &amp;#039;&amp;#039;wazuh-logtest&amp;#039;&amp;#039; gegenprüfen&lt;br /&gt;
|-&lt;br /&gt;
| Manager startet nicht || M || Doppelte Regel-ID oder XML-Fehler — steht im ossec.log&lt;br /&gt;
|-&lt;br /&gt;
| Nichts erscheint, obwohl alles stimmt || — || Zu wenig Verkehr. Mit einer Schleife 20 Requests erzeugen&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Nach der Übung aufräumen ==&lt;br /&gt;
;[A] in &amp;#039;&amp;#039;local_internal_options.conf&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
logcollector.debug=0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
;[M] in &amp;#039;&amp;#039;ossec.conf&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;logall_json&amp;gt;no&amp;lt;/logall_json&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Kategorie:WAZUH]]&lt;/div&gt;</summary>
		<author><name>Thomas.will</name></author>
	</entry>
</feed>