All Apps and Add-ons

Programatically create a new Website Input

gfuente
Motivator

Hello

would it be possible to create dinamically (with an script) a new website input, through the splunk Rest API.

If so, what would be the endpoint needed to be called?

Thanks

0 Karma
1 Solution

gfuente
Motivator

Hello

Finally i found that it can be done calling this endpoint

curl -k -u admin:changeme https://localhost:8089/servicesNS/nobody/website_inputs/data/inputs/web_input  -d name=Name -d url=http://urltomonitor   -d index=main -d interval=24h  -d selector=td -d sourcetype=website -d title=myinput

hope it helps to anyone willing to do the same

Regards

View solution in original post

0 Karma

LukeMurphey
Champion

BTW: could you clarify why you want to make inputs via a REST API? I'm asking because I suspect there may be an enhancement request to the Website Input app that could solve this problem.

0 Karma

gfuente
Motivator

Hello

Finally i found that it can be done calling this endpoint

curl -k -u admin:changeme https://localhost:8089/servicesNS/nobody/website_inputs/data/inputs/web_input  -d name=Name -d url=http://urltomonitor   -d index=main -d interval=24h  -d selector=td -d sourcetype=website -d title=myinput

hope it helps to anyone willing to do the same

Regards

0 Karma
Get Updates on the Splunk Community!

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 ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...