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
<PackageReference Include="Audit.NET.OpenSearch" Version="30.0.2" />
<PackageVersion Include="Audit.NET.OpenSearch" Version="30.0.2" />
<PackageReference Include="Audit.NET.OpenSearch" />
paket add Audit.NET.OpenSearch --version 30.0.2
#r "nuget: Audit.NET.OpenSearch, 30.0.2"
#:package Audit.NET.OpenSearch@30.0.2
#addin nuget:?package=Audit.NET.OpenSearch&version=30.0.2
#tool nuget:?package=Audit.NET.OpenSearch&version=30.0.2
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
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.
Product | Versions 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. |
-
.NETFramework 4.6.2
- Audit.NET (>= 30.0.2)
- OpenSearch.Client (>= 1.8.0)
-
.NETStandard 2.0
- Audit.NET (>= 30.0.2)
- OpenSearch.Client (>= 1.8.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.