Audit.NET.Elasticsearch 27.1.0

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

// Install Audit.NET.Elasticsearch as a Cake Tool
#tool nuget:?package=Audit.NET.Elasticsearch&version=27.1.0                

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. 
.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.1.1 105 10/28/2024
27.1.0 78 10/24/2024
27.0.3 203 9/25/2024
27.0.2 165 9/19/2024
27.0.1 118 9/4/2024
27.0.0 93 9/3/2024
26.0.1 227 8/22/2024
26.0.0 152 7/19/2024
25.0.7 22,284 7/4/2024
25.0.6 909 6/24/2024
25.0.5 181 6/18/2024
25.0.4 13,450 3/24/2024
25.0.3 145 3/13/2024
25.0.2 123 3/12/2024
25.0.1 228 2/28/2024
25.0.0 545 2/16/2024
24.0.1 156 2/12/2024
24.0.0 111 2/12/2024
23.0.0 4,351 12/14/2023
22.1.0 27,276 12/9/2023
22.0.2 11,970 12/1/2023
22.0.1 4,250 11/16/2023
22.0.0 218 11/14/2023
21.1.0 1,906 10/9/2023
21.0.4 21,001 9/15/2023
21.0.3 13,750 7/9/2023
21.0.2 211 7/6/2023
21.0.1 3,428 5/27/2023
21.0.0 901 4/15/2023
20.2.4 497 3/27/2023
20.2.3 1,652 3/17/2023
20.2.2 302 3/14/2023
20.2.1 296 3/11/2023
20.2.0 452 3/7/2023
20.1.6 348 2/23/2023
20.1.5 5,067 2/9/2023
20.1.4 1,833 1/28/2023
20.1.3 1,192 12/21/2022
20.1.2 510 12/14/2022
20.1.1 403 12/12/2022
20.1.0 424 12/4/2022
20.0.4 386 11/30/2022
20.0.3 3,930 10/28/2022
20.0.2 467 10/26/2022
20.0.1 828 10/21/2022
20.0.0 1,190 10/1/2022
19.4.1 8,281 9/10/2022
19.4.0 619 9/2/2022
19.3.0 1,304 8/23/2022
19.2.2 781 8/11/2022
19.2.1 902 8/6/2022
19.2.0 646 7/24/2022
19.1.4 1,989 5/23/2022
19.1.3 521 5/22/2022
19.1.2 552 5/18/2022
19.1.1 741 4/28/2022
19.1.0 742 4/10/2022
19.0.7 792 3/13/2022
19.0.6 61,771 3/7/2022
19.0.5 3,132 1/28/2022
19.0.4 13,100 1/23/2022
19.0.3 4,010 12/14/2021
19.0.2 416 12/11/2021
19.0.1 12,855 11/20/2021
19.0.0 4,578 11/11/2021
19.0.0-rc.net60.2 176 9/26/2021
19.0.0-rc.net60.1 216 9/16/2021
18.1.6 11,432 9/26/2021
18.1.5 725 9/7/2021
18.1.4 504 9/6/2021
18.1.3 578 8/19/2021
18.1.2 599 8/8/2021
18.1.1 573 8/5/2021
18.1.0 528 8/1/2021
18.0.1 515 7/30/2021
18.0.0 609 7/26/2021
17.0.8 13,650 7/7/2021
17.0.7 4,665 6/16/2021
17.0.6 833 6/5/2021
17.0.5 2,097 5/28/2021
17.0.4 2,763 5/4/2021
17.0.3 523 5/1/2021
17.0.2 20,944 4/22/2021
17.0.1 505 4/18/2021
17.0.0 1,431 3/26/2021
16.5.6 513 3/25/2021
16.5.5 505 3/23/2021
16.5.4 3,995 3/9/2021
16.5.3 497 2/26/2021
16.5.2 516 2/23/2021
16.5.1 542 2/21/2021
16.5.0 643 2/17/2021
16.4.5 544 2/15/2021
16.4.4 500 2/5/2021
16.4.3 1,135 1/27/2021
16.4.2 511 1/22/2021
16.4.1 557 1/21/2021
16.4.0 3,072 1/11/2021
16.3.3 569 1/8/2021
16.3.2 581 1/3/2021
16.3.1 570 12/31/2020
16.3.0 546 12/30/2020
16.2.1 640 12/27/2020
16.2.0 7,651 10/13/2020
16.1.5 699 10/4/2020
16.1.4 693 9/17/2020
16.1.3 750 9/13/2020
16.1.2 601 9/9/2020
16.1.1 627 9/3/2020
16.1.0 235,351 8/19/2020
16.0.3 1,993 8/15/2020
16.0.2 617 8/9/2020
16.0.1 655 8/8/2020
16.0.0 548 8/7/2020
15.3.0 105,145 7/23/2020
15.2.3 1,939 7/14/2020
15.2.2 2,831 5/19/2020
15.2.1 1,028 5/12/2020
15.2.0 642 5/9/2020
15.1.1 634 5/4/2020
15.1.0 1,214 4/13/2020
15.0.5 1,605 3/18/2020
15.0.4 1,671 2/28/2020
15.0.3 638 2/26/2020
15.0.2 61,956 1/20/2020
15.0.1 1,649 1/10/2020
15.0.0 4,772 12/17/2019
14.9.1 2,839 11/30/2019
14.9.0 638 11/29/2019
14.8.1 766 11/26/2019
14.8.0 12,437 11/20/2019
14.7.0 6,555 10/9/2019
14.6.6 695 10/8/2019
14.6.5 6,746 9/27/2019
14.6.4 768 9/21/2019
14.6.3 1,761 8/12/2019
14.6.2 1,501 8/3/2019
14.6.1 748 8/3/2019
14.6.0 842 7/26/2019
14.5.7 1,405 7/18/2019
14.5.6 4,881 7/10/2019
14.5.5 837 7/1/2019
14.5.4 817 6/17/2019
14.5.3 947 6/5/2019
14.5.2 784 5/30/2019
14.5.1 762 5/28/2019
14.5.0 811 5/24/2019
14.4.0 1,378 5/22/2019
14.3.4 901 5/14/2019
14.3.3 913 5/9/2019
14.3.2 850 4/30/2019
14.3.1 822 4/27/2019
14.3.0 872 4/24/2019
14.2.3 806 4/17/2019
14.2.2 807 4/10/2019
14.2.1 799 4/5/2019
14.2.0 2,942 3/16/2019
14.1.1 805 3/8/2019
14.1.0 1,008 2/11/2019
14.0.4 39,349 1/31/2019
14.0.3 925 1/22/2019
14.0.2 4,182 12/15/2018
14.0.1 17,005 11/29/2018
14.0.0 1,023 11/19/2018
13.3.0 3,370 11/16/2018
13.2.2 969 11/15/2018
13.2.1 1,037 11/13/2018
13.2.0 986 10/31/2018
13.1.5 961 10/31/2018
13.1.4 980 10/25/2018
13.1.3 984 10/18/2018
13.1.2 1,320 9/12/2018
13.1.1 2,372 9/11/2018
13.1.0 1,043 9/11/2018
13.0.0 1,095 8/29/2018
12.3.6 1,049 8/29/2018
12.3.5 1,527 8/22/2018
12.3.4 1,064 8/21/2018
12.3.3 25,827 8/21/2018
12.3.2 1,121 8/20/2018
12.3.1 1,103 8/20/2018
12.3.0 1,075 8/20/2018
12.2.2 1,116 8/15/2018
12.2.1 1,101 8/9/2018
12.2.0 1,069 8/8/2018
12.1.11 4,055 7/30/2018
12.1.10 2,695 7/20/2018
12.1.9 1,359 7/10/2018
12.1.8 1,181 7/2/2018
12.1.7 1,270 6/7/2018
12.1.6 9,261 6/4/2018
12.1.5 1,229 6/2/2018
12.1.4 1,239 5/25/2018
12.1.3 2,377 5/16/2018
12.1.2 1,178 5/15/2018
12.1.1 2,407 5/14/2018
12.1.0 1,216 5/9/2018
12.0.7 1,361 5/5/2018
12.0.6 1,261 5/4/2018
12.0.5 1,267 5/3/2018
12.0.4 2,421 4/30/2018
12.0.3 1,332 4/30/2018