Files
sdis29-3/logs_journald.md

44 lines
2.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Log avec Journald
# Journald
Utilisation de scripts pour l'installation et la configuration des **serveurs émetteurs** et **receveurs**.
Nous utilisons **HTTP sur le port 19532** ; le protocole **SSL n'est pas utilisé**.
---
## Configuration du serveur **receveur**
- Activation du **socket** pour écouter les connexions entrantes et recevoir les logs distants.
- Création dun **répertoire** où seront stockés les logs.
---
## Configuration des serveurs **émetteurs**
- Activation et configuration de l**URL du serveur receveur** dans le fichier `/etc/systemd/journal-upload.conf`.
- Activation et redémarrage du service `systemd-journal-upload`, qui **envoie les logs au serveur distant via HTTP**.
debian@ap33-prod:~$ logger bonjour
on obtient ->
debian@ap33-mon:~$ sudo journalctl -D /var/log/journal/remote -f
Oct 10 14:11:39 ap33-prod systemd-timesyncd[291]: Timed out waiting for reply from 45.140.164.53:123 (1.debian.pool.ntp.org).
Oct 10 14:11:44 ap33-prod qemu-ga[355]: info: guest-ping called
Oct 10 14:11:49 ap33-prod systemd-timesyncd[291]: Timed out waiting for reply from 45.13.105.44:123 (2.debian.pool.ntp.org).
Oct 10 14:11:58 ap33-prod qemu-ga[355]: info: guest-ping called
Oct 10 14:12:00 ap33-prod systemd-timesyncd[291]: Timed out waiting for reply from 129.250.35.250:123 (2.debian.pool.ntp.org).
Oct 10 14:12:10 ap33-prod systemd-timesyncd[291]: Timed out waiting for reply from 109.190.177.200:123 (2.debian.pool.ntp.org).
Oct 10 14:12:12 ap33-prod qemu-ga[355]: info: guest-ping called
Oct 10 14:12:20 ap33-prod systemd-timesyncd[291]: Timed out waiting for reply from 162.159.200.1:123 (2.debian.pool.ntp.org).
Oct 10 14:12:26 ap33-prod qemu-ga[355]: info: guest-ping called
Oct 10 14:12:30 ap33-prod systemd-timesyncd[291]: Timed out waiting for reply from 5.196.76.84:123 (3.debian.pool.ntp.org).
Oct 10 14:12:37 ap33-prod su[1277]: pam_unix(su:session): session closed for user root
Oct 10 14:12:37 ap33-prod sudo[1275]: pam_unix(sudo:session): session closed for user root
Oct 10 14:12:40 ap33-prod debian[2062]: bonjour
Oct 10 14:12:40 ap33-prod qemu-ga[355]: info: guest-ping called
Oct 10 14:12:41 ap33-prod systemd-timesyncd[291]: Timed out waiting for reply from 193.52.136.2:123 (3.debian.pool.ntp.org).