Getting Data In

Manual event upload with http/script

DanHolton
New Member

I'm trying to find out if it is possible to directly upload an event to the splunk server via an http/tcp interface without using a splunk agent.

Here's what I'm trying to do:
I'd like to be able to use splunk as the central repository for all my script outputs for hosts in my environment. Not all hosts will have a splunk agent/forwarder installed, and since these will be one off scripts, splunk doing WMI queries on these hosts doesn't help. All of the script outputs would have a very simple format, i.e. timestamp, hostname, script ID, and script result (i.e. SUCCESS - System Rebooting). From looking at other questions on the forums, it looks like a work around would be to have all of the hosts append the logs to a log file on a central logging server, and then have the agent on that server to forward it to splunk. That is an okay work around, but to cut out the middle man, I'd really like to just be able to just add a simple function to my script to have it be able to tell the splunk server about the script completion results. For other hosts in the environment we have splunk collecting the event logs, and custom app logs, but I'm just looking for a very lightweight way of having splunk capture custom script results. Oh, and the scripts would be triggered from separate scripting hosts, or from the system itself, so not something that would be ran directly from a splunk server where it would see the script results directly. The end result would allow me to have a section in a script that could be run against any host in my environment, and have it be able to add an entry to splunk (preferable over an http interface) without it needing to have any splunk client/forwarder pre-installed. Is this do-able? Hosts will mainly be Windows servers for now.

Tags (2)
0 Karma

MarioM
Motivator

have you tried doing it via Splunk Rest API ?

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...