Getting Data In

Splunk extension

wanling
Path Finder

Does Splunk provide API for an external application to read the parsed data and generate the output for Splunk to display?

We plan to implement proprietary algorithm to detect anomaly in logs, but yet leverage on splunk's data collection/parsing and visualization capability.

Tags (2)
0 Karma
1 Solution

Ayn
Legend

Splunk provides a REST API (http://dev.splunk.com/view/rest-api-overview/SP-CAAADP8 ) that external applications can use to perform queries. This API cannot however (at least not easily) in itself be used for writing back results directly into Splunk. There are a number of options for how to achieve this though.

  • You could create a scripted input that performs the queries through the REST API, carries out its analysis and then echoes back its results to stdout, which will then be read by Splunk.
  • You can have the script run separately and write its results to a file that is monitored by Splunk.
  • If your analysis is performed line-by-line, you could have it run as a dynamic lookup script that writes its results to a field.

Only the dynamic lookup option meets the requirement of showing externally analysed results from some specific query directly back to the user.

View solution in original post

richcollier
Path Finder

Already been done - see the Prelert Anomaly Detective

Damien_Dallimor
Ultra Champion

Regrading the getting data back into Splunk ,you can certainly also do this via REST using the receivers/simple or receivers/stream endpoints.

Also ,check out the SDKs at dev.splunk.com , will help you to get up and running with the REST API a lot quicker.

Ayn
Legend

Splunk provides a REST API (http://dev.splunk.com/view/rest-api-overview/SP-CAAADP8 ) that external applications can use to perform queries. This API cannot however (at least not easily) in itself be used for writing back results directly into Splunk. There are a number of options for how to achieve this though.

  • You could create a scripted input that performs the queries through the REST API, carries out its analysis and then echoes back its results to stdout, which will then be read by Splunk.
  • You can have the script run separately and write its results to a file that is monitored by Splunk.
  • If your analysis is performed line-by-line, you could have it run as a dynamic lookup script that writes its results to a field.

Only the dynamic lookup option meets the requirement of showing externally analysed results from some specific query directly back to the user.

ChrisG
Splunk Employee
Splunk Employee

Complete documentation of the REST API is available at http://docs.splunk.com/Documentation/Splunk/latest/RESTAPI/RESTcontents

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

Splunk is officially part of Cisco

Revolutionizing how our customers build resilience across their entire digital footprint.   Splunk ...

Splunk APM & RUM | Planned Maintenance March 26 - March 28, 2024

There will be planned maintenance for Splunk APM and RUM between March 26, 2024 and March 28, 2024 as ...