Skip to content

Latest commit

 

History

History
59 lines (45 loc) · 1.3 KB

README.md

File metadata and controls

59 lines (45 loc) · 1.3 KB

Installation

First, follow the gokrazy installation instructions.

Then, add github.com/gokrazy/syslogd/cmd/gokr-syslogd to your gokrazy instance:

gok add github.com/gokrazy/syslogd/cmd/gokr-syslogd

Configure the listening address through a flag:

{
    "Hostname": "router7",
    "Packages": [
        "github.com/gokrazy/fbstatus",
        "github.com/gokrazy/hello",
        "github.com/gokrazy/serial-busybox",
        "github.com/gokrazy/breakglass"
    ],
    "PackageConfig": {
        "github.com/gokrazy/syslogd/cmd/gokr-syslogd": {
            "CommandLineFlags": [
                "-listen=10.0.0.1:514"
            ]
        }
    },
}

Usage Examples

To follow logs of a specific host live, install https://github.com/gokrazy/breakglass for SSH access and use:

ssh router7 tail -f '/perm/syslogd/scan2drive/*.log'

You can also follow all logs:

ssh router7 tail -f '/perm/syslogd/*/*.log'

To search through old logs, grep through *.log for the last two days:

ssh router7 grep rror '/perm/syslogd/scan2drive/*.log'

…or zstdgrep through *.log.gz for older logs (not included in busybox unfortunately):

sshfs router7:/perm/syslogd /mnt/syslogd
zstdgrep rror /mnt/syslogd/scan2drive/*.log.zst