Audit.NET.OpenSearch 30.0.2

dotnet add package Audit.NET.OpenSearch --version 30.0.2
                    
NuGet\Install-Package Audit.NET.OpenSearch -Version 30.0.2
                    
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="Audit.NET.OpenSearch" Version="30.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Audit.NET.OpenSearch" Version="30.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Audit.NET.OpenSearch" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Audit.NET.OpenSearch --version 30.0.2
                    
#r "nuget: Audit.NET.OpenSearch, 30.0.2"
                    
#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.
#:package Audit.NET.OpenSearch@30.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Audit.NET.OpenSearch&version=30.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Audit.NET.OpenSearch&version=30.0.2
                    
Install as a Cake Tool

Audit.NET.OpenSearch

OpenSearch provider for Audit.NET library (An extensible framework to audit executing operations in .NET).

Store the audit events in OpenSearch database using the OpenSearch.Client library.

Install

NuGet Package To install the package run the following command on the Package Manager Console:

PM> Install-Package Audit.NET.OpenSearch

NuGet Status NuGet Count

Usage

Please see the Audit.NET Readme

Configuration

Set the static Audit.Core.Configuration.DataProvider property to set the OpenSearch data provider, or call the UseOpenSearch method on the fluent configuration. This should be done before any AuditScope creation, i.e. during application startup.

For example:

Audit.Core.Configuration.DataProvider = new OpenSearchDataProvider()
{
    ClientSettings = new ConnectionSettings(new Uri("http://localhost:9200")),
    Index = new(ev => ev.EventType),
    IdBuilder = ev => Guid.NewGuid()
};

Or by using the fluent configuration API:

Audit.Core.Configuration.Setup()
    .UseOpenSearch(config => config
        .Client(new OpenSearchClient("<CLOUD ID>", new BasicAuthenticationCredentials("user", "pass")));
        .Index(auditEvent => auditEvent.EventType)
        .Id(ev => Guid.NewGuid()));

Note that you can provide the settings as a function of the Audit Event.

Provider Options

Mandatory:

  • Client / ClientSettings: Specifies how to create the OpenSearch client. You can either pass an instance of the OpenSearchClient or provide the OpenSearchClientSettings.

Optional:

  • Index: The OpenSearch index name to use. Can be NULL to use the default index.
  • Id / IdBuilder: The id to use for the given audit event. Can be NULL to use an auto-generated id.

Query events

This provider implements GetEvent and GetEventAsync methods to obtain an audit event by id:

var event = openSearchDataProvider.GetEvent(new OpenSearchAuditEventId() { Index = "myindex", Id = "myid" });

ZZZ Projects - Sponsorship

Entity Framework Extensions and Dapper Plus are major sponsors and are proud to contribute to the development of Audit.NET

Combine the power of auditing with the speed of Bulk Operations to get the best of both worlds — audit and performance.

Entity Framework Extensions - Sponsor

Dapper Plus - Sponsor

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.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  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)
Included target framework(s) (in package)
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
30.0.2 138 6/26/2025
30.0.1 146 5/29/2025
30.0.0 143 5/27/2025
29.0.1 154 5/8/2025
29.0.0 141 5/6/2025
28.0.0 157 5/5/2025
27.5.3 235 4/23/2025
27.5.2 188 4/9/2025
27.5.1 265 4/4/2025