Audit.NET.Elasticsearch 27.5.3

dotnet add package Audit.NET.Elasticsearch --version 27.5.3
                    
NuGet\Install-Package Audit.NET.Elasticsearch -Version 27.5.3
                    
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.3" />
                    
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.3" />
                    
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.3
                    
#r "nuget: Audit.NET.Elasticsearch, 27.5.3"
                    
#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.
#addin nuget:?package=Audit.NET.Elasticsearch&version=27.5.3
                    
Install Audit.NET.Elasticsearch as a Cake Addin
#tool nuget:?package=Audit.NET.Elasticsearch&version=27.5.3
                    
Install Audit.NET.Elasticsearch 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" });

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. 
.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
27.5.3 156 4/23/2025
27.5.2 228 4/9/2025
27.5.1 98 4/4/2025
27.5.0 1,694 3/5/2025
27.4.1 505 2/9/2025
27.4.0 108 1/29/2025
27.3.3 1,216 1/21/2025
27.3.2 278 12/11/2024
27.3.1 90 12/10/2024
27.3.0 208 12/8/2024
27.2.0 913 11/23/2024
27.1.1 447 10/28/2024
27.1.0 115 10/24/2024
27.0.3 301 9/25/2024
27.0.2 562 9/19/2024
27.0.1 136 9/4/2024
27.0.0 111 9/3/2024
26.0.1 339 8/22/2024
26.0.0 544 7/19/2024
25.0.7 44,749 7/4/2024
25.0.6 1,501 6/24/2024
25.0.5 207 6/18/2024
25.0.4 14,213 3/24/2024
25.0.3 160 3/13/2024
25.0.2 138 3/12/2024
25.0.1 263 2/28/2024
25.0.0 7,284 2/16/2024
24.0.1 176 2/12/2024
24.0.0 131 2/12/2024
23.0.0 5,450 12/14/2023
22.1.0 27,474 12/9/2023
22.0.2 12,003 12/1/2023
22.0.1 4,939 11/16/2023
22.0.0 231 11/14/2023
21.1.0 2,518 10/9/2023
21.0.4 21,011 9/15/2023
21.0.3 13,765 7/9/2023
21.0.2 231 7/6/2023
21.0.1 3,681 5/27/2023
21.0.0 935 4/15/2023
20.2.4 524 3/27/2023
20.2.3 1,683 3/17/2023
20.2.2 321 3/14/2023
20.2.1 318 3/11/2023
20.2.0 473 3/7/2023
20.1.6 370 2/23/2023
20.1.5 5,119 2/9/2023
20.1.4 1,853 1/28/2023
20.1.3 1,221 12/21/2022
20.1.2 534 12/14/2022
20.1.1 426 12/12/2022
20.1.0 451 12/4/2022
20.0.4 410 11/30/2022
20.0.3 4,907 10/28/2022
20.0.2 492 10/26/2022
20.0.1 853 10/21/2022
20.0.0 1,215 10/1/2022
19.4.1 13,403 9/10/2022
19.4.0 646 9/2/2022
19.3.0 1,360 8/23/2022
19.2.2 810 8/11/2022
19.2.1 928 8/6/2022
19.2.0 674 7/24/2022
19.1.4 2,027 5/23/2022
19.1.3 550 5/22/2022
19.1.2 579 5/18/2022
19.1.1 773 4/28/2022
19.1.0 777 4/10/2022
19.0.7 827 3/13/2022
19.0.6 63,976 3/7/2022
19.0.5 3,227 1/28/2022
19.0.4 13,240 1/23/2022
19.0.3 4,072 12/14/2021
19.0.2 450 12/11/2021
19.0.1 12,888 11/20/2021
19.0.0 4,617 11/11/2021
19.0.0-rc.net60.2 205 9/26/2021
19.0.0-rc.net60.1 248 9/16/2021
18.1.6 11,538 9/26/2021
18.1.5 852 9/7/2021
18.1.4 537 9/6/2021
18.1.3 628 8/19/2021
18.1.2 632 8/8/2021
18.1.1 605 8/5/2021
18.1.0 560 8/1/2021
18.0.1 547 7/30/2021
18.0.0 644 7/26/2021
17.0.8 19,038 7/7/2021
17.0.7 5,182 6/16/2021
17.0.6 870 6/5/2021
17.0.5 2,130 5/28/2021
17.0.4 2,812 5/4/2021
17.0.3 560 5/1/2021
17.0.2 22,303 4/22/2021
17.0.1 541 4/18/2021
17.0.0 1,471 3/26/2021
16.5.6 553 3/25/2021
16.5.5 542 3/23/2021
16.5.4 5,888 3/9/2021
16.5.3 538 2/26/2021
16.5.2 558 2/23/2021
16.5.1 582 2/21/2021
16.5.0 685 2/17/2021
16.4.5 583 2/15/2021
16.4.4 541 2/5/2021
16.4.3 1,465 1/27/2021
16.4.2 553 1/22/2021
16.4.1 598 1/21/2021
16.4.0 4,005 1/11/2021
16.3.3 611 1/8/2021
16.3.2 639 1/3/2021
16.3.1 610 12/31/2020
16.3.0 585 12/30/2020
16.2.1 680 12/27/2020
16.2.0 8,020 10/13/2020
16.1.5 743 10/4/2020
16.1.4 732 9/17/2020
16.1.3 789 9/13/2020
16.1.2 643 9/9/2020
16.1.1 668 9/3/2020
16.1.0 235,483 8/19/2020
16.0.3 2,033 8/15/2020
16.0.2 656 8/9/2020
16.0.1 694 8/8/2020
16.0.0 588 8/7/2020
15.3.0 117,446 7/23/2020
15.2.3 1,986 7/14/2020
15.2.2 3,042 5/19/2020
15.2.1 1,070 5/12/2020
15.2.0 683 5/9/2020
15.1.1 676 5/4/2020
15.1.0 1,255 4/13/2020
15.0.5 1,648 3/18/2020
15.0.4 1,721 2/28/2020
15.0.3 681 2/26/2020
15.0.2 61,998 1/20/2020
15.0.1 1,692 1/10/2020
15.0.0 4,888 12/17/2019
14.9.1 3,923 11/30/2019
14.9.0 679 11/29/2019
14.8.1 808 11/26/2019
14.8.0 12,479 11/20/2019
14.7.0 6,604 10/9/2019
14.6.6 741 10/8/2019
14.6.5 6,921 9/27/2019
14.6.4 813 9/21/2019
14.6.3 1,825 8/12/2019
14.6.2 1,549 8/3/2019
14.6.1 792 8/3/2019
14.6.0 887 7/26/2019
14.5.7 1,451 7/18/2019
14.5.6 4,930 7/10/2019
14.5.5 878 7/1/2019
14.5.4 863 6/17/2019
14.5.3 993 6/5/2019
14.5.2 827 5/30/2019
14.5.1 806 5/28/2019
14.5.0 856 5/24/2019
14.4.0 1,424 5/22/2019
14.3.4 950 5/14/2019
14.3.3 960 5/9/2019
14.3.2 897 4/30/2019
14.3.1 869 4/27/2019
14.3.0 922 4/24/2019
14.2.3 851 4/17/2019
14.2.2 855 4/10/2019
14.2.1 848 4/5/2019
14.2.0 3,001 3/16/2019
14.1.1 853 3/8/2019
14.1.0 1,058 2/11/2019
14.0.4 41,079 1/31/2019
14.0.3 973 1/22/2019
14.0.2 4,231 12/15/2018
14.0.1 17,057 11/29/2018
14.0.0 1,081 11/19/2018
13.3.0 3,429 11/16/2018
13.2.2 1,027 11/15/2018
13.2.1 1,094 11/13/2018
13.2.0 1,044 10/31/2018
13.1.5 1,024 10/31/2018
13.1.4 1,042 10/25/2018
13.1.3 1,046 10/18/2018
13.1.2 1,384 9/12/2018
13.1.1 2,438 9/11/2018
13.1.0 1,111 9/11/2018
13.0.0 1,165 8/29/2018
12.3.6 1,115 8/29/2018
12.3.5 1,589 8/22/2018
12.3.4 1,128 8/21/2018
12.3.3 25,892 8/21/2018
12.3.2 1,187 8/20/2018
12.3.1 1,169 8/20/2018
12.3.0 1,140 8/20/2018
12.2.2 1,182 8/15/2018
12.2.1 1,170 8/9/2018
12.2.0 1,168 8/8/2018
12.1.11 4,153 7/30/2018
12.1.10 2,792 7/20/2018
12.1.9 1,494 7/10/2018
12.1.8 1,319 7/2/2018
12.1.7 1,411 6/7/2018
12.1.6 9,357 6/4/2018
12.1.5 1,366 6/2/2018
12.1.4 1,380 5/25/2018
12.1.3 2,479 5/16/2018
12.1.2 1,283 5/15/2018
12.1.1 2,561 5/14/2018
12.1.0 1,368 5/9/2018
12.0.7 1,511 5/5/2018
12.0.6 1,412 5/4/2018
12.0.5 1,419 5/3/2018
12.0.4 2,568 4/30/2018
12.0.3 1,488 4/30/2018