Getting Data In

Can splunk Index data from an HTTP address

htkhtk
Path Finder

I have a url that has a server.txt file on that that gets updated as the requests/responses are coming through.

Can splunk index that http://website.com/server.txt address?

If so, how? Thanks!

Tags (1)
1 Solution

ziegfried
Influencer

Sure, just set up a scripted input, that fetches the url.

Dokumentation: http://www.splunk.com/base/Documentation/4.1.5/Admin/Setupcustom(scripted)inputs

As an example, you could use the curl command on Linux/Unix:

#!/bin/bash
curl http://website.com/server.txt

View solution in original post

pabstec
New Member

Check out the "rest" command.

0 Karma

nicholasgrabows
Path Finder

There is a new splunkbase app called "importutil". It lets you import input from an http url via the splunk search command line. Also works for ftp. sftp is experimental.

http://splunk-base.splunk.com/apps/69078/importutil

Here is an ftp example. Pulling from the bureau of labor stats:

|importutil ftp ftp://ftp.bls.gov/pub/time.series/ce/ce.data.102.WeeklyEarningsHist
| multikv
| table series_id, year, period, value, footnote_codes

Here is an http example that imports data from the federal reserve economic data website:

|importutil http http://research.stlouisfed.org/fred2/data/PAYEMS.csv
| multikv
| table DATE, VALUE

sfurness
Engager

Is Web Page Monitor still available? For some reason I can't find it in the Apps section?

gkanapathy
Splunk Employee
Splunk Employee

Yes, I was looking for it, and it used to do just what was requested, when it was around.

ziegfried
Influencer

Sure, just set up a scripted input, that fetches the url.

Dokumentation: http://www.splunk.com/base/Documentation/4.1.5/Admin/Setupcustom(scripted)inputs

As an example, you could use the curl command on Linux/Unix:

#!/bin/bash
curl http://website.com/server.txt

gkanapathy
Splunk Employee
Splunk Employee
0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...