{"id":20173351,"url":"https://github.com/book000/systemdlogtracker","last_synced_at":"2026-02-01T22:08:22.294Z","repository":{"id":37991205,"uuid":"207103696","full_name":"book000/SystemdLogTracker","owner":"book000","description":"Tracking systemd log (journal) and send them to discord or slack.","archived":false,"fork":false,"pushed_at":"2026-01-30T11:35:02.000Z","size":65,"stargazers_count":8,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-31T04:13:16.166Z","etag":null,"topics":["discord","discord-bot","discord-webhook","java","journalctl","slack-webhook","systemd","tracker"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/book000.png","metadata":{"files":{"readme":"README-ja.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":"book000"}},"created_at":"2019-09-08T11:39:43.000Z","updated_at":"2026-01-30T11:34:58.000Z","dependencies_parsed_at":"2025-11-30T16:03:28.435Z","dependency_job_id":null,"html_url":"https://github.com/book000/SystemdLogTracker","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/book000/SystemdLogTracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/book000%2FSystemdLogTracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/book000%2FSystemdLogTracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/book000%2FSystemdLogTracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/book000%2FSystemdLogTracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/book000","download_url":"https://codeload.github.com/book000/SystemdLogTracker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/book000%2FSystemdLogTracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28992726,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T22:01:47.507Z","status":"ssl_error","status_checked_at":"2026-02-01T21:58:37.335Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discord","discord-bot","discord-webhook","java","journalctl","slack-webhook","systemd","tracker"],"created_at":"2024-11-14T01:35:47.380Z","updated_at":"2026-02-01T22:08:22.277Z","avatar_url":"https://github.com/book000.png","language":"Java","funding_links":["https://github.com/sponsors/book000"],"categories":[],"sub_categories":[],"readme":"# SystemdLogTracker\n\n[Click here for English README](https://github.com/book000/SystemdLogTracker/blob/master/README.md)\n\nsystemd ログ(journal)をトラッキングし、Discord に送信します。\n\n## 特徴\n\n- コンフィグファイルによって、Discord Bot によるチャンネルへの送信と Discord Webhook による送信、Slack Webhook による送信を選ぶことができます。\n- journalctl コマンドの引数を全て設定できます。\n\n## 前提条件\n\n- Java 16+\n- 以下のいずれか\n  - 有効な Discord Bot Token と Discord Channel ID\n  - 有効な Discord Webhook URL\n  - 有効な Slack Incoming Message Webhook URL\n\n## インストール\n\n### Release から\n\n1. [Release](https://github.com/book000/SystemdLogTracker/releases)ページを開いてください。\n2. 最新のバージョンかそれより古いバージョンのいずれかをダウンロードしてください。\n3. まずはじめに、`java -jar SystemdLogTracker.jar` などを使用して起動します。\n4. コンフィグファイルが生成されます。下部の `設定` を確認して編集してください。\n5. 編集したら、再度起動してください。\n6. (必要に応じて) Systemd などに登録しましょう。下部の `Systemdに登録する` を確認してください。\n\n### 実行\n\n実行するには次のコマンドを実行してください。\n\n```shell\njava -jar SystemdLogTracker.jar [Config file path]\n```\n\n`[Config file path]` には、コンフィグファイルのパスを指定できます。例: `java -jar SystemdLogTracker.jar Tester.json`  \n指定しない場合、カレントディレクトリの `config.json` が使用されます。\n\n## 設定\n\nデフォルトのコンフィグファイルは `config.json` です。ただし、コンフィグファイルのパスは jar の実行時に引数によって変更できます。\n\n```json\n{\n  \"discordWebhookUrl\": \"https://discord.com/api/webhooks/00000000000000/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n  \"arguments\": \"-a -o cat -f -n 0 -u sshd\"\n}\n```\n\n`discordToken` と `discordChannelId`、`discordWebhookUrl`、`slackWebhookUrl` のいずれかは必ず設定してください。\n\n### discordToken\n\n**Discord Bot** を使用する場合に必要です。\n\nDiscord Bot のトークンを指定してください。\n\n```json\n{\n  \"discordToken\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n}\n```\n\n### discordChannelId\n\n**Discord Bot** を使用する場合に必要です。\n\n送信先チャンネルの ID を指定してください。\n\n```json\n{\n  \"discordChannelId\": \"00000000000000\"\n}\n```\n\n### discordWebhookUrl\n\n**Discord Webhook** を使用する場合に必要です。\n\nDiscord Webhook の URL を指定してください。\n\n```json\n{\n  \"discordWebhookUrl\": \"https://discord.com/api/webhooks/00000000000000/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n}\n```\n\n### slackWebhookUrl\n\n**Slack Incoming Webhook** を使用する場合に必要です。\n\nSlack Incoming Webhook の URL を指定してください。\n\n```json\n{\n  \"slackWebhookUrl\": \"https://hooks.slack.com/services/xxxxxxxxxx/xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n}\n```\n\n### arguments\n\nオプションですが、設定することをお勧めします。\n\njournalctl の引数を指定してください。  \nデフォルト値は `-a -o cat -f -n 0` です。\n\n```json\n{\n  \"arguments\": \"-a -o cat -f -n 0 -u sshd\"\n}\n```\n\n- 必ず `-f` または `--follow` 引数を指定してください。指定しない場合、監視は失敗します。\n- `-a` または `--all` を指定することをお勧めします。これは出力が非常に長い場合でもすべてを表示します。\n- 引数 `-u` または `--unit=UNIT|PATTERN` はとても有用です。これにより、systemd サービス(Unit)を指定できます。\n\n### sendInterval\n\n必須では**ありません**。\n\n出力を処理する間隔をミリ秒で指定してください。  \nデフォルト値は `5000` です。\n\n```json\n{\n  \"sendInterval\": 5000\n}\n```\n\n## Systemd に登録する\n\n1. `/etc/systemd/system/` の下にサービスファイルを作成します。例: `/etc/systemd/system/SystemdLogTracker.service`\n2. お好きなエディターでファイルを開き、次のように記述してください。\n\n   ```ini\n   [Unit]\n   Description=Systemd Log Tracker\n\n   [Service]\n   User=root\n   Group=root\n   ExecStart=\u003cCommand\u003e\n   Restart=always\n\n   [Install]\n   WantedBy=multi-user.target\n   ```\n\n   (`\u003cCommand\u003e`には`/usr/bin/java -jar /var/SystemdLogTracker/SystemdLogTracker.jar /var/SystemdLogTracker/Tester.config`などを指定してください。)\n\n3. `systemctl daemon-reload` を実行した後、 `systemctl start \u003cServiceName\u003e` でサービスを開始します。サービスファイルが `SystemdLogTracker` の場合、`\u003cServiceName\u003e` は `SystemdLogTracker.service` です。\n\n## ライセンス\n\nこのプロジェクトのライセンスは MIT ライセンスです。\n[LICENSE](https://github.com/book000/SystemdLogTracker/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbook000%2Fsystemdlogtracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbook000%2Fsystemdlogtracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbook000%2Fsystemdlogtracker/lists"}