This SDK contains library code and examples designed to enable developers to build applications using Splunk.
Splunk is a search engine and analytic environment that uses a distributed map-reduce architecture to efficiently index, search and process large time-varying data sets.
The Splunk product is popular with system administrators for aggregation and monitoring of IT machine data, security, compliance and a wide variety of other scenarios that share a requirement to efficiently index, search, analyze and generate real-time notifications from large volumes of time series data.
The Splunk developer platform enables developers to take advantage of the same technology used by the Splunk product to build exciting new applications that are enabled by Splunk's unique capabilities.
The Splunk C# SDK is licensed under the Apache License 2.0. Details can be found in the LICENSE file.
-
The Apache License only applies to the Splunk C# SDK and no other Software provided by Splunk.
-
Splunk, in using the Apache License, does not provide any warranties or indemnification, and does not accept any liabilities with the release of the SDK.
-
We are accepting contributions from individuals and companies to our Splunk open source projects. See the Open Source page for more information.
The Splunk C# SDK contains library code and examples that show how to programmatically interact with Splunk for a variety of scenarios including searching, saved searches, data inputs, and many more, along with building complete applications.
The information in this Readme provides steps to get going quickly. In the future we will roll out more in depth documentation.
Here's what you need to get going with the Splunk C# SDK.
If you haven't already installed Splunk, download it here: http://www.splunk.com/download. For more about installing and running Splunk and system requirements, see Installing & Running Splunk (http://dev.splunk.com/view/SP-CAAADRV).
Get the Splunk C# from GitHub (https://github.com/) and clone the resources to your computer. For example, use the following command:
Visual Studio 2010 and Visual Studio 2012 are both supported. The minimum framework version supported is 4.0. Visual Studio downloads are available here: http://www.microsoft.com/visualstudio/11/en-us/downloads
Before starting to develop custom software, you must first build the SDK.
The Splunk C# SDK includes several examples and unit tests that are run at the command line.
To connect to Splunk, many of the SDK examples and unit tests take command- line arguments that specify values for the host, port, and login credentials for Splunk. For convenience during development, you can store these arguments as key-value pairs in a text file named .splunkrc. Then, when you don't specify these arguments at the command line, the SDK examples and unit tests use the values from the .splunkrc file.
To use a .splunkrc file, create a text file with the following format:
# Host at which Splunk is reachable (OPTIONAL)
host=localhost
# Port at which Splunk is reachable (OPTIONAL)
# Use the admin port, which is 8089 by default.
port=8089
# Splunk username
username=admin
# Splunk password
password=changeme
# Access scheme (OPTIONAL)
scheme=https
# Application context (OPTIONAL)
app=MyApp
# Owner context (OPTIONAL)
owner=User1
Save the file as .splunkrc in the current user's home directory.
-
On Windows, save the file as:
C:\Users\currentusername\.splunkrc
You might get errors in Windows when you try to name the file because ".splunkrc" looks like a nameless file with an extension. You can use the command line to create this file--go to the C:\Users\currentusername directory and enter the following command:
Notepad.exe .splunkrc
Click Yes, then continue creating the file.
NOTE: Storing login credentials in the .splunkrc file is only for convenience during development—this file isn't part of the Splunk platform and shouldn't be used for storing user credentials for production. And, if you're at all concerned about the security of your credentials, just enter them at the command line rather than saving them in the .splunkrc file.
[TBD]
[TBD]
[TBD]
[TBD]
You can find anything having to do with developing on Splunk at the Splunk developer portal:
You can also find reference documentation for the REST API:
For an introduction to the Splunk product and some of its capabilities:
Stay connected with other developers building on Splunk.
devinfo@splunk.com | |
Blog | http://blogs.splunk.com/dev/ |
@splunkdev |
If you want to make a code contribution, go to the Open Source page for more information.
-
SDKs in Preview will not be Splunk supported. Once the PHP SDK moves to an Open Beta we will provide more detail on support.
-
Issues should be filed here: https://github.com/splunk/splunk-sdk-php/issues
You can reach the Dev Platform team at devinfo@splunk.com.