Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Apr 8, 2024. It is now read-only.
/AzureSyslogPublic archive

A simple .NET Core multi-threaded Syslog server, which saves Syslog entries to Azure Table Storage, Azure ServiceBus or a Local File.

License

NotificationsYou must be signed in to change notification settings

jhueppauff/AzureSyslog

Repository files navigation

A simple .NET Core multi-threaded Syslog server, which saves Syslog entries to Azure Table Storage, Azure ServiceBus or a Local File.

PreRequisite

Build

  • Visual Studio, Visual Studio Code, or other .NET IDE's
  • DotNet Core 2.2
  • Open UDP Port 514 (syslog)

Run

  • DotNet Core 2.2
  • Open UDP Port 514 (syslog)
  • Configure the AppSettings with your Storage Connection String

How to build

  • Clone the Repo
  • Use the Visual Studio Publish function (right click on the project -> publish)

How to run

There are 3 Options to save the Messages to.

  • Azure Storage Account
  • Azure Service Bus
  • Local FileSystem (JSON File, not intended for production use)
  • You can disable output actions by setting the config value "Enabled" to false

Azure Storage Account

  • Create Azure Storage Account. SeeMicrosoft Docs
  • Retrieve the Azure Storage Connection String from the Azure Resource
  • Add your Azure Storage Connection string to the appsettings.json
{"StorageEndpointConfiguration": [    {"ConnectionString":"[Your ConnectionString]","Enabled":true,"ConnectionType":"TableStorage","Name" :"syslogMessages"    }  ]}

Azure ServiceBus

  • Create an Azure ServiceBus SeeMicrosoft Docs
  • Retrieve the Connection String from the Azure ServiceBus (Hidden under "Shared access policy")
  • Add your Connection string to the appsettings.json
  • Create a Queue in the Service Bus
{"StorageEndpointConfiguration": [    {"ConnectionString":"[Your ConnectionString]","Enabled":true,"ConnectionType":"ServiceBus","Name" :"[your queue name]"    }  ]}

Local File System

  • Create an empty File somewhere in your FileSystem and ensure access
  • Add the File Path and File Name to the config
{"StorageEndpointConfiguration": [    {"ConnectionString":"[Path to the File]","Enabled":true,"ConnectionType":"ServiceBus","Name" :"[File name]"    }  ]}

All together

You can configure multiple outputs (even multiple times the same output type, e.g. 2 table storages)Just add every output you like to the config and choose the correctConnectionType.

{"StorageEndpointConfiguration": [    {"ConnectionString":"","Enabled":true,"ConnectionType":"ServiceBus","Name":"syslogMessages"    },    {"ConnectionString":"","Enabled":true,"ConnectionType":"TableStorage","Name" :"syslogMessages"    },    {"ConnectionString":"","Enabled":true,"ConnectionType":"LocalFile","Name" :"log.txt"    }  ]}
  • Rundotnet Syslog.Server.dll on the command line

About

A simple .NET Core multi-threaded Syslog server, which saves Syslog entries to Azure Table Storage, Azure ServiceBus or a Local File.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp