Getting Data In

wget and upload

arienchen
New Member

dear all,
how do I use wget command to post event or upload a file into splunk?
for some reason, the host is not allowed to install any program, even splunk forwarder.

Thanks & Regards,

Tags (4)
0 Karma

Jason
Motivator

You can use the REST api to send an event to Splunk:

http://docs.splunk.com/Documentation/Splunk/latest/RESTAPI/RESTinput#receivers.2Fsimple

There's even an example with curl. It looks like wget doesn't support sending multipart/form-data to upload a file.

0 Karma

Jason
Motivator

curl will need to use a splunk username/password to log on. The Splunk user must have a role with the capability "edit_tcp"

0 Karma

arienchen
New Member

It is a critical system for trading.
BTW,
I have a work around for my question.
1. Install a Linux + Tomcat(or Glassfish)
2. Write a simple upload JSP/Servlet
3. Install Splunk forwarder on the Linux.

Thanks.

0 Karma

RubenOlsen
Path Finder

Could you please elaborate what you mean by "the host is not allowed to install any program"? i.e. is the host where you want to run wget?

Also - please provide us with an example of which hosts you want to run what and fetch from where (splunk, wget, datasource used with wget).

0 Karma
Get Updates on the Splunk Community!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...