From 49af86b0c607cbd0cd6d23d9ba1317566fba8549 Mon Sep 17 00:00:00 2001 From: Dariusz Danielewski Date: Fri, 10 May 2024 11:04:50 -0400 Subject: [PATCH 1/3] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 4630d94..4400534 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ [![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/NLog.Targets.HTTP)](https://www.nuget.org/packages/NLog.Targets.HTTP) +2024.05.10 - With the introduction of NLog 5.0 [WebServiceTarget](https://nlog-project.org/documentation/v5.0.0/html/T_NLog_Targets_WebServiceTarget.htm) +this project will be heading towards becoming an archive. + NLog.Targets.HTTP is an HTTP POST target for NLog. When combined with JSON formatter it can be used to send events to an instance of Splunk and other HTTP based collectors. From fa50a28beb8e078b1ffe72cd998e04468723b632 Mon Sep 17 00:00:00 2001 From: Dariusz Danielewski Date: Fri, 10 May 2024 11:09:31 -0400 Subject: [PATCH 2/3] .Net upgrades --- NLog.Targets.Http/NLog.Targets.Http.csproj | 2 +- UnitTests-Coded/UnitTests-Coded.csproj | 3 +- UnitTests-Coded/app.config | 30 +++++++++---------- .../UnitTests-ConfigurationAndLayout.csproj | 3 +- UnitTests-ConfigurationAndLayout/app.config | 30 +++++++++---------- 5 files changed, 33 insertions(+), 35 deletions(-) diff --git a/NLog.Targets.Http/NLog.Targets.Http.csproj b/NLog.Targets.Http/NLog.Targets.Http.csproj index efa84fb..3fe24c9 100644 --- a/NLog.Targets.Http/NLog.Targets.Http.csproj +++ b/NLog.Targets.Http/NLog.Targets.Http.csproj @@ -2,7 +2,7 @@ - net45;net462;net472;net48;netstandard2.1;netstandard2.0;netcoreapp3.1;net5.0;net6.0 + net45;net462;net472;net48;netstandard2.1;netstandard2.0;net6.0 NLog.Targets.Http An NLog target for Http log entries submission (works wih Splunk HEC) Luca Giordano, Dariusz Danielewski, Stan Smith and Julian Verdurmen diff --git a/UnitTests-Coded/UnitTests-Coded.csproj b/UnitTests-Coded/UnitTests-Coded.csproj index 9c68129..715da31 100644 --- a/UnitTests-Coded/UnitTests-Coded.csproj +++ b/UnitTests-Coded/UnitTests-Coded.csproj @@ -10,7 +10,7 @@ Properties UnitTests_Coded UnitTests-Coded - v4.6.2 + v4.8 512 {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 15.0 @@ -20,6 +20,7 @@ UnitTest + true diff --git a/UnitTests-Coded/app.config b/UnitTests-Coded/app.config index 5e3052d..1e2891a 100644 --- a/UnitTests-Coded/app.config +++ b/UnitTests-Coded/app.config @@ -1,33 +1,31 @@ - - + - - + + - - + + - - + + - - + + - - + + - - + + - \ No newline at end of file + diff --git a/UnitTests-ConfigurationAndLayout/UnitTests-ConfigurationAndLayout.csproj b/UnitTests-ConfigurationAndLayout/UnitTests-ConfigurationAndLayout.csproj index 8e2b778..a258391 100644 --- a/UnitTests-ConfigurationAndLayout/UnitTests-ConfigurationAndLayout.csproj +++ b/UnitTests-ConfigurationAndLayout/UnitTests-ConfigurationAndLayout.csproj @@ -10,7 +10,7 @@ Properties UnitTests_ConfigurationAndLayout UnitTests-ConfigurationAndLayout - v4.6.2 + v4.8 512 {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 15.0 @@ -20,6 +20,7 @@ UnitTest + true diff --git a/UnitTests-ConfigurationAndLayout/app.config b/UnitTests-ConfigurationAndLayout/app.config index 5e3052d..1e2891a 100644 --- a/UnitTests-ConfigurationAndLayout/app.config +++ b/UnitTests-ConfigurationAndLayout/app.config @@ -1,33 +1,31 @@ - - + - - + + - - + + - - + + - - + + - - + + - - + + - \ No newline at end of file + From 8033c31e22347b45832a176f2c0573f786fa5969 Mon Sep 17 00:00:00 2001 From: Dariusz Danielewski Date: Fri, 10 May 2024 12:42:40 -0400 Subject: [PATCH 3/3] non-functional change for new Splunk instance --- NLog.Target.Http.ProfilerShell/nlog.config | 2 +- README.md | 2 +- UnitTests-Coded/SplunkTests.cs | 2 +- UnitTests-Coded/UnitTests-Coded.csproj | 52 ++++++++++++++++++++++ UnitTests-Coded/app.config | 48 ++++++++++++++------ UnitTests-Coded/packages.config | 17 +++++++ 6 files changed, 106 insertions(+), 17 deletions(-) diff --git a/NLog.Target.Http.ProfilerShell/nlog.config b/NLog.Target.Http.ProfilerShell/nlog.config index 3a2edb3..a203cf3 100644 --- a/NLog.Target.Http.ProfilerShell/nlog.config +++ b/NLog.Target.Http.ProfilerShell/nlog.config @@ -13,7 +13,7 @@
diff --git a/README.md b/README.md index 4400534..53386dc 100644 --- a/README.md +++ b/README.md @@ -172,6 +172,6 @@ docker run -d -p 8000:8000 -p 8088:8088 -e "SPLUNK_START_ARGS=--accept-license" ``` After a few moments, depeneding on your systems capacity, -login to Splunk at http://localhost:8080/ with `admin` and `Pass@W0rd`. +login to Splunk at http://localhost:8000/ with `admin` and `Pass@W0rd`. The HttpEventCollector (HEC) will listen on port 8088 once created from Settings - Data Inputs menu option. diff --git a/UnitTests-Coded/SplunkTests.cs b/UnitTests-Coded/SplunkTests.cs index aa9b8d9..324dd63 100644 --- a/UnitTests-Coded/SplunkTests.cs +++ b/UnitTests-Coded/SplunkTests.cs @@ -19,7 +19,7 @@ public void TestSetup() var target = new HTTP { Url = "https://localhost:8088/services/collector/event", - Authorization = "Splunk b87acd5b-3eba-4f0e-b768-1a715fd52871", + Authorization = "Splunk cd3f0725-5e56-440b-bafc-0ccb663537c1", Name = "SplunkTarget", InMemoryCompression = false, BatchSize = 50000, diff --git a/UnitTests-Coded/UnitTests-Coded.csproj b/UnitTests-Coded/UnitTests-Coded.csproj index 715da31..70b6966 100644 --- a/UnitTests-Coded/UnitTests-Coded.csproj +++ b/UnitTests-Coded/UnitTests-Coded.csproj @@ -40,21 +40,73 @@ 4 + + ..\packages\BouncyCastle.Cryptography.2.3.0\lib\net461\BouncyCastle.Cryptography.dll + + + ..\packages\Docker.DotNet.3.125.15\lib\netstandard2.0\Docker.DotNet.dll + + + ..\packages\Docker.DotNet.X509.3.125.15\lib\netstandard2.0\Docker.DotNet.X509.dll + + + ..\packages\SharpZipLib.1.4.2\lib\netstandard2.0\ICSharpCode.SharpZipLib.dll + + + ..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll + + + ..\packages\Microsoft.Bcl.HashCode.1.1.1\lib\net461\Microsoft.Bcl.HashCode.dll + + + ..\packages\Microsoft.Extensions.Logging.Abstractions.6.0.4\lib\net461\Microsoft.Extensions.Logging.Abstractions.dll + + + ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll + ..\packages\NLog.4.7.13\lib\net45\NLog.dll ..\packages\NUnit.3.13.2\lib\net45\nunit.framework.dll + + ..\packages\SSH.NET.2023.0.0\lib\net462\Renci.SshNet.dll + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + ..\packages\System.Text.Encodings.Web.6.0.0\lib\net461\System.Text.Encodings.Web.dll + + + ..\packages\System.Text.Json.6.0.9\lib\net461\System.Text.Json.dll + + + ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + + + ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll + diff --git a/UnitTests-Coded/app.config b/UnitTests-Coded/app.config index 1e2891a..91a0fe1 100644 --- a/UnitTests-Coded/app.config +++ b/UnitTests-Coded/app.config @@ -1,31 +1,51 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/UnitTests-Coded/packages.config b/UnitTests-Coded/packages.config index 08088b7..ec9a10a 100644 --- a/UnitTests-Coded/packages.config +++ b/UnitTests-Coded/packages.config @@ -1,5 +1,22 @@  + + + + + + + + + + + + + + + + + \ No newline at end of file