{"id":22951547,"url":"https://github.com/lifailon/psyslog","last_synced_at":"2025-10-29T08:58:59.261Z","repository":{"id":170592819,"uuid":"646739481","full_name":"Lifailon/pSyslog","owner":"Lifailon","description":"PowerShell Syslog Server/Client and UDPRelay","archived":false,"fork":false,"pushed_at":"2024-03-20T07:26:00.000Z","size":16686,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"rsa","last_synced_at":"2024-11-21T19:09:37.872Z","etag":null,"topics":["api","bytecode","dotnet","linux","log","logging","metrics","module","network","powershell","relay","relay-server","rotation","rsyslog","server","socket","syslog","udp","udp-client","windows"],"latest_commit_sha":null,"homepage":"https://nuget.org/packages/pSyslog","language":"PowerShell","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/Lifailon.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}},"created_at":"2023-05-29T08:26:14.000Z","updated_at":"2024-08-21T21:52:31.000Z","dependencies_parsed_at":"2024-03-20T07:48:14.755Z","dependency_job_id":null,"html_url":"https://github.com/Lifailon/pSyslog","commit_stats":null,"previous_names":["lifailon/psyslog"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lifailon%2FpSyslog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lifailon%2FpSyslog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lifailon%2FpSyslog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lifailon%2FpSyslog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lifailon","download_url":"https://codeload.github.com/Lifailon/pSyslog/tar.gz/refs/heads/rsa","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229717731,"owners_count":18113400,"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":["api","bytecode","dotnet","linux","log","logging","metrics","module","network","powershell","relay","relay-server","rotation","rsyslog","server","socket","syslog","udp","udp-client","windows"],"created_at":"2024-12-14T15:16:37.933Z","updated_at":"2025-10-29T08:58:54.214Z","avatar_url":"https://github.com/Lifailon.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pSyslog\n\n[![GitHub Release](https://img.shields.io/github/v/release/Lifailon/pSyslog?display_name=release\u0026logo=GitHub\u0026label=GitHub\u0026link=https%3A%2F%2Fgithub.com%2FLifailon%2FpSyslog%2F)](https://github.com/Lifailon/pSyslog)\n[![NuGet Version](https://img.shields.io/nuget/v/pSyslog?logo=NuGet\u0026label=NuGet\u0026link=https%3A%2F%2Fwww.nuget.org%2Fpackages%2FpSyslog)](https://www.nuget.org/packages/pSyslog)\n[![GitHub top language](https://img.shields.io/github/languages/top/Lifailon/pSyslog?logo=PowerShell\u0026link=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell)](https://github.com/PowerShell/PowerShell)\n[![GitHub License](https://img.shields.io/github/license/Lifailon/pSyslog?link=https%3A%2F%2Fgithub.com%2FLifailon%2FpSyslog%2Fblob%2Frsa%2FLICENSE)](https://github.com/Lifailon/pSyslog/blob/rsa/LICENSE)\n\nSyslog Server/Client and UDP Relay based on **.NET Framework Class System.Net.Sockets** to Background Job mode.\n\n- [📚 Sources](#-Sources)\n- [🚀 Install](#-Install)\n- [📭 Server](#-pSyslog-Server)\n- [✉️ Client](#%EF%B8%8F-pSyslog-Client)\n- [🔌 rSyslog ](#-rsyslog-compatibility)\n- [🚧 Encryption](#-Encryption-Base64)\n- [♻️ UDP Relay](#%EF%B8%8F-UDP-Relay)\n- [📊 Metrics](#-Metrics)\n- [🔍 Search](#-Search)\n- [📑 Rotation](#-Rotation)\n- [🐧 Linux Client](#-Linux-Client)\n\n### 📚 Sources\n\nDocumentation used (udp socket): **[metanit.com](https://metanit.com/sharp/net/3.1.php)** \\\nDocumentation used (syslog message): **[devconnected.com](https://devconnected.com/syslog-the-complete-system-administrator-guide/)** \\\nSource code refactoring syslog server: **[spiderip.com](https://spiderip.com/blog/2018/07/syslog)** \\\nSource udp client: **[cloudbrothers.info](https://cloudbrothers.info/en/test-udp-connection-powershell/)**\n\n### 🚀 Install\n\nInstall module from [NuGet repository](https://www.nuget.org/packages/pSyslog):\n\n```PowerShell\nInstall-Module pSyslog -Repository NuGet\n```\n\n💡 You must have a NuGet repository registered:\n\n```PowerShell\nRegister-PSRepository -Name \"NuGet\" -SourceLocation \"https://www.nuget.org/api/v2\" -InstallationPolicy Trusted\n```\n\nOr used install or update module from the GitHub repository (used the script **[Deploy-pSyslog.ps1](https://github.com/Lifailon/pSyslog/blob/rsa/Module/Deploy-pSyslog.ps1)**) **use the command in the powershell console**:\n```\nInvoke-Expression(New-Object Net.WebClient).DownloadString(\"https://raw.githubusercontent.com/Lifailon/pSyslog/rsa/Module/Deploy-pSyslog.ps1\")\n```\n**Supported PSVersion:** 5.1 and 7.3\n\n**Import module and get command list:**\n```\nPS C:\\Users\\Lifailon\u003e Import-Module pSyslog\nPS C:\\Users\\Lifailon\u003e Get-Command -Module pSyslog\n\nCommandType     Name                     Version    Source\n-----------     ----                     -------    ------\nFunction        Get-pSyslog              0.6        pSyslog\nFunction        Send-pSyslog             0.6        pSyslog\nFunction        Show-pSyslog             0.6        pSyslog\nFunction        Start-pSyslog            0.6        pSyslog\nFunction        Start-UDPRelay           0.6        pSyslog\nFunction        Stop-pSyslog             0.6        pSyslog\n```\n\n### 📭 pSyslog Server\n```\nPS C:\\Users\\Lifailon\u003e Start-pSyslog -Port 514\nPS C:\\Users\\Lifailon\u003e Get-pSyslog -Status | Format-List\n\nStatus    : Running\nStartTime : 06.06.2023 1:09:47\nStopTime  :\n\nPS C:\\Users\\Lifailon\u003e Get-pSyslog\n\nPS C:\\Users\\Lifailon\u003e Get-pSyslog\nJun 6 01:11:01 zabbix-01        Informational authpriv CRON[3052]:               pam_unix(cron:session): session opened for user root by (uid=0)\nJun 6 01:11:01 zabbix-01        Informational cron     CRON[3053]:               (root) CMD (date \u003e\u003e /dump/zabbix/cron-test-date.txt)\nJun 6 01:11:01 zabbix-01        Informational authpriv CRON[3052]:               pam_unix(cron:session): session closed for user root\nJun 6 01:11:03 zabbix-01        Informational daemon   multipathd[784]:          sda: add missing path\nJun 6 01:11:03 zabbix-01        Informational daemon   multipathd[784]:          sda: failed to get udev uid: Invalid argument\nJun 6 01:11:03 zabbix-01        Informational daemon   multipathd[784]:          sda: failed to get sysfs uid: Invalid argument\nJun 6 01:11:03 zabbix-01        Informational daemon   multipathd[784]:          sda: failed to get sgio uid: No such file or directory\nJun 6 01:11:01 plex-01          Informational user     Service[WinRM]            Running\n...\n\nPS C:\\Users\\Lifailon\u003e Stop-pSyslog\nPS C:\\Users\\Lifailon\u003e Get-pSyslog -Status | Format-List\n\nStatus    : Stopped\nStartTime : 06.06.2023 1:09:47\nStopTime  : 06.06.2023 1:13:43\n```\n\n### ✉️ pSyslog Client\n```\nSend-pSyslog -Content \"Test\" -Server 192.168.3.99\nSend-pSyslog -Content \"Test\" -Server 192.168.3.99 -Type Informational -PortServer 514 -PortClient 55514\n```\n![Image alt](https://github.com/Lifailon/pSyslog/blob/rsa/Screen/Send-pSyslog.jpg)\n\n\n### 🔌 rSyslog compatibility\nUse pipeline and sending to rSyslog server:\n```\n(Get-Service -Name WinRM).Status | Send-pSyslog -Server 192.168.3.102 -Tag Service[WinRM]\n```\n![Image alt](https://github.com/Lifailon/pSyslog/blob/rsa/Screen/Send-pSyslog-Rsyslog.jpg)\n\n### 🚧 Encryption Base64\n```\nSend-pSyslog -Content \"test\" -Server 192.168.3.99 -PortServer 514\nSend-pSyslog -Content \"test\" -Server 192.168.3.99 -PortServer 514 -Base64\n```\n**Wireshark filter:** `udp.dstport == 514 \u0026\u0026 ip.src == 192.168.3.100 \u0026\u0026 !icmp`\n\n![Image alt](https://github.com/Lifailon/pSyslog/blob/rsa/Screen/Encrypt-Base64.jpg)\n\n### ♻️ UDP Relay\n\n**Server** (192.168.3.102): `Start-pSyslog -Port 514` \\\n**Relay**  (192.168.3.99):  `Start-UDPRelay -inPort 515 -outIP 192.168.3.102 -outPort 514` \\\n**Client** (192.168.3.100): `Send-pSyslog -Server 192.168.3.99 -PortServer 515 -Content $(Get-Date)`\n\n![Image alt](https://github.com/Lifailon/pSyslog/blob/rsa/Screen/UDPRelay.jpg)\n\n### 📊 Metrics\nOut logfile to Object for collecting metrics\n```\nPS C:\\Users\\Lifailon\u003e Show-pSyslog -Type Warning -Count\n2917\nPS C:\\Users\\Lifailon\u003e Show-pSyslog -Type Alert -Count\n36\nPS C:\\Users\\Lifailon\u003e Show-pSyslog -Type Critical -Count\n5\nPS C:\\Users\\Lifailon\u003e Show-pSyslog -Type Error -Count\n5\nPS C:\\Users\\Lifailon\u003e Show-pSyslog -Type Emergency -Count\n0\nPS C:\\Users\\Lifailon\u003e Show-pSyslog -Type Informational -Count\n15491\n```\n\n![Image alt](https://github.com/Lifailon/pSyslog/blob/rsa/Screen/Show-pSyslog-Metrics.jpg)\n\n### 🔍 Search\n\n`Show-pSyslog | Out-GridView`\n\n**Or view old journal by wildcard file name:**\n\n`Show-pSyslog -LogFile 05-06 | Out-GridView`\n\n![Image alt](https://github.com/Lifailon/pSyslog/blob/rsa/Screen/Show-pSyslog-Out-GridView.jpg)\n\nExample logfile system reboot: **[06-06-2023_reboot.log](https://github.com/Lifailon/pSyslog/blob/rsa/Example/06-06-2023_reboot.log)**\n\n### 📑 Rotation\nLogfile rotation and show all log files in 24 hours:\n```\nStart-pSyslog -RotationSize 500\nShow-pSyslog -Count\nShow-pSyslog -Count -LogFile 10-06\n```\n![Image alt](https://github.com/Lifailon/pSyslog/blob/rsa/Screen/Rotation-Logfile.jpg)\n\n### 🐧 Linux Client:\n\n**Example output local syslog (using tail):**\n\n![Image alt](https://github.com/Lifailon/pSyslog/blob/rsa/Screen/Syslog-Local-Tail.jpg)\n\n\n**Example pSyslog server output to console powershell:**\n\n![Image alt](https://github.com/Lifailon/pSyslog/blob/rsa/Screen/pSyslog-Console.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flifailon%2Fpsyslog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flifailon%2Fpsyslog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flifailon%2Fpsyslog/lists"}