{"id":22180574,"url":"https://github.com/dcso/mini-syslog-receiver","last_synced_at":"2025-03-24T18:46:05.636Z","repository":{"id":216317837,"uuid":"740536330","full_name":"DCSO/mini-syslog-receiver","owner":"DCSO","description":"Mini Syslog Receiver","archived":false,"fork":false,"pushed_at":"2024-04-22T19:29:28.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-23T15:54:07.416Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DCSO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2024-01-08T14:46:25.000Z","updated_at":"2024-06-19T13:19:30.839Z","dependencies_parsed_at":"2024-06-19T13:19:15.615Z","dependency_job_id":"3217753e-ed34-4ed3-a4b4-aa9bacabe753","html_url":"https://github.com/DCSO/mini-syslog-receiver","commit_stats":null,"previous_names":["dcso/mini-syslog-receiver"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCSO%2Fmini-syslog-receiver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCSO%2Fmini-syslog-receiver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCSO%2Fmini-syslog-receiver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCSO%2Fmini-syslog-receiver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DCSO","download_url":"https://codeload.github.com/DCSO/mini-syslog-receiver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245331979,"owners_count":20598083,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-12-02T09:18:44.786Z","updated_at":"2025-03-24T18:46:05.616Z","avatar_url":"https://github.com/DCSO.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mini-syslog-receiver\n\nThis is a small syslog server that can be used to receive syslog data for format\ndiscovery and gathering of example logs required to evaluate edge node input.\n\nIt is a simple, portable binary that can be handed out to the data provider to\ntest-drive their data taps (e.g. appliances that support syslog output, etc.)\n\n## Usage\n```\n$ ./mini-syslog-receiver -h\nNAME:\n   mini-syslog-receiver - receive and dump syslog data\n\nUSAGE:\n   mini-syslog-receiver [global options] \n\nGLOBAL OPTIONS:\n   --listen value, -l value   address to listen on (0.0.0.0 means all interfaces) (default: \"0.0.0.0\")\n   --port value, -p value     port to listen on (default: 514)\n   --sample value, -m value   sample up to \u003cvalue\u003e log entries, then exit (default: 1000)\n   --tcp, -t                  use TCP instead of UDP (default: false)\n   --tls, -s                  use TLS for TCP server (default: false)\n   --tls-key value            TLS key file to use for TCP/TLS server\n   --tls-chain value          TLS chain file to use for TCP/TLS server\n   --outfile value, -o value  file to write output to (print to console if empty)\n   --help, -h                 show help\n```\n\nThe default (i.e. if no parameters are given) the tool will listen on all\ninterfaces on port UDP/514 (the syslog default) and dump received data as JSON\nto the console it was started from. Note that on UNIX systems (e.g. Linux,\nmacOS) this needs to be done with root privileges because we are opening a\nprivileged port (\u003c 1024)! On Windows machines the user will have to confirm a\nsecurity popup if a privileged port is used.\n\n```\n$ sudo ./mini-syslog-receiver\n2024/01/08 14:04:53 using UDP 0.0.0.0:514\n```\n\nOne can specify a high port to avoid this:\n\n```\n$ ./mini-syslog-receiver -p 10002\n2024/01/08 14:05:18 using UDP 0.0.0.0:10002\n```\n\nUse the `-o` parameter to write to a file:\n```\n$ ./mini-syslog-receiver -o out.json -p 10002 -t yes\n2024/01/08 14:07:21 using TCP 0.0.0.0:10002\n2024/01/08 14:07:21 writing to file out.json\n```\n\nFor TLS, one also needs to specify a public/private key pair from a pair of\nfiles (`--tls-chain`/`--tls-key`). The files must contain PEM encoded data. The\ncertificate file (`--tls-chain`) may contain intermediate certificates following\nthe leaf certificate to form a certificate chain.\n\n```\n$ ./mini-syslog-receiver -p 10002 -t --tls --tls-key server-key.pem --tls-chain server-cert.pem \n2024/01/08 16:32:11 using TCP/TLS 0.0.0.0:10002\n```\n\nYou can use the `--sample`/`-m` option to limit the dump to a certain number of\nlog items to avoid logging excessive log amounts:\n\n```\n$ ./mini-syslog-receiver -p 10002 -t -sample 2\n2024/01/08 16:38:22 using TCP 0.0.0.0:10002\n{\"app_name\":\"someapp\",\"client\":\"[::1]:58786\",\"facility\":1,\"hostname\":\"EXAMPLE\",\"message\":\"foobar\",\"msg_id\":\"-\",\"priority\":13,\"proc_id\":\"-\",\"severity\":5,\"structured_data\":\"[timeQuality tzKnown=\\\"1\\\" isSynced=\\\"1\\\" syncAccuracy=\\\"961000\\\"]\",\"timestamp\":\"2024-01-08T16:38:24.634075+01:00\",\"tls_peer\":\"\",\"version\":1}\n{\"app_name\":\"someapp\",\"client\":\"[::1]:58798\",\"facility\":1,\"hostname\":\"EXAMPLE\",\"message\":\"foobar\",\"msg_id\":\"-\",\"priority\":13,\"proc_id\":\"-\",\"severity\":5,\"structured_data\":\"[timeQuality tzKnown=\\\"1\\\" isSynced=\\\"1\\\" syncAccuracy=\\\"961000\\\"]\",\"timestamp\":\"2024-01-08T16:38:24.928816+01:00\",\"tls_peer\":\"\",\"version\":1}\n2024/01/08 16:38:24 sample limit of 2 log entries reached\n$\n```\nThe default is to log 1000 log items. Set the value to 0 to enable unlimited\nlogging.\n\nThe server can be stopped at any time using Control-C.\n\n## Testing\n\nYou can test whether the server works by logging manually into the server. Start\nit, e.g. like this for port 10002 TCP:\n\n```\n$ ./mini-syslog-receiver -o out.json -p 10002 -t yes\n2024/01/08 14:09:46 using TCP 0.0.0.0:10002\n2024/01/08 14:09:46 writing to file out.json\n```\n\nthen log a message and observe the output:\n\n```\n$ logger -T -P 10002 -n localhost \"foobar\" \n$ jq . \u003c out.json\n{\n  \"app_name\": \"someapp\",\n  \"client\": \"[::1]:54434\",\n  \"facility\": 1,\n  \"hostname\": \"EXAMPLE\",\n  \"message\": \"foobar\",\n  \"msg_id\": \"-\",\n  \"priority\": 13,\n  \"proc_id\": \"-\",\n  \"severity\": 5,\n  \"structured_data\": \"[timeQuality tzKnown=\\\"1\\\" isSynced=\\\"1\\\" syncAccuracy=\\\"614000\\\"]\",\n  \"timestamp\": \"2024-01-08T14:10:17.467904+01:00\",\n  \"tls_peer\": \"\",\n  \"version\": 1\n}\n```\n\n## Distribution\n\nPlease find the binaries in the release section:\nhttps://github.com/DCSO/mini-syslog-receiver/releases\n\nThere are binaries for various combinations of operating system and\narchitecture:\n\n* `mini-syslog-receiver-darwin-amd64` -- for macOS on Intel\n* `mini-syslog-receiver-darwin-arm64` -- for macOS on ARM (i.e. M1/M2/...)\n* `mini-syslog-receiver-windows-amd64` -- for 64-bit Windows (most common)\n* `mini-syslog-receiver-windows-i386` -- for 32-bit Windows (older platforms)\n* `mini-syslog-receiver-linux-amd64` -- for 64-bit Intel Linux\n* `mini-syslog-receiver-linux-i386` -- for 32-bit Intel Linux\n\n## Copyright\n\nCopyright (c) 2024, DCSO Deutsche Cyber-Sicherheitsorganisation GmbH\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcso%2Fmini-syslog-receiver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcso%2Fmini-syslog-receiver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcso%2Fmini-syslog-receiver/lists"}