Audit.NET.Elasticsearch 27.5.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Audit.NET.Elasticsearch --version 27.5.1
                    
NuGet\Install-Package Audit.NET.Elasticsearch -Version 27.5.1
                    
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.Elasticsearch" Version="27.5.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Audit.NET.Elasticsearch" Version="27.5.1" />
                    
Directory.Packages.props
<PackageReference Include="Audit.NET.Elasticsearch" />
                    
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.Elasticsearch --version 27.5.1
                    
#r "nuget: Audit.NET.Elasticsearch, 27.5.1"
                    
#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.Elasticsearch@27.5.1
                    
#: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.Elasticsearch&version=27.5.1
                    
Install as a Cake Addin
#tool nuget:?package=Audit.NET.Elasticsearch&version=27.5.1
                    
Install as a Cake Tool

Audit.NET.Elasticsearch

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

Store the audit events in Elasticsearch database using the Elastic.Clients.Elasticsearch library.

Install

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

PM> Install-Package Audit.NET.Elasticsearch

NuGet Status NuGet Count

Usage

Please see the Audit.NET Readme

Configuration

Set the static Audit.Core.Configuration.DataProvider property to set the Elasticsearch data provider, or call the UseElasticsearch 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 ElasticsearchDataProvider()
{
    ClientSettings = new ElasticsearchClientSettings(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()
    .UseElasticsearch(config => config
        .Client(new ElasticsearchClient("<CLOUD ID>", new BasicAuthentication("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 Elasticsearch client. You can either pass an instance of the ElasticsearchClient or provide the ElasticsearchClientSettings.

Optional:

  • Index: The Elasticsearch 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 = elasDataProvider.GetEvent(new ElasticsearchAuditEventId() { Index = "myindex", Id = "myid" });
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 (2)

Showing the top 2 NuGet packages that depend on Audit.NET.Elasticsearch:

Package Downloads
Mre.Sb.Auditar

Package Description

RezisFramework

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
31.0.1 758 8/28/2025
31.0.0 141 8/22/2025
30.1.3 150 8/19/2025
30.1.2 159 8/14/2025
30.1.1 191 8/13/2025
30.0.2 1,335 6/26/2025
30.0.1 725 5/29/2025
30.0.0 178 5/27/2025
29.0.1 831 5/8/2025
29.0.0 710 5/6/2025
28.0.0 189 5/5/2025
27.5.3 227 4/23/2025
27.5.2 333 4/9/2025
27.5.1 139 4/4/2025
27.5.0 8,253 3/5/2025
27.4.1 594 2/9/2025
27.4.0 148 1/29/2025
27.3.3 1,521 1/21/2025
27.3.2 328 12/11/2024
27.3.1 132 12/10/2024
27.3.0 255 12/8/2024
27.2.0 1,602 11/23/2024
27.1.1 563 10/28/2024
27.1.0 164 10/24/2024
27.0.3 341 9/25/2024
27.0.2 640 9/19/2024
27.0.1 190 9/4/2024
27.0.0 154 9/3/2024
26.0.1 487 8/22/2024
26.0.0 670 7/19/2024
25.0.7 45,506 7/4/2024
25.0.6 1,725 6/24/2024
25.0.5 243 6/18/2024
25.0.4 14,446 3/24/2024
25.0.3 191 3/13/2024
25.0.2 187 3/12/2024
25.0.1 305 2/28/2024
25.0.0 7,956 2/16/2024
24.0.1 223 2/12/2024
24.0.0 174 2/12/2024
23.0.0 6,140 12/14/2023
22.1.0 27,522 12/9/2023
22.0.2 12,055 12/1/2023
22.0.1 5,722 11/16/2023
22.0.0 254 11/14/2023
21.1.0 2,667 10/9/2023
21.0.4 21,053 9/15/2023
21.0.3 13,903 7/9/2023
21.0.2 279 7/6/2023
21.0.1 3,863 5/27/2023
21.0.0 999 4/15/2023
20.2.4 589 3/27/2023
20.2.3 1,746 3/17/2023
20.2.2 376 3/14/2023
20.2.1 376 3/11/2023
20.2.0 535 3/7/2023
20.1.6 434 2/23/2023
20.1.5 5,180 2/9/2023
20.1.4 1,919 1/28/2023
20.1.3 1,288 12/21/2022
20.1.2 590 12/14/2022
20.1.1 488 12/12/2022
20.1.0 501 12/4/2022
20.0.4 476 11/30/2022
20.0.3 5,729 10/28/2022
20.0.2 550 10/26/2022
20.0.1 910 10/21/2022
20.0.0 1,353 10/1/2022
19.4.1 17,036 9/10/2022
19.4.0 703 9/2/2022
19.3.0 1,415 8/23/2022
19.2.2 870 8/11/2022
19.2.1 1,005 8/6/2022
19.2.0 734 7/24/2022
19.1.4 2,116 5/23/2022
19.1.3 625 5/22/2022
19.1.2 644 5/18/2022
19.1.1 844 4/28/2022
19.1.0 853 4/10/2022
19.0.7 913 3/13/2022
19.0.6 65,587 3/7/2022
19.0.5 3,365 1/28/2022
19.0.4 13,323 1/23/2022
19.0.3 4,225 12/14/2021
19.0.2 524 12/11/2021
19.0.1 12,962 11/20/2021
19.0.0 4,693 11/11/2021
19.0.0-rc.net60.2 275 9/26/2021
19.0.0-rc.net60.1 316 9/16/2021
18.1.6 11,642 9/26/2021
18.1.5 937 9/7/2021
18.1.4 613 9/6/2021
18.1.3 708 8/19/2021
18.1.2 707 8/8/2021
18.1.1 681 8/5/2021
18.1.0 639 8/1/2021
18.0.1 623 7/30/2021
18.0.0 722 7/26/2021
17.0.8 25,029 7/7/2021
17.0.7 5,394 6/16/2021
17.0.6 952 6/5/2021
17.0.5 2,207 5/28/2021
17.0.4 2,896 5/4/2021
17.0.3 639 5/1/2021
17.0.2 23,741 4/22/2021
17.0.1 620 4/18/2021
17.0.0 1,555 3/26/2021
16.5.6 635 3/25/2021
16.5.5 633 3/23/2021
16.5.4 6,801 3/9/2021
16.5.3 624 2/26/2021
16.5.2 636 2/23/2021
16.5.1 665 2/21/2021
16.5.0 769 2/17/2021
16.4.5 671 2/15/2021
16.4.4 626 2/5/2021
16.4.3 1,609 1/27/2021
16.4.2 639 1/22/2021
16.4.1 685 1/21/2021
16.4.0 4,387 1/11/2021
16.3.3 697 1/8/2021
16.3.2 731 1/3/2021
16.3.1 696 12/31/2020
16.3.0 675 12/30/2020
16.2.1 764 12/27/2020
16.2.0 8,178 10/13/2020
16.1.5 833 10/4/2020
16.1.4 821 9/17/2020
16.1.3 881 9/13/2020
16.1.2 734 9/9/2020
16.1.1 758 9/3/2020
16.1.0 235,627 8/19/2020
16.0.3 2,113 8/15/2020
16.0.2 743 8/9/2020
16.0.1 770 8/8/2020
16.0.0 675 8/7/2020
15.3.0 123,694 7/23/2020
15.2.3 2,068 7/14/2020
15.2.2 3,248 5/19/2020
15.2.1 1,164 5/12/2020
15.2.0 772 5/9/2020
15.1.1 757 5/4/2020
15.1.0 1,339 4/13/2020
15.0.5 1,743 3/18/2020
15.0.4 1,806 2/28/2020
15.0.3 767 2/26/2020
15.0.2 62,090 1/20/2020
15.0.1 1,772 1/10/2020
15.0.0 4,999 12/17/2019
14.9.1 4,823 11/30/2019
14.9.0 774 11/29/2019
14.8.1 903 11/26/2019
14.8.0 12,569 11/20/2019
14.7.0 6,695 10/9/2019
14.6.6 834 10/8/2019
14.6.5 7,012 9/27/2019
14.6.4 903 9/21/2019
14.6.3 1,923 8/12/2019
14.6.2 1,641 8/3/2019
14.6.1 887 8/3/2019
14.6.0 971 7/26/2019
14.5.7 1,542 7/18/2019
14.5.6 5,042 7/10/2019
14.5.5 970 7/1/2019
14.5.4 949 6/17/2019
14.5.3 1,089 6/5/2019
14.5.2 924 5/30/2019
14.5.1 894 5/28/2019
14.5.0 943 5/24/2019
14.4.0 1,511 5/22/2019
14.3.4 1,029 5/14/2019
14.3.3 1,051 5/9/2019
14.3.2 978 4/30/2019
14.3.1 950 4/27/2019
14.3.0 1,027 4/24/2019
14.2.3 943 4/17/2019
14.2.2 948 4/10/2019
14.2.1 940 4/5/2019
14.2.0 3,093 3/16/2019
14.1.1 934 3/8/2019
14.1.0 1,135 2/11/2019
14.0.4 41,884 1/31/2019
14.0.3 1,060 1/22/2019
14.0.2 4,322 12/15/2018
14.0.1 17,143 11/29/2018
14.0.0 1,185 11/19/2018
13.3.0 3,518 11/16/2018
13.2.2 1,124 11/15/2018
13.2.1 1,201 11/13/2018
13.2.0 1,129 10/31/2018
13.1.5 1,119 10/31/2018
13.1.4 1,143 10/25/2018
13.1.3 1,144 10/18/2018
13.1.2 1,488 9/12/2018
13.1.1 2,538 9/11/2018
13.1.0 1,209 9/11/2018
13.0.0 1,257 8/29/2018
12.3.6 1,218 8/29/2018
12.3.5 1,693 8/22/2018
12.3.4 1,242 8/21/2018
12.3.3 25,982 8/21/2018
12.3.2 1,289 8/20/2018
12.3.1 1,280 8/20/2018
12.3.0 1,246 8/20/2018
12.2.2 1,292 8/15/2018
12.2.1 1,269 8/9/2018
12.2.0 1,321 8/8/2018
12.1.11 4,313 7/30/2018
12.1.10 2,957 7/20/2018
12.1.9 1,719 7/10/2018
12.1.8 1,538 7/2/2018
12.1.7 1,643 6/7/2018
12.1.6 9,521 6/4/2018
12.1.5 1,601 6/2/2018
12.1.4 1,612 5/25/2018
12.1.3 2,655 5/16/2018
12.1.2 1,441 5/15/2018
12.1.1 2,791 5/14/2018
12.1.0 1,598 5/9/2018
12.0.7 1,747 5/5/2018
12.0.6 1,638 5/4/2018
12.0.5 1,652 5/3/2018
12.0.4 2,793 4/30/2018
12.0.3 1,705 4/30/2018