1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【2024年11月版】syslog の送受信で困ったときに読むメモ

Posted at

はじめに

syslogの送受信で困ったときに読むメモです。

rsyslogの状態を調べる

サービスの状態をみる

sudo systemctl status rsyslog

ログをみる

journalctl -u rsyslog

送信側を調べる

ほんとに送っているのか、デバッグでみる

/etc/rsyslog.confに以下を追加

$DebugFile /var/log/rsyslog-debug.log
$DebugLevel 2

rsyslogを再起動

sudo systemctl restart rsyslog

ログファイルをみる

sudo tail -f log /var/log/rsyslog-debug.log

ほんとに送っているのか、送信カウントをみる

sudo rsyslogd -N1 | grep omfwd

受信側を調べる

ほんとに受信しているか怪しい時

ポートが空いているかみる

ss -anlt | grep 514

UFWなどを確認する

ufw status

tcpdumpで受信を確認する

sudo tcpdump -i any port 514 -nn

受信できていたら、iptablesやUFWを疑う

とりあえず開けてみる

sudo ufw allow 514
sudo iptables -A INPUT -p udp --dport 514 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 514 -j ACCEPT

さいごに

かんたんでしたね

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?