Figured it out. Turned out to be pretty simple to implement. Just have to be sure to set up Splunk for receiving on the specific TCP port.
oSocket = service.Open(portNumber);
var bytes = Encoding.UTF8.GetBytes(message);
oSocket.Send(bytes);
Figured it out. Turned out to be pretty simple to implement. Just have to be sure to set up Splunk for receiving on the specific TCP port.
oSocket = service.Open(portNumber);
var bytes = Encoding.UTF8.GetBytes(message);
oSocket.Send(bytes);
@ConnorG Could you post your whole solution?
Has anyone figured out how to do this in C#?
@demodav you can find my solution here:
The parts you'll want to look at in particular are:
line 106 - setting up the login arguments
line 113 - creating a service instance that is connected to the splunk server
line 184 - getting the output stream to a specific index
line 214 - writing to that stream
Should be pretty self explanatory. Let me know if you have any questions.
Does the 'submit' example here not meet that need?
The submit example from the SDK is using HTTP Post (REST API) to ship the data. This method is insufficient for moving large amounts of data to the Splunk server.