1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

超シンプルSyslogServer兼ビューア

Last updated at Posted at 2026-01-25

ありものを組み合わせてシンプルなSyslogServer兼ビューアを作りました。

以下の2つのnpmを組み合わせました。

インストール

もろもろGitHubに上げてあります。
以下から、ZIPでダウンロード

$ unzip SimpleSyslogServer-master.zip
$ cd SimpleSyslogServer-master
$ npm install
$ vi server.json
$ vi .env

server.jsonは以下のようになっており、サーバのホスト名を各自の環境に合わせて書き換えます。

server.js
{
  "messageServer": {
    "port": 6689,
    "host": "[サーバのホスト名]"
  },
  "httpServer": {
    "port": 6688,
    "host": "[サーバのホスト名]"
  },
  "debug": false
}

.envは、立ち上げるSyslogサーバのポート番号と、Viewerのページのログインパスワードを指定します。

.env
PORT=20514
LOGIO_USER=test
LOGIO_PASSWORD=password

最後に、以下のようにして立ち上げます。

$ node index.js

Viewerを開く

以下をブラウザから開きます。ポート番号は、server.jsonのhttpServerに指定したポート番号です。

http://サーバのホスト名:6688

そうすると、ユーザ名とパスワードを聞かれるので、.envに記載したのを入力します。

image.png

こんな感じで開きます。

image.png

この状態で、別のクライアントからSyslogを送信します。
送信先のポート番号は、.envのPORTで指定した番号です。

最初は左側のサイドバーに何も表示されていないのですが、受信するとsyslogと送信元IPアドレスが出てきます。それらのチェックボックスをOnにすると、以降受信したSyslogが右側に表示されます。

image.png

参考

log.ioでログをブラウザでリアルタイムモニタリングする

以上

1
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?