Serilog.Sinks.Zabbix 1.0.0

.NET Standard 2.1
dotnet add package Serilog.Sinks.Zabbix --version 1.0.0
NuGet\Install-Package Serilog.Sinks.Zabbix -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Serilog.Sinks.Zabbix" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Serilog.Sinks.Zabbix --version 1.0.0
#r "nuget: Serilog.Sinks.Zabbix, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Serilog.Sinks.Zabbix as a Cake Addin
#addin nuget:?package=Serilog.Sinks.Zabbix&version=1.0.0

// Install Serilog.Sinks.Zabbix as a Cake Tool
#tool nuget:?package=Serilog.Sinks.Zabbix&version=1.0.0

Writes Serilog events to an item in Zabbix.

Getting started

Install the Serilog.Sinks.Zabbix package from NuGet:

PM> Install-Package Serilog.Sinks.Zabbix

To configure the sink in C# code, call .WriteTo.ZabbixSink() during logger configuration:

var log = new LoggerConfiguration()
    .WriteTo.ZabbixSink("localhost", 10051, "host", "item_key")
Configuration in Zabbix

Configure a host in Zabbix with an item as follows:

Parameter Value
Type Zabbix trapper
Key The key used as above (e.g. item_key)
Type of information Text

XML <appSettings> configuration

To use the sink with the Serilog.Settings.AppSettings package, first install that package if you haven't already done so:

PM> Install-Package Serilog.Settings.AppSettings

Instead of configuring the sink in code, call ReadFrom.AppSettings():

var log = new LoggerConfiguration()

In your application's App.config or Web.config file, specify the sink assembly and required path format under the <appSettings> node:

        <add key="serilog:using:ZabbixSink" value="Serilog.Sinks.Zabbix" />
        <add key="serilog:write-to:ZabbixSink.address" value="localhost" />
        <add key="serilog:write-to:ZabbixSink.port" value="10051" />
        <add key="" value="host" />
        <add key="serilog:write-to:ZabbixSink.item" value="item_key" />

JSON appsettings.json configuration

To use the sink with Microsoft.Extensions.Configuration, for example with ASP.NET Core or .NET Core, use the Serilog.Settings.Configuration package. First install that package if you have not already done so:

PM> Install-Package Serilog.Settings.Configuration

Instead of configuring the sink directly in code, call ReadFrom.Configuration():

var configuration = new ConfigurationBuilder()

var logger = new LoggerConfiguration()

In your appsettings.json file, under the Serilog node, :

  "Serilog": {
    "Using": [ "Serilog.Sinks.Zabbix" ],
    "MinimumLevel": "Information",
    "WriteTo": [
        "Name": "ZabbixSink",
        "Args": {
          "address": "localhost",
          "port": 10051,
          "host": "host",
          "key": "item_key"
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 865 10/16/2021