A NLog target for Splunk Http Event Collector (HEC) Sender
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs renaming docs directory to lowercase May 16, 2017
releases Release 2.2.0 built and published Aug 30, 2018
src Release 2.2.0 built and published Aug 30, 2018
.gitignore First commit! Apr 19, 2017
CODE_OF_CONDUCT.md Updating for .Net Standard May 16, 2017
CONTRIBUTING.md Updating for .Net Standard May 16, 2017
LICENSE First commit! Apr 19, 2017
Readme.md Release 2.2.0 built and published Aug 30, 2018

Readme.md

NLog.Targets.Splunk

NLog.Targets.Splunk is a Splunk HTTP Event Collector target for NLog

NuGet version

Getting started

First you will need to have a running install of Splunk Enterprise and setup a HTTP Event Collector

Then configure the SplunkHttpEventCollector with ServerUrl and Token:

<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
  <extensions>
    <add assembly="NLog.Targets.Splunk" />
  </extensions>
  <targets async="true">
    <target name="Splunk"
            xsi:type="SplunkHttpEventCollector"
            serverUrl="https://splunk-server:8088"
            token="token-guid"
            channel="channel-guid"
            retriesOnError="0"
            batchSizeBytes="0"
            batchSizeCount="0"
            includeEventProperties="true"
            includeMdlc="false"
            includePositionalParameters="false"
	    IgnoreSslErrors="false">
		<contextproperty name="host" layout="${machinename}" />
		<contextproperty name="threadid" layout="${threadid}" />
		<contextproperty name="logger" layout="${logger}" />
	</target>    
  </targets>
  <rules>
    <logger name="*" minlevel="Debug" writeTo="Splunk" />
  </rules>
</nlog>

Feedback / Issues

Feel free to tweet @alanbarber for questions or comments on the code.
You can also submit a GitHub issue here.

License

https://github.com/alanbarber/NLog.Targets.Splunk/blob/master/LICENSE